-
Notifications
You must be signed in to change notification settings - Fork 153
384 lines (323 loc) · 12.7 KB
/
build.yml
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
name: EX Emulators
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
image: ["2600.emu", "C64.emu", "GBA.emu", "GBC.emu", "Lynx.emu", "MD.emu", "MSX.emu", "NEO.emu", "NES.emu", "NGP.emu", "PCE.emu", "Snes9x", "Snes9x-1.43-9", "Snes9x-1.43-15", "Swan.emu"]
steps:
- name: Checkout emu-ex-plus-alpha repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Decode debug keystore
env:
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
run: |
if [ -z "$DEBUG_KEYSTORE" ]
then
echo "No debug keystore value"
else
echo $DEBUG_KEYSTORE > debug.keystore.base64
base64 --decode debug.keystore.base64 > debug.keystore
sudo cp -f debug.keystore /root/.android/.
fi
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends autoconf automake autopoint bash binutils-arm-linux-gnueabi clang cmake file gawk gettext git libtool libtool-bin llvm make nasm pkg-config unzip wget
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Set up environment
run: |
mkdir imagine-sdk
mkdir EX-Emulators
wget "https://dl.google.com/android/repository/android-ndk-r26b-linux.zip"
unzip android-ndk-r26b-linux.zip
echo "ANDROID_NDK_PATH=${{ github.workspace }}/android-ndk-r26b" >> $GITHUB_ENV
echo "EMUFRAMEWORK_PATH=${{ github.workspace }}/EmuFramework" >> $GITHUB_ENV
echo "IMAGINE_PATH=${{ github.workspace }}/imagine" >> $GITHUB_ENV
echo "IMAGINE_SDK_PATH=${{ github.workspace }}/imagine-sdk" >> $GITHUB_ENV
- name: Run script
run: |
cd imagine/bundle/all
chmod +x ./makeAll-android.sh
./makeAll-android.sh install
shell: bash
- name: Build environment
run: |
make -f $IMAGINE_PATH/android-release.mk install V=1 -j2
make -f $EMUFRAMEWORK_PATH/android-release.mk config -j2
make -f $EMUFRAMEWORK_PATH/android-release.mk install V=1 -j2
- name: Build 2600.emu
if: ${{ matrix.image == '2600.emu' }}
run: |
cd 2600.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy 2600.emu artifact
if: ${{ matrix.image == '2600.emu' }}
run: |
cp 2600.emu/target/android-release/build/outputs/apk/release/2600Emu-release.apk EX-Emulators/2600Emu-release.apk
- name: Upload 2600.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == '2600.emu' }}
with:
name: 2600emu
path: ${{ github.workspace }}/2600.emu/target/android-release/build/outputs/apk/release/2600Emu-release.apk
- name: Build C64.emu
if: ${{ matrix.image == 'C64.emu' }}
run: |
cd C64.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy C64.emu artifact
if: ${{ matrix.image == 'C64.emu' }}
run: |
cp C64.emu/target/android-release/build/outputs/apk/release/C64Emu-release.apk EX-Emulators/C64Emu-release.apk
- name: Upload C64.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'C64.emu' }}
with:
name: C64emu
path: ${{ github.workspace }}/C64.emu/target/android-release/build/outputs/apk/release/C64Emu-release.apk
- name: Build GBA.emu
if: ${{ matrix.image == 'GBA.emu' }}
run: |
cd GBA.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy GBA.emu artifact
if: ${{ matrix.image == 'GBA.emu' }}
run: |
cp GBA.emu/target/android-release/build/outputs/apk/release/GbaEmu-release.apk EX-Emulators/GbaEmu-release.apk
- name: Upload GBA.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'GBA.emu' }}
with:
name: GBAemu
path: ${{ github.workspace }}/GBA.emu/target/android-release/build/outputs/apk/release/GbaEmu-release.apk
- name: Build GBC.emu
if: ${{ matrix.image == 'GBC.emu' }}
run: |
cd GBC.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy GBC.emu artifact
if: ${{ matrix.image == 'GBC.emu' }}
run: |
cp GBC.emu/target/android-release/build/outputs/apk/release/GbcEmu-release.apk EX-Emulators/GbcEmu-release.apk
- name: Upload GBC.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'GBC.emu' }}
with:
name: GBCemu
path: ${{ github.workspace }}/GBC.emu/target/android-release/build/outputs/apk/release/GbcEmu-release.apk
- name: Build Lynx.emu
if: ${{ matrix.image == 'Lynx.emu' }}
run: |
cd Lynx.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy Lynx.emu artifact
if: ${{ matrix.image == 'Lynx.emu' }}
run: |
cp Lynx.emu/target/android-release/build/outputs/apk/release/LynxEmu-release.apk EX-Emulators/LynxEmu-release.apk
- name: Upload Lynx.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'Lynx.emu' }}
with:
name: Lynxemu
path: ${{ github.workspace }}/Lynx.emu/target/android-release/build/outputs/apk/release/LynxEmu-release.apk
- name: Build MD.emu
if: ${{ matrix.image == 'MD.emu' }}
run: |
cd MD.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy MD.emu artifact
if: ${{ matrix.image == 'MD.emu' }}
run: |
cp MD.emu/target/android-release/build/outputs/apk/release/MdEmu-release.apk EX-Emulators/MdEmu-release.apk
- name: Upload MD.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'MD.emu' }}
with:
name: MDemu
path: ${{ github.workspace }}/MD.emu/target/android-release/build/outputs/apk/release/MdEmu-release.apk
- name: Build MSX.emu
if: ${{ matrix.image == 'MSX.emu' }}
run: |
cd MSX.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy MSX.emu artifact
if: ${{ matrix.image == 'MSX.emu' }}
run: |
cp MSX.emu/target/android-release/build/outputs/apk/release/MsxEmu-release.apk EX-Emulators/MsxEmu-release.apk
- name: Upload MSX.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'MSX.emu' }}
with:
name: MSXemu
path: ${{ github.workspace }}/MSX.emu/target/android-release/build/outputs/apk/release/MsxEmu-release.apk
- name: Build NEO.emu
if: ${{ matrix.image == 'NEO.emu' }}
run: |
cd NEO.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy NEO.emu artifact
if: ${{ matrix.image == 'NEO.emu' }}
run: |
cp NEO.emu/target/android-release/build/outputs/apk/release/NeoEmu-release.apk EX-Emulators/NeoEmu-release.apk
- name: Upload NEO.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'NEO.emu' }}
with:
name: NEOemu
path: ${{ github.workspace }}/NEO.emu/target/android-release/build/outputs/apk/release/NeoEmu-release.apk
- name: Build NES.emu
if: ${{ matrix.image == 'NES.emu' }}
run: |
cd NES.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy NES.emu artifact
if: ${{ matrix.image == 'NES.emu' }}
run: |
cp NES.emu/target/android-release/build/outputs/apk/release/NesEmu-release.apk EX-Emulators/NesEmu-release.apk
- name: Upload NES.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'NES.emu' }}
with:
name: NESemu
path: ${{ github.workspace }}/NES.emu/target/android-release/build/outputs/apk/release/NesEmu-release.apk
- name: Build NGP.emu
if: ${{ matrix.image == 'NGP.emu' }}
run: |
cd NGP.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy NGP.emu artifact
if: ${{ matrix.image == 'NGP.emu' }}
run: |
cp NGP.emu/target/android-release/build/outputs/apk/release/NgpEmu-release.apk EX-Emulators/NgpEmu-release.apk
- name: Upload NGP.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'NGP.emu' }}
with:
name: NGPemu
path: ${{ github.workspace }}/NGP.emu/target/android-release/build/outputs/apk/release/NgpEmu-release.apk
- name: Build PCE.emu
if: ${{ matrix.image == 'PCE.emu' }}
run: |
cd PCE.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy PCE.emu artifact
if: ${{ matrix.image == 'PCE.emu' }}
run: |
cp PCE.emu/target/android-release/build/outputs/apk/release/PceEmu-release.apk EX-Emulators/PceEmu-release.apk
- name: Upload PCE.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'PCE.emu' }}
with:
name: PCEemu
path: ${{ github.workspace }}/PCE.emu/target/android-release/build/outputs/apk/release/PceEmu-release.apk
- name: Build Snes9x
if: ${{ matrix.image == 'Snes9x' }}
run: |
cd Snes9x
make -f android-release.mk android-apk V=1 -j2
- name: Copy Snes9x artifact
if: ${{ matrix.image == 'Snes9x' }}
run: |
cp Snes9x/target/android-release/build/outputs/apk/release/Snes9xEXPlus-release.apk EX-Emulators/Snes9xEXPlus-release.apk
- name: Upload Snes9x artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'Snes9x' }}
with:
name: Snes9x
path: ${{ github.workspace }}/Snes9x/target/android-release/build/outputs/apk/release/Snes9xEXPlus-release.apk
- name: Build Snes9x-1.43-9
if: ${{ matrix.image == 'Snes9x-1.43-9' }}
run: |
cd Snes9x/1.43
make -f android-release-9.mk android-apk V=1 -j2
- name: Copy Snes9x-1.43-9 artifact
if: ${{ matrix.image == 'Snes9x-1.43-9' }}
run: |
cp Snes9x/1.43/target/android-release-9/build/outputs/apk/release/Snes9xEX-release.apk EX-Emulators/Snes9xEX-9-release.apk
- name: Upload Snes9x-1.43-9 artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'Snes9x-1.43-9' }}
with:
name: Snes9x-1.43-9
path: ${{ github.workspace }}/Snes9x/1.43/target/android-release-9/build/outputs/apk/release/Snes9xEX-release.apk
- name: Build Snes9x-1.43-15
if: ${{ matrix.image == 'Snes9x-1.43-15' }}
run: |
cd Snes9x/1.43
make -f android-release-15.mk android-apk V=1 -j2
- name: Copy Snes9x-1.43-15 artifact
if: ${{ matrix.image == 'Snes9x-1.43-15' }}
run: |
cp Snes9x/1.43/target/android-release-15/build/outputs/apk/release/Snes9xEX-release.apk EX-Emulators/Snes9xEX-15-release.apk
- name: Upload Snes9x-1.43-15 artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'Snes9x-1.43-15' }}
with:
name: Snes9x-1.43-15
path: ${{ github.workspace }}/Snes9x/1.43/target/android-release-15/build/outputs/apk/release/Snes9xEX-release.apk
- name: Build Swan.emu
if: ${{ matrix.image == 'Swan.emu' }}
run: |
cd Swan.emu
make -f android-release.mk android-apk V=1 -j2
- name: Copy Swan.emu artifact
if: ${{ matrix.image == 'Swan.emu' }}
run: |
cp Swan.emu/target/android-release/build/outputs/apk/release/SwanEmu-release.apk EX-Emulators/SwanEmu-release.apk
- name: Upload Swan.emu artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.image == 'Swan.emu' }}
with:
name: Swanemu
path: ${{ github.workspace }}/Swan.emu/target/android-release/build/outputs/apk/release/SwanEmu-release.apk
- name: Upload EX-Emulators artifacts
uses: actions/upload-artifact@v3
with:
name: EX-Emulators
path: EX-Emulators/
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout emu-ex-plus-alpha repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: dist
- name: Re-zip artifacts
run: |
cd dist
for artifact in *
do
echo "-> Creating ${artifact}.zip"
pushd "$artifact"
zip -r "../${artifact}.zip" *
popd
done
- name: Update Git Tag
run: |
git tag -f Pre-release
git push -f origin Pre-release
- name: Create Release
uses: ncipollo/release-action@v1
with:
prerelease: true
allowUpdates: true
removeArtifacts: true
replacesArtifacts: false
tag: Pre-release
artifacts: "dist/*.zip"