-
-
Notifications
You must be signed in to change notification settings - Fork 17
244 lines (232 loc) · 9.48 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
name: Build Artifacts
on:
workflow_dispatch:
push:
paths-ignore:
- "*.gitlab-ci.yml"
- "*.gitignore"
pull_request:
branches:
- dev
paths-ignore:
- "**.md"
- ".gitignore"
- "*.gitlab-ci.yml"
jobs:
windows:
name: Windows (x86_64)
uses: ./.github/workflows/build.yaml
with:
archive-name: melondsds_libretro-win32-x86_64
runs-on: windows-latest
target: win32
info-dir: info
lib-ext: dll
shell: msys2 {0}
test-suite: true
cmake-args: -DENABLE_SCCACHE=ON -DSCCACHE="C:/Users/runneradmin/.cargo/bin/sccache.exe"
secrets:
TESTFILE_REPO_TOKEN: ${{ secrets.TESTFILE_REPO_TOKEN }}
TESTFILE_REPO: ${{ secrets.TESTFILE_REPO }}
DSI_NAND_ARCHIVE: ${{ secrets.DSI_NAND_ARCHIVE }}
DSI_NAND: ${{ secrets.DSI_NAND }}
ARM7_BIOS: ${{ secrets.ARM7_BIOS }}
ARM9_BIOS: ${{ secrets.ARM9_BIOS }}
ARM7_DSI_BIOS: ${{ secrets.ARM7_DSI_BIOS }}
ARM9_DSI_BIOS: ${{ secrets.ARM9_DSI_BIOS }}
NDS_FIRMWARE: ${{ secrets.NDS_FIRMWARE }}
DSI_FIRMWARE: ${{ secrets.DSI_FIRMWARE }}
NDS_ROM: ${{ secrets.NDS_ROM }}
GBA_ROM: ${{ secrets.GBA_ROM }}
GBA_SRAM: ${{ secrets.GBA_SRAM }}
macos-x86_64:
name: macOS (x86_64)
uses: ./.github/workflows/build.yaml
with:
archive-name: melondsds_libretro-macos-x86_64
runs-on: macos-13
target: macos-x86_64
lib-ext: dylib
test-suite: true
cmake-args: -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64" -DENABLE_OGLRENDERER=ON -DENABLE_OPENGL=ON -DCMAKE_APPLE_SILICON_PROCESSOR="x86_64"
# Disabled OpenGL on macOS due to https://github.com/JesseTG/melonds-ds/issues/12
secrets:
TESTFILE_REPO_TOKEN: ${{ secrets.TESTFILE_REPO_TOKEN }}
TESTFILE_REPO: ${{ secrets.TESTFILE_REPO }}
DSI_NAND_ARCHIVE: ${{ secrets.DSI_NAND_ARCHIVE }}
DSI_NAND: ${{ secrets.DSI_NAND }}
ARM7_BIOS: ${{ secrets.ARM7_BIOS }}
ARM9_BIOS: ${{ secrets.ARM9_BIOS }}
ARM7_DSI_BIOS: ${{ secrets.ARM7_DSI_BIOS }}
ARM9_DSI_BIOS: ${{ secrets.ARM9_DSI_BIOS }}
NDS_FIRMWARE: ${{ secrets.NDS_FIRMWARE }}
DSI_FIRMWARE: ${{ secrets.DSI_FIRMWARE }}
NDS_ROM: ${{ secrets.NDS_ROM }}
GBA_ROM: ${{ secrets.GBA_ROM }}
GBA_SRAM: ${{ secrets.GBA_SRAM }}
macos-arm64:
name: macOS (arm64)
uses: ./.github/workflows/build.yaml
with:
archive-name: melondsds_libretro-macos-arm64
runs-on: macos-latest
target: macos-arm64
lib-ext: dylib
test-suite: true
cmake-args: -DCMAKE_OSX_ARCHITECTURES:STRING="arm64" -DENABLE_OGLRENDERER=ON -DENABLE_OPENGL=ON -DCMAKE_APPLE_SILICON_PROCESSOR="arm64"
# Disabled OpenGL on macOS due to https://github.com/JesseTG/melonds-ds/issues/12
secrets:
TESTFILE_REPO_TOKEN: ${{ secrets.TESTFILE_REPO_TOKEN }}
TESTFILE_REPO: ${{ secrets.TESTFILE_REPO }}
DSI_NAND_ARCHIVE: ${{ secrets.DSI_NAND_ARCHIVE }}
DSI_NAND: ${{ secrets.DSI_NAND }}
ARM7_BIOS: ${{ secrets.ARM7_BIOS }}
ARM9_BIOS: ${{ secrets.ARM9_BIOS }}
ARM7_DSI_BIOS: ${{ secrets.ARM7_DSI_BIOS }}
ARM9_DSI_BIOS: ${{ secrets.ARM9_DSI_BIOS }}
NDS_FIRMWARE: ${{ secrets.NDS_FIRMWARE }}
DSI_FIRMWARE: ${{ secrets.DSI_FIRMWARE }}
NDS_ROM: ${{ secrets.NDS_ROM }}
GBA_ROM: ${{ secrets.GBA_ROM }}
GBA_SRAM: ${{ secrets.GBA_SRAM }}
linux-x86_64:
name: Linux (x86_64)
uses: ./.github/workflows/build.yaml
with:
archive-name: melondsds_libretro-linux-x86_64
target: linux-x86_64
runs-on: ubuntu-latest
lib-ext: so
test-suite: true
secrets:
TESTFILE_REPO_TOKEN: ${{ secrets.TESTFILE_REPO_TOKEN }}
TESTFILE_REPO: ${{ secrets.TESTFILE_REPO }}
DSI_NAND_ARCHIVE: ${{ secrets.DSI_NAND_ARCHIVE }}
DSI_NAND: ${{ secrets.DSI_NAND }}
ARM7_BIOS: ${{ secrets.ARM7_BIOS }}
ARM9_BIOS: ${{ secrets.ARM9_BIOS }}
ARM7_DSI_BIOS: ${{ secrets.ARM7_DSI_BIOS }}
ARM9_DSI_BIOS: ${{ secrets.ARM9_DSI_BIOS }}
NDS_FIRMWARE: ${{ secrets.NDS_FIRMWARE }}
DSI_FIRMWARE: ${{ secrets.DSI_FIRMWARE }}
NDS_ROM: ${{ secrets.NDS_ROM }}
GBA_ROM: ${{ secrets.GBA_ROM }}
GBA_SRAM: ${{ secrets.GBA_SRAM }}
linux-aarch64:
name: Linux (arm64)
uses: ./.github/workflows/build.yaml
with:
archive-name: melondsds_libretro-linux-arm64
target: linux-aarch64
runs-on: ubuntu-latest
lib-ext: so
cmake-args: -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DPKG_CONFIG_EXECUTABLE=/usr/bin/aarch64-linux-gnu-pkg-config
android:
name: Android
uses: ./.github/workflows/build.yaml
with:
lib-ext: so
target: android
core-name: melondsds_libretro_android
archive-name: melondsds_libretro-android
cmake-args: -DENABLE_OGLRENDERER=OFF -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=24 -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake"
runs-on: ubuntu-latest
# Disabled OpenGL on Android due to https://github.com/JesseTG/melonds-ds/issues/23
ios:
name: iOS
uses: ./.github/workflows/build.yaml
with:
runs-on: macos-latest
target: ios
archive-name: melondsds_libretro-ios
info-dir: info
lib-ext: dylib
cmake-args: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=14
# Disabled OpenGL on iOS due to https://github.com/JesseTG/melonds-ds/issues/23
tvos:
name: tvOS
uses: ./.github/workflows/build.yaml
with:
runs-on: macos-latest
target: tvos
archive-name: melondsds_libretro-tvos
info-dir: info
lib-ext: dylib
cmake-args: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=14
# Disabled OpenGL on tvOS due to https://github.com/JesseTG/melonds-ds/issues/23
create-release:
name: Create Release
needs: [ windows, macos-x86_64, macos-arm64, linux-x86_64, linux-aarch64, android, ios, tvos ]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check Out Source
uses: actions/checkout@v4
with:
fetch-depth: 0 # To ensure we have all tags
- name: Get Latest Changelog Version
id: changelog
uses: release-flow/keep-a-changelog-action@v2
with:
command: query
version: latest
- name: Get the Newest Tag
id: newest-tag
run: |
echo "version=`git tag --list "v[0-9]*.[0-9]*.[0-9]*" --sort=-v:refname | head -n1 | cut -c2-`" >> "$GITHUB_OUTPUT"
- name: Download Artifacts
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/download-artifact@v3
with:
path: artifact
- name: Zip Release Artifacts
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
shell: bash
working-directory: artifact
run: |
for file in melondsds_libretro-*-Release; do
zip -r "${file}.zip" "$file"
done
- name: Upload .info File Artifact
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/upload-artifact@v3
with:
name: melondsds_libretro.info
path: artifact/melondsds_libretro-linux-x86_64-Release/cores/melondsds_libretro.info
# The .info file doesn't vary by platform, so we only need to upload one
- name: Create Release
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
tag_name: "v${{ steps.changelog.outputs.version }}"
body: "${{ steps.changelog.outputs.release-notes }}"
files: |
artifact/melondsds_libretro-win32-x86_64-Release.zip
artifact/melondsds_libretro-macos-x86_64-Release.zip
artifact/melondsds_libretro-macos-arm64-Release.zip
artifact/melondsds_libretro-linux-x86_64-Release.zip
artifact/melondsds_libretro-linux-arm64-Release.zip
artifact/melondsds_libretro-android-Release.zip
artifact/melondsds_libretro-ios-Release.zip
artifact/melondsds_libretro-tvos-Release.zip
- name: Checkout libretro-super
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/checkout@v4
with:
repository: "libretro/libretro-super"
path: libretro-super
- name: Add Updated .info File
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
run: |
cp -f "${{ github.workspace }}/artifact/melondsds_libretro-linux-x86_64-Release/cores/melondsds_libretro.info" libretro-super/dist/info/melondsds_libretro.info
- name: Open Pull Request
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.RELEASE_TOKEN }}
path: libretro-super
commit-message: 'Submit melondsds_libretro.info for melonDS DS release v${{ steps.changelog.outputs.version }} on behalf of @${{ github.triggering_actor }}'
title: "Update melonDS DS to ${{ steps.changelog.outputs.version }}"
branch: "melondsds-v${{ steps.changelog.outputs.version }}"
push-to-fork: "${{ github.triggering_actor }}/libretro-super"