forked from diasurgical/devilutionX
-
Notifications
You must be signed in to change notification settings - Fork 1
1645 lines (1483 loc) · 78.3 KB
/
nightly.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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Nightly
# Timed-trigger
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/30 0 * * *'
env:
buildDir: '${{ github.workspace }}/build'
jobs:
# Check if there was a commit in 24hours
build_check:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v4
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "should_run=false" >> $GITHUB_OUTPUT
# Windows-builds
# MSVC
build_msvc:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-MSVC
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
# x86 builds
- name: diablo-x86
packages: 'sdl2:x86-windows libsodium:x86-windows'
cmakeargs: '-A Win32 -D_WIN32_WINNT=0x0600 -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-x86.zip'
- name: hellfire-x86
packages: 'sdl2:x86-windows libsodium:x86-windows'
cmakeargs: '-A Win32 -D_WIN32_WINNT=0x0600 -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-x86.zip'
- name: hellmini-x86
packages: 'sdl2:x86-windows'
cmakeargs: '-A Win32 -D_WIN32_WINNT=0x0501 -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON -DHAS_JOYSTICK=OFF -DHAS_DPAD=OFF -DHAS_GAMECTRL=OFF -DHAS_TOUCHPAD=OFF -DHAS_KBCTRL=OFF -DNONET=ON -DNOSOUND=ON -DSCREEN_WIDTH=640 -DSCREEN_HEIGHT=480 -DNOWIDESCREEN=ON'
artifact: 'hellmini-nightly-x86.zip'
- name: hellsrv-x86
packages: 'sdl2:x86-windows libsodium:x86-windows'
cmakeargs: '-A Win32 -D_WIN32_WINNT=0x0501 -DNOHOSTING=OFF -DHOSTONLY=ON -DINET_MODE=ON -DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON -DHAS_JOYSTICK=OFF -DHAS_DPAD=OFF -DHAS_GAMECTRL=OFF -DHAS_TOUCHPAD=OFF -DHAS_KBCTRL=OFF -DNOSOUND=ON -DSCREEN_WIDTH=640 -DSCREEN_HEIGHT=480 -DNOWIDESCREEN=ON'
artifact: 'hellsrv-nightly-x86.zip'
# x64 builds
- name: diablo
packages: 'sdl2:x64-windows libsodium:x64-windows'
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-x64.zip'
- name: hellfire
packages: 'sdl2:x64-windows libsodium:x64-windows'
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-x64.zip'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Download and build vcpkg, without installing any port. If content is cached already, it is a no-op.
- name: Create Build Environment
uses: lukka/[email protected]
with:
vcpkgGitCommitId: '095ee06e7f60dceef7d713e3f8b1c2eb10d650d7'
#setupOnly: true
# Now that vcpkg is installed, it is being used to run with the desired arguments.
- name: Install Required Packages
run: |
vcpkg install ${{ matrix.packages }}
# Start-Process -Wait -NoNewWindow -FilePath "$env:VCPKG_ROOT\vcpkg" -ArgumentList "install ${{ matrix.packages }}"
# $VCPKG_ROOT/vcpkg install ${{ matrix.packages }}
#shell: bash
- name: Configure CMake
shell: bash
working-directory: ${{ env.buildDir }}
run: cmake .. ${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
- name: Build
working-directory: ${{ env.buildDir }}
shell: bash
# Execute the build (-j 2 : with two cores).
run: cmake --build . -j 2 --target package --config Release
# Upload the created artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{ env.buildDir }}/devilutionx.zip
name: ${{ matrix.artifact }}
# MingW 32bit
build_mingw:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-MingW
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
#name: [diablo-x86, hellfire-x86]
include:
# x86 builds
- name: diablo-x86
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-mingw-x86.zip'
- name: hellfire-x86
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-mingw-x86.zip'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 pkg-config-mingw-w64-i686 libz-mingw-w64-dev gettext dpkg-dev wget git sudo &&
sudo rm /usr/i686-w64-mingw32/lib/libz.dll.a &&
sudo Packaging/windows/mingw-prep.sh
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild ${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE=../CMake/mingwcc.toolchain.cmake
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
# Upload the created artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
path: build/devilutionx.zip
name: ${{ matrix.artifact }}
# MingW 64bit
build_mingw_x64:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-MingW-x64
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
# x64 builds
- name: diablo-x64
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-mingw-x64.zip'
- name: hellfire-x64
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-mingw-x64.zip'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y cmake gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 pkg-config-mingw-w64-x86-64 libz-mingw-w64-dev dpkg-dev wget git sudo &&
sudo rm /usr/x86_64-w64-mingw32/lib/libz.dll.a &&
sudo Packaging/windows/mingw-prep.sh
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild ${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE="Release" -DCMAKE_TOOLCHAIN_FILE=../CMake/mingwcc64.toolchain.cmake
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
# Upload the created artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
path: build/devilutionx.zip
name: ${{ matrix.artifact }}
# MingW Win9x
build_w98:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-MingW-Win9x
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
#name: [diablo-x86, hellfire-x86]
include:
# x86 builds
- name: diablo-w9x
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DUSE_PATCH=ON -DNONET=ON'
artifact: 'diablo-nightly-mingw-w9x.zip'
- name: hellfire-w9x
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DUSE_PATCH=ON -DNONET=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-mingw-w9x.zip'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools libz-mingw-w64-dev gettext dpkg-dev wget git sudo &&
sudo rm /usr/i686-w64-mingw32/lib/libz.dll.a &&
sudo Packaging/windows/mingw9x-prep.sh
- name: Configure CMake
shell: bash
working-directory: ${{ env.buildDir }}
run: cmake .. ${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../CMake/mingw9x.toolchain.cmake -DTARGET_PLATFORM=windows9x
- name: Build
working-directory: ${{ env.buildDir }}
shell: bash
run: cmake --build . -j $(nproc) --target package
# Upload the created artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{ env.buildDir }}/devilutionx.zip
name: ${{ matrix.artifact }}
# Linux-builds
# 64bit
build_linux64:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Linux-x64
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF'
artifact: 'diablo-nightly-x86_64-linux-gnu.tar.xz'
appimage: 'diablo-nightly-x86_64-linux-gnu.appimage'
- name: hellfire
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DHELLFIRE=ON'
artifact: 'hellfire-nightly-x86_64-linux-gnu.tar.xz'
appimage: 'hellfire-nightly-x86_64-linux-gnu.appimage'
- name: diablo-uxp
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-x86_64-linux-gnup.tar.xz'
appimage: 'diablo-nightly-x86_64-linux-gnup.appimage'
- name: hellfire-uxp
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-x86_64-linux-gnup.tar.xz'
appimage: 'hellfire-nightly-x86_64-linux-gnup.appimage'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: Packaging/nix/debian-host-prep.sh
#- name: Cache CMake build folder
# uses: actions/cache@v3
# with:
# path: build
# key: ${{ github.workflow }}-v1-${{ github.sha }}
# restore-keys: ${{ github.workflow }}-v1-
- name: Build
working-directory: ${{github.workspace}}
shell: bash
env:
CMAKE_BUILD_TYPE: ${{github.event_name == 'release' && 'Release' || 'RelWithDebInfo'}}
run: |
cmake -S. -Bbuild ${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCPACK=ON && \
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package
- name: Package
run: Packaging/nix/LinuxReleasePackaging.sh && mv devilutionx.tar.xz devilutionx-x86_64-linux-gnu.tar.xz
- name: Package AppImage
run: Packaging/nix/AppImage.sh && mv devilutionx.appimage devilutionx-x86_64-linux-gnu.appimage
- name: Upload Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
path: devilutionx-x86_64-linux-gnu.tar.xz
name: ${{ matrix.artifact }}
- name: Upload AppImage
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
path: devilutionx-x86_64-linux-gnu.appimage
name: ${{ matrix.appimage }}
# aarch64
build_aarch:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Aarch-x64
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo-aa64
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF'
artifact: 'diablo-nightly-aarch64.tar.xz'
- name: hellfire-aa64
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DHELLFIRE=ON'
artifact: 'hellfire-nightly-aarch64.tar.xz'
- name: diablo-aa64p
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-aarch64p.tar.xz'
- name: hellfire-aa64p
cmakeargs: '-DDEVILUTIONX_SYSTEM_LIBSODIUM=OFF -DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-aarch64p.tar.xz'
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: |
# Work around the somewhat broken packages in the GitHub Actions Ubuntu 20.04 image.
# https://github.com/actions/runner-images/issues/4620#issuecomment-981333260
sudo apt-get -y install --allow-downgrades libpcre2-8-0=10.34-7
Packaging/nix/debian-cross-aarch64-prep.sh
- name: Build
working-directory: ${{github.workspace}}
shell: bash
env:
CMAKE_BUILD_TYPE: ${{github.event_name == 'release' && 'Release' || 'RelWithDebInfo'}}
run: |
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=../CMake/aarch64-linux-gnu.toolchain.cmake \
${{ matrix.cmakeargs }} -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCPACK=ON && \
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package
- name: Package
run: Packaging/nix/LinuxReleasePackaging.sh && mv devilutionx.tar.xz devilutionx-aarch64.tar.xz
# AppImage cross-packaging is not implemented yet.
# - name: Package AppImage
# run: Packaging/nix/AppImage.sh && mv devilutionx.appimage devilutionx-aarch64.appimage
- name: Upload Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
path: devilutionx-aarch64.tar.xz
name: ${{ matrix.artifact }}
# Mac-builds
build_mac:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Mac
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo-mac
cmakeargs: '-DDEVILUTIONX_SYSTEM_SDL2=OFF'
artifact: 'diablo-nightly-mac.dmg'
- name: hellfire-mac
cmakeargs: '-DDEVILUTIONX_SYSTEM_SDL2=OFF -DHELLFIRE=ON'
artifact: 'hellfire-nightly-mac.dmg'
- name: diablo-macp
cmakeargs: '-DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-macp.dmg'
- name: hellfire-macp
cmakeargs: '-DDEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-macp.dmg'
runs-on: macos-11
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: brew bundle install
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild -DMACOSX_STANDALONE_APP_BUNDLE=ON ${{ matrix.cmakeargs }}
- name: Build
working-directory: ${{github.workspace}}
shell: bash
# Execute the build (-j 2 : with two cores).
run: cmake --build build -j $(sysctl -n hw.physicalcpu) --target package
# Upload the created artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{ env.buildDir }}/devilutionx.dmg
name: ${{ matrix.artifact }}
# iOS-builds
build_ios:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-IOS
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo-ios
cmakeargs: ''
artifact: 'diablo-nightly-ios.ipa'
- name: hellfire-ios
cmakeargs: '-DHELLFIRE=ON'
artifact: 'hellfire-nightly-ios.ipa'
- name: diablo-iosp
cmakeargs: '-DUSE_PATCH=ON'
artifact: 'diablo-nightly-iosp.ipa'
- name: hellfire-iosp
cmakeargs: '-DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-iosp.ipa'
runs-on: macos-11
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=../CMake/ios.toolchain.cmake -DENABLE_BITCODE=0 -DPLATFORM=OS64 ${{ matrix.cmakeargs }}
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: >
cmake --build build -j $(sysctl -n hw.physicalcpu) --config Release &&
cd build &&
rm -rf Payload devilutionx.ipa &&
mkdir Payload &&
mv devilutionx.app Payload &&
zip -r devilutionx.ipa Payload
# Upload the created artifact
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ${{ env.buildDir }}/devilutionx.ipa
name: ${{ matrix.artifact }}
# Android-builds
build_android:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Android
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
artifact: 'diablo-nightly-android.apk'
- name: hellfire
cmakearg0: '-DHELLFIRE=ON'
artifact: 'hellfire-nightly-android.apk'
- name: diablo-adrp
cmakearg0: '-DUSE_PATCH=ON'
artifact: 'diablo-nightly-androidp.apk'
- name: hellfire-adrp
cmakearg0: '-DUSE_PATCH=ON'
cmakearg1: '-DHELLFIRE=ON'
artifact: 'hellfire-nightly-androidp.apk'
runs-on: ubuntu-latest
steps:
- name: Install gettext
run: sudo apt-get update && sudo apt-get install -y gettext
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
# CMake version 3.21.3 causes gradle to throw a NullPointerException during the build
# Removing it will cause gradle to fall back on 3.18.1 installed by the Android SDK
- name: Remove system CMake
run: rm /usr/local/bin/cmake
#- name: Cache CMake build folder
# uses: actions/cache@v3
# with:
# path: android-project/app/.cxx
# key: ${{ github.workflow }}-v1-${{ github.sha }}
# restore-keys: ${{ github.workflow }}-v1-
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cd android-project && ./gradlew assembleRelease -Pcmakearg0="${{ matrix.cmakearg0 }}" -Pcmakearg1="${{ matrix.cmakearg1 }}" -Pcmakearg2="${{ matrix.cmakearg2 }}"
- name: Upload-Package
uses: actions/upload-artifact@v4
with:
#name: devilutionx-debug.apk
#path: android-project/app/build/outputs/apk/debug/app-debug.apk
name: ${{ matrix.artifact }}
path: android-project/app/build/outputs/apk/release/app-release-unsigned.apk
# rg350-builds
build_rg350:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-RG350
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-DZEROTIER=OFF'
artifact: 'diablo-nightly-rg350.opk'
- name: hellfire
cmakeargs: '-DZEROTIER=OFF -DHELLFIRE=ON'
artifact: 'hellfire-nightly-rg350.opk'
- name: diablo-rgp
cmakeargs: '-DZEROTIER=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-rg350p.opk'
- name: hellfire-rgp
cmakeargs: '-DZEROTIER=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-rg350p.opk'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# curl -L http://od.abstraction.se/opendingux/toolchain/opendingux-gcw0-toolchain.2021-10-22.tar.xz -o gcw0-toolchain.tar.xz &&
# curl -L http://od.abstraction.se/opendingux/toolchain/opendingux-gcw0-toolchain.2021-03-10.tar.xz -o gcw0-toolchain.tar.xz &&
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y curl cmake git squashfs-tools &&
curl -L https://github.com/OpenDingux/buildroot/releases/download/od-2022.09.22/opendingux-gcw0-toolchain.2022-09-22.tar.xz -o gcw0-toolchain.tar.xz &&
sudo mkdir -p /opt/gcw0-toolchain && sudo chown -R "${USER}:" /opt/gcw0-toolchain &&
tar -C /opt -xf gcw0-toolchain.tar.xz &&
cd /opt/gcw0-toolchain && ./relocate-sdk.sh
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: Packaging/OpenDingux/build.sh rg350 "${{ matrix.cmakeargs }}"
env:
TOOLCHAIN: /opt/gcw0-toolchain
- name: Upload-Package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: build-rg350/devilutionx-rg350.opk
# lepus-builds
build_lepus:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Lepus
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: ''
artifact: 'diablo-nightly-lepus.opk'
- name: hellfire
cmakeargs: '-DHELLFIRE=ON'
artifact: 'hellfire-nightly-lepus.opk'
- name: diablo-lepp
cmakeargs: '-DUSE_PATCH=ON'
artifact: 'diablo-nightly-lepusp.opk'
- name: hellfire-lepp
cmakeargs: '-DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-lepusp.opk'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# curl -L http://od.abstraction.se/opendingux/toolchain/opendingux-lepus-toolchain.2021-10-22.tar.xz -o lepus-toolchain.tar.xz &&
# curl -L http://od.abstraction.se/opendingux/toolchain/opendingux-lepus-toolchain.2021-03-11.tar.xz -o lepus-toolchain.tar.xz &&
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y curl cmake git squashfs-tools &&
curl -L https://github.com/OpenDingux/buildroot/releases/download/od-2022.09.22/opendingux-lepus-toolchain.2022-09-22.tar.xz -o lepus-toolchain.tar.xz &&
sudo mkdir -p /opt/lepus-toolchain && sudo chown -R "${USER}:" /opt/lepus-toolchain &&
tar -C /opt -xf lepus-toolchain.tar.xz &&
cd /opt/lepus-toolchain && ./relocate-sdk.sh
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: Packaging/OpenDingux/build.sh lepus "${{ matrix.cmakeargs }}"
env:
TOOLCHAIN: /opt/lepus-toolchain
- name: Upload-Package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: build-lepus/devilutionx-lepus.opk
# retrofw-builds
build_retrofw:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-RetroFW
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-DZEROTIER=OFF'
artifact: 'diablo-nightly-retrofw.opk'
- name: hellfire
cmakeargs: '-DZEROTIER=OFF -DHELLFIRE=ON'
artifact: 'hellfire-nightly-retrofw.opk'
- name: diablo-rtrp
cmakeargs: '-DZEROTIER=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-retrofwp.opk'
- name: hellfire-rtrp
cmakeargs: '-DZEROTIER=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-retrofwp.opk'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
#sudo apt-get install -y curl git smpq &&
#curl -L https://github.com/retrofw/buildroot/releases/download/2018.02.11/mipsel-linux-uclibc_x64.tar.gz -o retrofw-toolchain.tar.xz &&
#sudo mkdir -p /opt/mipsel-linux-uclibc && sudo chown -R "${USER}:" /opt/mipsel-linux-uclibc &&
#tar -C /opt -xvf retrofw-toolchain.tar.xz
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y curl cmake git squashfs-tools gettext &&
curl -L https://github.com/retrofw/retrofw.github.io/releases/download/v2.3/mipsel-RetroFW-linux-uclibc_sdk-buildroot.tar.gz -o retrofw-toolchain.tar.gz &&
sudo mkdir -p /opt/retrofw-toolchain && sudo chown -R "${USER}:" /opt/retrofw-toolchain &&
tar -C /opt/retrofw-toolchain --strip-components=1 -xf retrofw-toolchain.tar.gz &&
cd /opt/retrofw-toolchain && ./relocate-sdk.sh
#TOOLCHAIN: /opt/mipsel-linux-uclibc
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: Packaging/OpenDingux/build.sh retrofw "${{ matrix.cmakeargs }}"
env:
TOOLCHAIN: /opt/retrofw-toolchain
- name: Upload-Package
uses: actions/upload-artifact@v4
with:
#name: devilutionx-retrofw.opk.zip
name: ${{ matrix.artifact }}
path: build-retrofw/devilutionx-retrofw.opk
# ps4-builds
build_ps4:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-PS4
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF'
artifact: 'diablo-nightly-ps4.pkg'
- name: hellfire
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DHELLFIRE=ON'
artifact: 'hellfire-nightly-ps4.pkg'
- name: diablo-ps4p
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON'
artifact: 'diablo-nightly-ps4p.pkg'
- name: hellfire-ps4p
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DUSE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-ps4p.pkg'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y wget cmake git gettext &&
wget https://github.com/PacBrew/pacbrew-pacman/releases/download/v1.1/pacbrew-pacman-1.1.deb &&
sudo dpkg -i pacbrew-pacman-1.1.deb && sudo pacbrew-pacman -Sy &&
sudo pacbrew-pacman --noconfirm -S ps4-openorbis ps4-openorbis-portlibs &&
echo "#include <endian.h>" | sudo tee /opt/pacbrew/ps4/openorbis/include/sys/endian.h
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: Packaging/ps4/build.sh "${{ matrix.cmakeargs }}"
- name: Upload-Package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: build-ps4/devilutionx-ps4.pkg
# vita-builds
build_vita:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-VITA
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON'
artifact: 'diablo-nightly-vita.vpk'
- name: hellfire
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-vita.vpk'
- name: diablo-vita
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON -D USE_PATCH=ON'
artifact: 'diablo-nightly-vitap.vpk'
- name: hellfire-vita
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-vitap.vpk'
runs-on: ubuntu-latest
container: vitasdk/vitasdk:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: apk add git ninja gettext
- name: Configure CMake
run: |
cmake -S. -Bbuild -GNinja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} \
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake
- name: Build
run: cmake --build build -j $(sysctl -n hw.physicalcpu)
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: build/devilutionx.vpk
# n3ds-builds
build_n3ds:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Nintendo 3DS
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-DNONET=ON'
artifact: 'diablo-nightly-3ds.3dsx'
cia: 'diablo-nightly-3ds.cia'
- name: hellfire
cmakeargs: '-DNONET=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-3ds.3dsx'
cia: 'hellfire-nightly-3ds.cia'
- name: diablo-3ds
cmakeargs: '-DNONET=ON -D USE_PATCH=ON'
artifact: 'diablo-nightly-3dsp.3dsx'
cia: 'diablo-nightly-3dsp.cia'
- name: hellfire-3ds
cmakeargs: '-DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-3dsp.3dsx'
cia: 'hellfire-nightly-3dsp.cia'
runs-on: ubuntu-latest
container: devkitpro/devkitarm:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
ffmpeg \
gettext
- name: Get external dependencies
run: |
wget https://github.com/diasurgical/bannertool/releases/download/1.2.0/bannertool.zip
unzip -j "bannertool.zip" "linux-x86_64/bannertool" -d "/opt/devkitpro/tools/bin"
wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18/makerom-v0.18-ubuntu_x86_64.zip
unzip "makerom-v0.18-ubuntu_x86_64.zip" "makerom" -d "/opt/devkitpro/tools/bin"
chmod a+x /opt/devkitpro/tools/bin/makerom
- name: Configure CMake
run: |
cmake -S. -Bbuild -GNinja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} -DNINTENDO_3DS=ON \
-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake
- name: Build DevilutionX
run: cmake --build build -j$(nproc)
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: build/devilutionx.3dsx
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.cia }}
path: build/devilutionx.cia
# switch-builds
build_switch:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Nintendo Switch
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON'
artifact: 'diablo-nightly-switch.nro'
- name: hellfire
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-switch.nro'
- name: diablo-switch
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON -D USE_PATCH=ON'
artifact: 'diablo-nightly-switchp.nro'
- name: hellfire-switch
cmakeargs: '-D DEVILUTIONX_SYSTEM_SDL2=OFF -DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-switchp.nro'
runs-on: ubuntu-latest
container: devkitpro/devkita64:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Create Build Environment
# run: brew bundle install
- name: Install dependencies
shell: bash
run: |
apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
gettext
- name: Configure CMake
run: |
cmake -S . -B build \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} \
-D CMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake
- name: Build DevilutionX
run: cmake --build build -j$(nproc)
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ./build/devilutionx.nro
# amiga-builds
build_amiga:
needs: build_check
if: ${{ needs.build_check.outputs.should_run != 'false' }}
name: Nightly-Amiga M68K
strategy:
fail-fast: false
matrix:
#name: [diablo, hellfire]
include:
- name: diablo
cmakeargs: '-DNONET=ON'
artifact: 'diablo-nightly-amiga'
- name: hellfire
cmakeargs: '-DNONET=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-amiga'
- name: diablo-amiga
cmakeargs: '-DNONET=ON -D USE_PATCH=ON'
artifact: 'diablo-nightly-amigap'
- name: hellfire-amiga
cmakeargs: '-DNONET=ON -D USE_PATCH=ON -DHELLFIRE=ON'
artifact: 'hellfire-nightly-amigap'
runs-on: ubuntu-latest
container: amigadev/crosstools:m68k-amigaos-gcc10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run prep.sh script
run: Packaging/amiga/prep.sh
- name: Configure CMake
run: |
cmake -S. -Bbuild -GNinja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmakeargs }} \
-DM68K_COMMON="-s -ffast-math -O3" \
-DM68K_CPU=68040 \
-DM68K_FPU=hard
- name: Build DevilutionX
run: cmake --build build
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ./build/devilutionx
# Releases
release:
needs: [build_check, build_msvc, build_mingw, build_mingw_x64, build_w98, build_linux64, build_aarch, build_mac, build_ios, build_android, build_rg350, build_lepus, build_retrofw, build_ps4, build_vita, build_n3ds, build_switch, build_amiga]
if: ${{ needs.build_check.outputs.should_run != 'false' }}
#runs-on: windows-latest
runs-on: ubuntu-latest
steps:
# Windows-builds (x86)
- name: Download a diablo artifact
uses: actions/download-artifact@v4
with:
name: diablo-nightly-x86.zip
- run: mv ${{github.workspace}}/devilutionx.zip ${{github.workspace}}/diablo-nightly-x86.zip
- name: Download a hellfire artifact
uses: actions/download-artifact@v4
with:
name: hellfire-nightly-x86.zip
- run: mv ${{github.workspace}}/devilutionx.zip ${{github.workspace}}/hellfire-nightly-x86.zip
- name: Download a diablo artifact
uses: actions/download-artifact@v4
with:
name: hellmini-nightly-x86.zip
- run: mv ${{github.workspace}}/devilutionx.zip ${{github.workspace}}/hellmini-nightly-x86.zip
- name: Download a diablo artifact
uses: actions/download-artifact@v4
with: