-
-
Notifications
You must be signed in to change notification settings - Fork 493
544 lines (457 loc) · 16 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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
name: Build
on: [push, pull_request]
# as recommended by: https://github.com/actions/checkout/issues/1590
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
# === Windows XP ===
winxp:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-winxp"
path: |
build/bin/tic80.exe
build/bin/*.dll
- name: Build Pro
shell: cmd
run: |
COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
# === Windows ===
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-windows"
path: |
build/bin/tic80.exe
build/bin/*.dll
- name: Build Pro
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
# === Windows MinGW-64 ===
windows-mingw:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Setup Mingw
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
base-devel
git
gcc
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build
shell: bash
run: |
cd build
cmake -G "MSYS Makefiles" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=ON -DBUILD_WITH_JANET=OFF ..
cmake --build . --config MinSizeRel --parallel
# === Ubuntu ===
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install
run: |
sudo apt-get update
sudo apt-get install libglu1-mesa-dev libasound2-dev libpulse-dev libaudio-dev libsamplerate0-dev libcurl4-openssl-dev -y
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-linux"
path: |
build/bin/tic80
build/bin/*.so
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
# === Raspberry PI ===
rpi:
runs-on: ubuntu-latest
container: nesbox/rpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi"
path: |
build/bin/tic80
build/bin/*.so
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_PRO=On -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake ..
cmake --build . --config MinSizeRel --parallel
# === Raspberry PI 1-4 Bare Metal ===
rpi-baremetal:
runs-on: ubuntu-latest
container: nesbox/baremetalpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full
- name: Prebuild
run: |
cd vendor
git clone --recursive https://github.com/smuehlst/circle-stdlib
cd circle-stdlib
git checkout fdb3c4a948421d47fddab8042a92f980cba43915
git submodule update --recursive
./configure -r 3
make -j$(nproc)
cd libs/circle/addon/vc4/sound/
make -j$(nproc)
cd ../vchiq
make -j$(nproc)
cd ../../linux
make -j$(nproc)
- name: Build
run: |
git apply build/baremetalpi/circle.patch
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake -DBUILD_WITH_ALL=ON ..
make tic80studio -j$(nproc)
cd baremetalpi
make -j$(nproc)
cd ../../vendor/circle-stdlib/libs/circle/boot/
make -j$(nproc)
- name: Pack
run: |
cp build/baremetalpi/kernel8-32.img vendor/circle-stdlib/libs/circle/boot/kernel.img
cp build/baremetalpi/boot/config.txt vendor/circle-stdlib/libs/circle/boot/config.txt
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi-baremetal"
path: |
vendor/circle-stdlib/libs/circle/boot/config.txt
vendor/circle-stdlib/libs/circle/boot/kernel.img
vendor/circle-stdlib/libs/circle/boot/bootcode.bin
vendor/circle-stdlib/libs/circle/boot/start.elf
vendor/circle-stdlib/libs/circle/boot/fixup.dat
vendor/circle-stdlib/libs/circle/boot/LICENCE.broadcom
# === Raspberry PI 4 Bare Metal ===
rpi4-baremetal:
runs-on: ubuntu-latest
container: nesbox/baremetalpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full
- name: Prebuild
run: |
cd vendor
git clone --recursive https://github.com/smuehlst/circle-stdlib
cd circle-stdlib
git checkout fdb3c4a948421d47fddab8042a92f980cba43915
git submodule update --recursive
./configure -r 4
make -j$(nproc)
cd libs/circle/addon/vc4/sound/
make -j$(nproc)
cd ../vchiq
make -j$(nproc)
cd ../../linux
make -j$(nproc)
- name: Build
run: |
git apply build/baremetalpi/circle.patch
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake -DBUILD_WITH_ALL=ON ..
make tic80studio -j$(nproc)
cd baremetalpi
make -j$(nproc)
cd ../../vendor/circle-stdlib/libs/circle/boot/
make -j$(nproc)
- name: Pack
run: |
cp build/baremetalpi/kernel7l.img vendor/circle-stdlib/libs/circle/boot/kernel.img
cp build/baremetalpi/boot/config.txt vendor/circle-stdlib/libs/circle/boot/config.txt
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi4-baremetal"
path: |
vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-4-b.dtb
vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-cm4.dtb
vendor/circle-stdlib/libs/circle/boot/bootcode.bin
vendor/circle-stdlib/libs/circle/boot/config.txt
vendor/circle-stdlib/libs/circle/boot/COPYING.linux
vendor/circle-stdlib/libs/circle/boot/fixup4.dat
vendor/circle-stdlib/libs/circle/boot/kernel.img
vendor/circle-stdlib/libs/circle/boot/LICENCE.broadcom
vendor/circle-stdlib/libs/circle/boot/start4.elf
# === Nintendo 3DS build ===
nintendo-3ds:
runs-on: ubuntu-latest
container: devkitpro/devkitarm:latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full
- name: Build
run: |
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/cmake/3DS.cmake -DN3DS=TRUE -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=ON -DBUILD_WITH_SCHEME=OFF -DBUILD_WITH_JS=OFF -DBUILD_WITH_PYTHON=OFF ..
make -j$(nproc)
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-nintendo-3ds"
path: build/bin/tic80.3dsx
# === MacOS 12 ===
macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install
run: brew uninstall --ignore-dependencies libidn2
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-macos"
path: |
build/bin/tic80
build/bin/*.dylib
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
# === MacOS 14 / arm64 ===
macos-arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install
run: brew uninstall --ignore-dependencies libidn2
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-macos-arm64"
path: |
build/bin/tic80
build/bin/*.dylib
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
# === Android ===
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21e
add-to-path: false
local-cache: true
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Build
run: |
cd build/android
chmod +x gradlew
./gradlew assembleRelease
cp app/build/outputs/apk/release/app-release.apk tic80.apk
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-android"
path: build/android/tic80.apk
# === HTML ===
html:
runs-on: ubuntu-latest
steps:
- uses: mymindstorm/setup-emsdk@v14
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build lua
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=ON -DTIC80_TARGET=tic80lua .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build ruby
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_RUBY=ON -DTIC80_TARGET=tic80ruby .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build js
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_JS=ON -DTIC80_TARGET=tic80js .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build moon
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_MOON=ON -DTIC80_TARGET=tic80moon .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build fennel
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_FENNEL=ON -DTIC80_TARGET=tic80fennel .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build scheme
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_SCHEME=ON -DTIC80_TARGET=tic80scheme .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build squirrel
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_SQUIRREL=ON -DTIC80_TARGET=tic80squirrel .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build wren
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_WREN=ON -DTIC80_TARGET=tic80wren .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build wasm
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_WASM=ON -DTIC80_TARGET=tic80wasm .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build janet
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_JANET=ON -DTIC80_TARGET=tic80janet .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build python
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_LUA=OFF -DBUILD_WITH_PYTHON=ON -DTIC80_TARGET=tic80python .. --fresh
cmake --build . --config MinSizeRel --parallel
- name: Build all
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=ON .. --fresh
cmake --build . --config MinSizeRel --parallel
cp html/index.html bin/index.html
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-html"
path: |
build/bin/*