forked from X16Community/x16-emulator
-
Notifications
You must be signed in to change notification settings - Fork 0
513 lines (511 loc) · 18.4 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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
name: Build Binaries
on: [push, pull_request]
jobs:
README:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential make fonts-dejavu
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install md-to-pdf (npm)
run: |
npm i md-to-pdf
- name: Create output directory
run: |
mkdir artifacts
- name: Create README
run: |
export PATH=$(pwd)/node_modules/.bin:$PATH
cat header_footer.md README.md RELEASES.md | md-to-pdf --config-file .gh/config.js --stylesheet .gh/markdown.css > "artifacts/README.pdf"
- uses: actions/upload-artifact@v4
with:
name: readme-pdf
path: artifacts/*
build-win-x86_64:
needs: [README]
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: make git mingw-w64-x86_64-toolchain mingw-w64-x86_64-libelf mingw-w64-x86_64-SDL2 mingw-w64-x86_64-fluidsynth
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
run: |
git reset --hard
git diff
TRACE=1 FLUIDSYNTH=1 CROSS_COMPILE_WINDOWS=1 SDL2CONFIG=sdl2-config make V=1 -j2
mkdir emu_binaries
cp $(which SDL2.dll) emu_binaries/.
cp $(which zlib1.dll) emu_binaries/.
cp $(which libwinpthread-1.dll) emu_binaries/.
cp $(which libfluidsynth-3.dll) emu_binaries/.
cp $(which libgcc_s_seh-1.dll) emu_binaries/.
cp $(which libglib-2.0-0.dll) emu_binaries/.
cp $(which libgmodule-2.0-0.dll) emu_binaries/.
cp $(which libportaudio.dll) emu_binaries/.
cp $(which libintl-8.dll) emu_binaries/.
cp $(which libstdc++-6.dll) emu_binaries/.
cp $(which libgomp-1.dll) emu_binaries/.
cp $(which libreadline8.dll) emu_binaries/.
cp $(which libsndfile-1.dll) emu_binaries/.
cp $(which libpcre2-8-0.dll) emu_binaries/.
cp $(which libiconv-2.dll) emu_binaries/.
cp $(which libtermcap-0.dll) emu_binaries/.
cp $(which libFLAC.dll) emu_binaries/.
cp $(which libmp3lame-0.dll) emu_binaries/.
cp $(which libmpg123-0.dll) emu_binaries/.
cp $(which libogg-0.dll) emu_binaries/.
cp $(which libopus-0.dll) emu_binaries/.
cp $(which libvorbis-0.dll) emu_binaries/.
cp $(which libvorbisenc-2.dll) emu_binaries/.
cp sdcard.img.zip emu_binaries/.
cp x16emu.exe emu_binaries/.
cp makecart.exe emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_win64
path: emu_binaries/*
build-win-i686:
needs: [README]
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: make git mingw-w64-i686-toolchain mingw-w64-i686-libelf mingw-w64-i686-SDL2 mingw-w64-i686-fluidsynth
path-type: inherit
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Add /mingw32/bin to path
run: echo "/mingw32/bin" >> $GITHUB_PATH
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
shell: cmd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
run: |
git reset --hard
git diff
TRACE=1 FLUIDSYNTH=1 WIN_SDL2=/mingw32 TARGET_CPU=x86 CROSS_COMPILE_WINDOWS=1 make V=1 -j2
mkdir emu_binaries
cp $(which SDL2.dll) emu_binaries/.
cp $(which zlib1.dll) emu_binaries/.
cp $(which libwinpthread-1.dll) emu_binaries/.
cp $(which libfluidsynth-3.dll) emu_binaries/.
cp $(which libgcc_s_seh-1.dll) emu_binaries/.
cp $(which libglib-2.0-0.dll) emu_binaries/.
cp $(which libgmodule-2.0-0.dll) emu_binaries/.
cp $(which libportaudio.dll) emu_binaries/.
cp $(which libintl-8.dll) emu_binaries/.
cp $(which libstdc++-6.dll) emu_binaries/.
cp $(which libgomp-1.dll) emu_binaries/.
cp $(which libreadline8.dll) emu_binaries/.
cp $(which libsndfile-1.dll) emu_binaries/.
cp $(which libpcre2-8-0.dll) emu_binaries/.
cp $(which libiconv-2.dll) emu_binaries/.
cp $(which libtermcap-0.dll) emu_binaries/.
cp $(which libFLAC.dll) emu_binaries/.
cp $(which libmp3lame-0.dll) emu_binaries/.
cp $(which libmpg123-0.dll) emu_binaries/.
cp $(which libogg-0.dll) emu_binaries/.
cp $(which libopus-0.dll) emu_binaries/.
cp $(which libvorbis-0.dll) emu_binaries/.
cp $(which libvorbisenc-2.dll) emu_binaries/.
cp sdcard.img.zip emu_binaries/.
cp x16emu.exe emu_binaries/.
cp makecart.exe emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_win32
path: emu_binaries/*
build-linux-x86_64:
needs: [README]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Dependencies
run: |
sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y build-essential make libsdl2-dev libfluidsynth-dev
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
run: |
TRACE=1 FLUIDSYNTH=1 make V=1 -j3
mkdir emu_binaries
cp sdcard.img.zip emu_binaries/.
cp x16emu emu_binaries/.
cp makecart emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_linux-x86_64
path: emu_binaries/*
build-linux-aarch64:
needs: [README]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential make qemu-user-static
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
uses: pguyot/arm-runner-action@v2
with:
base_image: raspios_lite_arm64:2022-04-04
image_additional_mb: 8192
cpu: cortex-a53
copy_artifact_path: emu_binaries
commands: |
apt-get update
apt-get install -y build-essential make libsdl2-dev file git libfluidsynth-dev
TRACE=1 FLUIDSYNTH=1 make V=1 -j3
mkdir emu_binaries
cp sdcard.img.zip emu_binaries/.
cp x16emu emu_binaries/.
cp makecart emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
sudo chown -R runner emu_binaries
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_linux-aarch64
path: emu_binaries/*
build-linux-armhf:
needs: [README]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential make qemu-user-static
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
uses: pguyot/arm-runner-action@v2
with:
base_image: raspios_lite:2022-04-04
image_additional_mb: 8192
cpu: cortex-a7
copy_artifact_path: emu_binaries
commands: |
apt-get update
apt-get install -y build-essential make libsdl2-dev file git libfluidsynth-dev
TRACE=1 FLUIDSYNTH=1 make V=1 -j3
mkdir emu_binaries
cp sdcard.img.zip emu_binaries/.
cp x16emu emu_binaries/.
cp makecart emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
sudo chown -R runner emu_binaries
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_linux-armhf
path: emu_binaries/*
build-macos-x86_64:
needs: [README]
# this is currently macos-12, Monterey
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew install make sdl2 fluid-synth
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
run: |
TRACE=1 MAC_STATIC=1 LIBSDL_FILE=/usr/local/Cellar/sdl2/*/lib/libSDL2.a HOMEBREW_LIB=/usr/local/lib make V=1 -j3
mkdir emu_binaries
cp sdcard.img.zip emu_binaries/.
cp x16emu emu_binaries/.
cp makecart emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_macos_intel
path: emu_binaries/*
build-macos-arm64:
needs: [README]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew install make sdl2 fluid-synth
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Build Emulator
run: |
TRACE=1 MAC_STATIC=1 LIBSDL_FILE=/opt/homebrew/Cellar/sdl2/*/lib/libSDL2.a ADDL_INCLUDE=/opt/homebrew/include HOMEBREW_LIB=/opt/homebrew/lib FLUIDSYNTH=1 make V=1 -j3
mkdir emu_binaries
cp sdcard.img.zip emu_binaries/.
cp x16emu emu_binaries/.
cp makecart emu_binaries/.
file emu_binaries/*
- name: Copy ROM
run: |
cp latest_rom/rom.bin emu_binaries/.
cp latest_rom/*.sym emu_binaries/.
- uses: actions/download-artifact@v4
with:
name: readme-pdf
path: emu_binaries
- name: Fetch x16-docs PDFs
run: gh run download -R X16Community/x16-docs -n x16-docs-pdf --dir emu_binaries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: x16emu_macos_m1
path: emu_binaries/*
build-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential make libsdl2-dev
- uses: mymindstorm/setup-emsdk@v14
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Fetch latest ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
gh run download -R X16Community/x16-rom -n "Release ROM Image" --dir latest_rom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy ROM symbols
run: |
cp latest_rom/*.h src/.
- name: Copy ROM
run: |
cp latest_rom/rom.bin .
- name: Build Emulator
run: |
make V=1 -j3 wasm
mkdir emu_binaries
cp x16emu.data x16emu.html x16emu.js x16emu.wasm emu_binaries/
mkdir emu_binaries/webassembly
cp webassembly/styles.css webassembly/main.js webassembly/jszip.min.js emu_binaries/webassembly/
file emu_binaries/*
- uses: actions/upload-artifact@v4
with:
name: x16emu_wasm
path: emu_binaries/*