-
Notifications
You must be signed in to change notification settings - Fork 13
1075 lines (986 loc) · 46.3 KB
/
cibuild.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: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-alpine-x86:
name: Alpine ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [x86]
steps:
- uses: actions/checkout@v4
- name: Install latest stable Alpine Linux
uses: jirutka/setup-alpine@master
with:
arch: ${{ matrix.Platform }}
branch: 'latest-stable'
packages: build-base cmake bison flex nasm xz sed sdl2-dev zlib-dev libogg-dev libvorbis-dev vulkan-loader vulkan-loader-dev vulkan-headers
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Run Prepare
shell: alpine.sh {0}
run: |
cd ${{github.workspace}}
find . -name "CMakeLists.txt" -exec sed -i 's/-march=native/-mtune=generic/g' {} +
mkdir x32 && mkdir x32/SamTFE && mkdir x32/SamTFE/Mods && mkdir x32/SamTFE/Mods/XPLUS
mkdir x32/SamTSE && mkdir x32/SamTSE/Mods && mkdir x32/SamTSE/Mods/XPLUS
- name: Run Build
shell: alpine.sh {0}
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-x86 -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DCMAKE_C_FLAGS=-mmmx -DCMAKE_CXX_FLAGS=-mmmx -DUSE_I386_NASM_ASM=TRUE
cd ${{github.workspace}}/build-x86
make -j$(nproc || echo 4)
make install
mv -f ${{github.workspace}}/SamTFE/Bin ${{github.workspace}}/x32/SamTFE
mv -f ${{github.workspace}}/SamTSE/Bin ${{github.workspace}}/x32/SamTSE
- name: Run Build XPLUS
shell: alpine.sh {0}
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-x86-xplus -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DCMAKE_C_FLAGS=-mmmx -DCMAKE_CXX_FLAGS=-mmmx -DUSE_I386_NASM_ASM=TRUE -DXPLUS=TRUE
cd ${{github.workspace}}/build-x86-xplus
make -j$(nproc || echo 4)
make install
mv -f ${{github.workspace}}/SamTFE/Mods/XPLUS/Bin ${{github.workspace}}/x32/SamTFE/Mods/XPLUS
mv -f ${{github.workspace}}/SamTSE/Mods/XPLUS/Bin ${{github.workspace}}/x32/SamTSE/Mods/XPLUS
echo "*** Create archive ***"
cd ${{github.workspace}}
cp -fr SamTFE/SE1_10b.gro x32/SamTFE
cp -fr SamTFE/ModEXT.txt x32/SamTFE
cp -fr SamTSE/SE1_10b.gro x32/SamTSE
cp -fr SamTSE/ModEXT.txt x32/SamTSE
tar -cJpvf SeriousSamClassic-${{ steps.date.outputs.time }}-alpine-x86-bin.tar.xz x32
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-alpine-x86-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-alpine-x86-bin.tar.xz
build-alpine-64:
name: Alpine ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [x86_64]
steps:
- uses: actions/checkout@v4
- name: Install latest stable Alpine Linux
uses: jirutka/setup-alpine@master
with:
arch: ${{ matrix.Platform }}
branch: 'latest-stable'
packages: build-base cmake bison flex nasm xz sed sdl2-dev zlib-dev libogg-dev libvorbis-dev vulkan-loader vulkan-loader-dev vulkan-headers
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Run Prepare
shell: alpine.sh {0}
run: |
cd ${{github.workspace}}
find . -name "CMakeLists.txt" -exec sed -i 's/-march=native/-mtune=generic/g' {} +
mkdir x64 && mkdir x64/SamTFE && mkdir x64/SamTFE/Mods && mkdir x64/SamTFE/Mods/XPLUS
mkdir x64/SamTSE && mkdir x64/SamTSE/Mods && mkdir x64/SamTSE/Mods/XPLUS
- name: Run Build
shell: alpine.sh {0}
run: |
cd ${{github.workspace}}
CFLAGS="-w" CXXFLAGS="-w" cmake -B ${{github.workspace}}/build-x64 -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }}
cd ${{github.workspace}}/build-x64
make -j$(nproc || echo 4)
make install
mv -f ${{github.workspace}}/SamTFE/Bin ${{github.workspace}}/x64/SamTFE
mv -f ${{github.workspace}}/SamTSE/Bin ${{github.workspace}}/x64/SamTSE
- name: Run Build XPLUS
shell: alpine.sh {0}
run: |
cd ${{github.workspace}}
CFLAGS="-w" CXXFLAGS="-w" cmake -B ${{github.workspace}}/build-x64-xplus -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DXPLUS=TRUE
cd ${{github.workspace}}/build-x64-xplus
make -j$(nproc || echo 4)
make install
mv -f ${{github.workspace}}/SamTFE/Mods/XPLUS/Bin ${{github.workspace}}/x64/SamTFE/Mods/XPLUS
mv -f ${{github.workspace}}/SamTSE/Mods/XPLUS/Bin ${{github.workspace}}/x64/SamTSE/Mods/XPLUS
echo "*** Create archive ***"
cd ${{github.workspace}}
cp -fr SamTFE/SE1_10b.gro x64/SamTFE
cp -fr SamTFE/ModEXT.txt x64/SamTFE
cp -fr SamTSE/SE1_10b.gro x64/SamTSE
cp -fr SamTSE/ModEXT.txt x64/SamTSE
tar -cJpvf SeriousSamClassic-${{ steps.date.outputs.time }}-alpine-x86_64-bin.tar.xz x64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-alpine-x86_64-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-alpine-x86_64-bin.tar.xz
build-ubuntu-x64:
name: Ubuntu ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [x64]
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -qq
sudo apt-get install -qq -y libsdl2-dev libogg-dev libvorbis-dev &&
sudo apt-get install -qq -y bison flex zlib1g-dev libxxhash-dev &&
sudo apt-get install libvulkan1 libvulkan-dev vulkan-validationlayers vulkan-validationlayers-dev
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Prepare
run: |
cd ${{github.workspace}}
find . -name "CMakeLists.txt" -exec sed -i 's/-march=native/-mtune=generic/g' {} +
mkdir {x64,x64/SamTFE,x64/SamTFE/Mods,x64/SamTFE/Mods/XPLUS,x64/SamTSE,x64/SamTSE/Mods,x64/SamTSE/Mods/XPLUS,}
- name: Run Build
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-x64 -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }}
cd ${{github.workspace}}/build-x64
make -j$(nproc || echo 4)
make install
mv -f ${{github.workspace}}/SamTFE/Bin ${{github.workspace}}/x64/SamTFE
mv -f ${{github.workspace}}/SamTSE/Bin ${{github.workspace}}/x64/SamTSE
- name: Run Build XPLUS
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-x64-xplus -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DXPLUS=TRUE
cd ${{github.workspace}}/build-x64-xplus
make -j$(nproc || echo 4)
make install
mv -f ${{github.workspace}}/SamTFE/Mods/XPLUS/Bin ${{github.workspace}}/x64/SamTFE/Mods/XPLUS
mv -f ${{github.workspace}}/SamTSE/Mods/XPLUS/Bin ${{github.workspace}}/x64/SamTSE/Mods/XPLUS
echo "*** Create archive ***"
cd ${{github.workspace}}
cp -fr {SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} x64/SamTFE
cp -fr {SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} x64/SamTSE
tar -cJpvf SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-amd64-bin.tar.xz x64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-amd64-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-amd64-bin.tar.xz
build-windows-x86:
name: Windows ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [Win32]
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
with:
vs-version: '14.0'
- name: Setup Vulkan
run: |
$ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows
echo Version $ver
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe
echo Downloaded
.\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.32bit
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: MS Build SamTFE XPLUS
working-directory: SamTFE\Sources
run: |
echo "*** Prepare sources and build SamTFE XPLUS ***"
del Entities\PlayerWeapons.es
copy Entities\PlayerWeaponsHD.es Entities\PlayerWeapons.es
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTFE.sln
echo "*** Prepare directories ***"
cd ${{github.workspace}}
mkdir x32 && mkdir x32\SamTFE && mkdir x32\SamTFE\Bin && mkdir x32\SamTFE\Mods\XPLUS && mkdir x32\SamTFE\Mods\XPLUS\Bin
echo "*** Copy SamTFE XPLUS Libraries ***"
copy SamTFE\Bin\Entities.dll x32\SamTFE\Mods\XPLUS\Bin
copy SamTFE\Bin\Game.dll x32\SamTFE\Mods\XPLUS\Bin
del SamTFE\Bin\*.*
- name: MS Build SamTFE
working-directory: SamTFE\Sources
run: |
echo "*** Prepare sources and clean && build SamTFE ***"
del Entities\PlayerWeapons.es
copy Entities\PlayerWeapons_old.es Entities\PlayerWeapons.es
msbuild /t:Clean /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTFE.sln
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTFE.sln
echo "*** Copy SamTFE Libraries and Executables ***"
cd ${{github.workspace}}
del SamTFE\Bin\*.lib
del SamTFE\Bin\*.map
copy SamTFE\Bin\*.* x32\SamTFE\Bin
- name: MS Build SamTSE XPLUS
working-directory: SamTSE\Sources
run: |
echo "*** Prepare sources and build SamTSE XPLUS ***"
del Entities\PlayerWeapons.es
copy Entities\PlayerWeaponsHD.es Entities\PlayerWeapons.es
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTSE.sln
echo "*** Prepare directories ***"
cd ${{github.workspace}}
mkdir x32\SamTSE && mkdir x32\SamTSE\Bin && mkdir x32\SamTSE\Mods && mkdir x32\SamTSE\Mods\XPLUS && mkdir x32\SamTSE\Mods\XPLUS\Bin
echo "*** Copy SamTSE XPLUS Libraries ***"
copy SamTSE\Bin\EntitiesMP.dll x32\SamTSE\Mods\XPLUS\Bin
copy SamTSE\Bin\GameMP.dll x32\SamTSE\Mods\XPLUS\Bin
del SamTSE\Bin\*.*
- name: MS Build SamTSE
working-directory: SamTSE\Sources
run: |
echo "*** Prepare sources and clean && build SamTSE ***"
del Entities\PlayerWeapons.es
copy Entities\PlayerWeapons_old.es Entities\PlayerWeapons.es
msbuild /t:Clean /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTSE.sln
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTSE.sln
echo "*** Copy SamSFE Libraries and Executables ***"
cd ${{github.workspace}}
del SamTSE\Bin\*.lib
del SamTSE\Bin\*.map
copy SamTSE\Bin\*.* x32\SamTSE\Bin
echo "*** Copy Data files ***"
copy SamTFE\SE1_10b.gro x32\SamTFE
copy SamTFE\ModEXT.txt x32\SamTFE
copy SamTSE\SE1_10b.gro x32\SamTSE
copy SamTSE\ModEXT.txt x32\SamTSE
echo "*** Create archive ***"
7z a -mx=9 SeriousSamClassic-${{ steps.date.outputs.time }}-win32-bin.7z x32
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-win32-bin.7z
path: SeriousSamClassic-${{ steps.date.outputs.time }}-win32-bin.7z
build-windows-x64:
name: Windows ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [x64]
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
with:
vs-version: '14.0'
- name: Setup Vulkan
run: |
$ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows
echo Version $ver
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe
echo Downloaded
.\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: MS Build SamTFE XPLUS
working-directory: SamTFE\Sources
run: |
echo "*** Prepare sources and build SamTFE XPLUS ***"
del Entities\PlayerWeapons.es
copy Entities\PlayerWeaponsHD.es Entities\PlayerWeapons.es
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTFE.sln
echo "*** Prepare directories ***"
cd ${{github.workspace}}
mkdir x64 && mkdir x64\SamTFE && mkdir x64\SamTFE\Bin && mkdir x64\SamTFE\Mods && mkdir x64\SamTFE\Mods\XPLUS && mkdir x64\SamTFE\Mods\XPLUS\Bin
echo "*** Copy SamTFE XPLUS Libraries ***"
copy SamTFE\Bin\Entities.dll x64\SamTFE\Mods\XPLUS\Bin
copy SamTFE\Bin\Game.dll x64\SamTFE\Mods\XPLUS\Bin
del SamTFE\Bin\*.*
- name: MS Build SamTFE
working-directory: SamTFE\Sources
run: |
echo "*** Prepare sources and clean && build SamTFE ***"
del Entities\PlayerWeapons.es
copy Entities\PlayerWeapons_old.es Entities\PlayerWeapons.es
msbuild /t:Clean /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTFE.sln
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTFE.sln
echo "*** Copy SamTFE Libraries and Executables ***"
cd ${{github.workspace}}
del SamTFE\Bin\*.lib
del SamTFE\Bin\*.map
copy SamTFE\Bin\*.* x64\SamTFE\Bin
- name: MS Build SamTSE XPLUS
working-directory: SamTSE\Sources
run: |
echo "*** Prepare sources and build SamTSE XPLUS ***"
del EntitiesMP\PlayerWeapons.es
copy EntitiesMP\PlayerWeaponsHD.es EntitiesMP\PlayerWeapons.es
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTSE.sln
echo "*** Prepare directories ***"
cd ${{github.workspace}}
mkdir x64\SamTSE && mkdir x64\SamTSE\Bin && mkdir x64\SamTSE\Mods && mkdir x64\SamTSE\Mods\XPLUS && mkdir x64\SamTSE\Mods\XPLUS\Bin
echo "*** Copy SamTSE XPLUS Libraries ***"
copy SamTSE\Bin\EntitiesMP.dll x64\SamTSE\Mods\XPLUS\Bin
copy SamTSE\Bin\GameMP.dll x64\SamTSE\Mods\XPLUS\Bin
del SamTSE\Bin\*.*
- name: MS Build SamTSE
working-directory: SamTSE\Sources
run: |
echo "*** Prepare sources and clean && build SamTSE ***"
del EntitiesMP\PlayerWeapons.es
copy EntitiesMP\PlayerWeapons_old.es EntitiesMP\PlayerWeapons.es
msbuild /t:Clean /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTSE.sln
msbuild /m /p:Configuration="${{ matrix.Configuration }}" /p:Platform="${{ matrix.Platform }}" SamTSE.sln
echo "*** Copy SamTSE Libraries and Executables ***"
cd ${{github.workspace}}
del SamTSE\Bin\*.lib
del SamTSE\Bin\*.map
copy SamTSE\Bin\*.* x64\SamTSE\Bin
echo "*** Copy Data files ***"
copy SamTFE\SE1_10b.gro x64\SamTFE
copy SamTFE\ModEXT.txt x64\SamTFE
copy SamTSE\SE1_10b.gro x64\SamTSE
copy SamTSE\ModEXT.txt x64\SamTSE
echo "*** Create archive ***"
7z a -mx=9 SeriousSamClassic-${{ steps.date.outputs.time }}-win64-bin.7z x64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-win64-bin.7z
path: SeriousSamClassic-${{ steps.date.outputs.time }}-win64-bin.7z
build-freebsd-x64:
name: FreeBSD ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: macos-12
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [x64]
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Build on FreeBSD
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
architecture: x86-64
version: '13.1'
shell: bash
run: |
uname -a
sudo pkg install -y bison flex sdl2 libogg libvorbis zlib-ng cmake vulkan-headers
cd ${{github.workspace}}
mkdir {x64,x64/SamTFE,x64/SamTFE/Mods,x64/SamTFE/Mods/XPLUS,x64/SamTSE,x64/SamTSE/Mods,x64/SamTSE/Mods/XPLUS}
echo "*** Build ***"
cd ${{github.workspace}}/SamTFE/Sources
awk '{sub("-march=native","-mtune=generic")}1' CMakeLists.txt > CmakeTemp.txt && mv CmakeTemp.txt CMakeLists.txt
cat CMakeLists.txt | grep mtune
cd ${{github.workspace}}/SamTSE/Sources
awk '{sub("-march=native","-mtune=generic")}1' CMakeLists.txt > CmakeTemp.txt && mv CmakeTemp.txt CMakeLists.txt
cat CMakeLists.txt | grep mtune
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-x64 -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }}
cd ${{github.workspace}}/build-x64
make -j$(sysctl -n hw.ncpu || echo 4)
make install
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-x64-xplus -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DXPLUS=TRUE
cd ${{github.workspace}}/build-x64-xplus
make -j$(sysctl -n hw.ncpu || echo 4)
make install
echo "*** Prepare Archive ***"
cd ${{github.workspace}}
mv -f ${{github.workspace}}/SamTFE/Bin ${{github.workspace}}/x64/SamTFE
mv -f ${{github.workspace}}/SamTSE/Bin ${{github.workspace}}/x64/SamTSE
mv -f ${{github.workspace}}/SamTFE/Mods/XPLUS/Bin ${{github.workspace}}/x64/SamTFE/Mods/XPLUS
mv -f ${{github.workspace}}/SamTSE/Mods/XPLUS/Bin ${{github.workspace}}/x64/SamTSE/Mods/XPLUS
cp -vfr {SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} x64/SamTFE
cp -vfr {SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} x64/SamTSE
echo "*** Create archive ***"
XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf SeriousSamClassic-${{ steps.date.outputs.time }}-bsd-amd64-bin.tar.xz x64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-bsd-amd64-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-bsd-amd64-bin.tar.xz
build-macos-x64:
name: macOS ${{ matrix.Configuration }} ${{ matrix.Platform }}
runs-on: macos-12
strategy:
fail-fast: false
matrix:
Configuration: [Release]
Platform: [x64]
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Build on macOS
run: |
uname -a
brew install bison flex sdl2 libogg libvorbis zlib-ng cmake vulkan-loader vulkan-headers
cd ${{github.workspace}}
mkdir {x64,x64/SamTFE,x64/SamTFE/Mods,x64/SamTFE/Mods/XPLUS,x64/SamTFE/Mods/XPLUS/Bin,x64/SamTFE/Bin,x64/SamTSE,x64/SamTSE/Mods,x64/SamTSE/Mods/XPLUS,x64/SamTSE/Mods/XPLUS/Bin,x64/SamTSE/Bin}
echo "*** Build SamTFE ***"
cd ${{github.workspace}}/SamTFE/Sources
awk '{sub("-march=native","-mtune=generic")}1' CMakeLists.txt > CmakeTemp.txt && mv CmakeTemp.txt CMakeLists.txt
cat CMakeLists.txt | grep mtune
cmake -B ${{github.workspace}}/SamTFE/Sources/build-x64
cd ${{github.workspace}}/SamTFE/Sources/build-x64
make -j$(sysctl -n hw.ncpu || echo 4)
cd ${{github.workspace}}/SamTFE/Sources
cmake -B ${{github.workspace}}/SamTFE/Sources/build-x64-xplus -DXPLUS=TRUE
cd ${{github.workspace}}/SamTFE/Sources/build-x64-xplus
make -j$(sysctl -n hw.ncpu || echo 4)
echo "*** Build SamTSE ***"
cd ${{github.workspace}}/SamTSE/Sources
awk '{sub("-march=native","-mtune=generic")}1' CMakeLists.txt > CmakeTemp.txt && mv CmakeTemp.txt CMakeLists.txt
cat CMakeLists.txt | grep mtune
cmake -B ${{github.workspace}}/SamTSE/Sources/build-x64
cd ${{github.workspace}}/SamTSE/Sources/build-x64
make -j$(sysctl -n hw.ncpu || echo 4)
cd ${{github.workspace}}/SamTSE/Sources
cmake -B ${{github.workspace}}/SamTSE/Sources/build-x64-xplus -DXPLUS=TRUE
cd ${{github.workspace}}/SamTSE/Sources/build-x64-xplus
make -j$(sysctl -n hw.ncpu || echo 4)
echo "*** Prepare Archive ***"
cd ${{github.workspace}}
cp -vfr SamTFE/Sources/build-x64/Debug/*.dylib x64/SamTFE/Bin
cp -vfr SamTFE/Sources/build-x64/{DedicatedServer,TEXConv,MakeFONT,SeriousSam} x64/SamTFE/Bin
cp -vfr SamTFE/Sources/build-x64-xplus/Debug/libEntities.dylib x64/SamTFE/Mods/XPLUS/Bin
cp -vfr SamTFE/Sources/build-x64-xplus/Debug/libGame.dylib x64/SamTFE/Mods/XPLUS/Bin
cp -vfr SamTSE/Sources/build-x64/Debug/*.dylib x64/SamTSE/Bin
cp -vfr SamTSE/Sources/build-x64/{DedicatedServer,TEXConv,MakeFONT,SeriousSam} x64/SamTSE/Bin
cp -vfr SamTSE/Sources/build-x64-xplus/Debug/libEntitiesMP.dylib x64/SamTSE/Mods/XPLUS/Bin
cp -vfr SamTSE/Sources/build-x64-xplus/Debug/libGameMP.dylib x64/SamTSE/Mods/XPLUS/Bin
cp -vfr {SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} x64/SamTFE
cp -vfr {SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} x64/SamTSE
echo "*** Create archive ***"
XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf SeriousSamClassic-${{ steps.date.outputs.time }}-macos-amd64-bin.tar.xz x64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-macos-amd64-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-macos-amd64-bin.tar.xz
build-raspios-armv7l:
name: RPi OS Lite ${{ matrix.Configuration }} ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [armv7l]
Configuration: [Release]
include:
- arch: armv7l
cpu: cortex-a53
base_image: raspios_lite:latest
cpu_info: cpuinfo/raspberrypi_3b
steps:
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- uses: pguyot/arm-runner-action@v2
with:
image_additional_mb: 2048
base_image: ${{ matrix.base_image }}
cpu: ${{ matrix.cpu }}
cpu_info: ${{ matrix.cpu_info }}
shell: /bin/bash
copy_artifact_path: Release
commands: |
mkdir Release
test `uname -m` = ${{ matrix.arch }}
grep Model /proc/cpuinfo
apt-get update -y --allow-releaseinfo-change
apt-get install --no-install-recommends -y git bison flex cmake make gcc libc6-dev libsdl2-dev libogg-dev libvorbis-dev zlib1g-dev libvulkan1 libvulkan-dev
cat /proc/cpuinfo
cat /etc/os-release
mkdir {x32,x32/SamTFE,x32/SamTFE/Mods,x32/SamTFE/Mods/XPLUS,x32/SamTSE,x32/SamTSE/Mods,x32/SamTSE/Mods/XPLUS}
uname -a
gcc -c -Q -mcpu=native --help=target
git clone https://github.com/tx00100xt/SeriousSamClassic.git
echo "***build ***"
cmake SeriousSamClassic -B SeriousSamClassic/build-armv7l -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DRPI4=TRUE
make -j4 -C SeriousSamClassic/build-armv7l
make -C SeriousSamClassic/build-armv7l install
echo "*** build XPLUS ***"
cmake SeriousSamClassic -B SeriousSamClassic/build-armv7l-xplus -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DXPLUS=TRUE -DRPI4=TRUE
make -j4 -C SeriousSamClassic/build-armv7l-xplus
make -C SeriousSamClassic/build-armv7l-xplus install
mv -f SeriousSamClassic/SamTFE/Bin x32/SamTFE
mv -f SeriousSamClassic/SamTSE/Bin x32/SamTSE
mv -f SeriousSamClassic/SamTFE/Mods/XPLUS/Bin x32/SamTFE/Mods/XPLUS
mv -f SeriousSamClassic/SamTSE/Mods/XPLUS/Bin x32/SamTSE/Mods/XPLUS
echo "*** Copy Data files ***"
cp -vfr SeriousSamClassic/{SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} x32/SamTFE
cp -vfr SeriousSamClassic/{SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} x32/SamTSE
echo "*** Create archive ***"
mv x32 armv7l
XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-armv7l-bin.tar.xz armv7l
cp SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-armv7l-bin.tar.xz Release/
- name: Prepare Release
run: |
sudo mv ${{github.workspace}}/Release/SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-armv7l-bin.tar.xz ${{github.workspace}}/
- name: Upload Release
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-armv7l-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-armv7l-bin.tar.xz
build-raspios-aarch64:
name: RPi OS Lite ${{ matrix.Configuration }} ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [aarch64]
Configuration: [Release]
include:
- arch: aarch64
cpu: cortex-a72
base_image: raspios_lite_arm64:latest
cpu_info: cpuinfo/raspberrypi_4b
steps:
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- uses: pguyot/arm-runner-action@v2
with:
image_additional_mb: 2048
base_image: ${{ matrix.base_image }}
cpu: ${{ matrix.cpu }}
cpu_info: ${{ matrix.cpu_info }}
shell: /bin/bash
copy_artifact_path: Release
commands: |
mkdir Release
test `uname -m` = ${{ matrix.arch }}
grep Model /proc/cpuinfo
apt-get update -y --allow-releaseinfo-change
apt-get install --no-install-recommends -y git bison flex cmake make gcc libc6-dev libsdl2-dev libogg-dev libvorbis-dev zlib1g-dev libvulkan1 libvulkan-dev
cat /proc/cpuinfo
cat /etc/os-release
mkdir {x64,x64/SamTFE,x64/SamTFE/Mods,x64/SamTFE/Mods/XPLUS,x64/SamTSE,x64/SamTSE/Mods,x64/SamTSE/Mods/XPLUS}
uname -a
gcc -c -Q -mcpu=native --help=target
git clone https://github.com/tx00100xt/SeriousSamClassic.git
echo "***build ***"
cmake SeriousSamClassic -B SeriousSamClassic/build-aarch64 -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DRPI4=TRUE
make -j4 -C SeriousSamClassic/build-aarch64
make -C SeriousSamClassic/build-aarch64 install
echo "*** build XPLUS ***"
cmake SeriousSamClassic -B SeriousSamClassic/build-aarch64-xplus -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DXPLUS=TRUE -DRPI4=TRUE
make -j4 -C SeriousSamClassic/build-aarch64-xplus
make -C SeriousSamClassic/build-aarch64-xplus install
mv -f SeriousSamClassic/SamTFE/Bin x64/SamTFE
mv -f SeriousSamClassic/SamTSE/Bin x64/SamTSE
mv -f SeriousSamClassic/SamTFE/Mods/XPLUS/Bin x64/SamTFE/Mods/XPLUS
mv -f SeriousSamClassic/SamTSE/Mods/XPLUS/Bin x64/SamTSE/Mods/XPLUS
echo "*** Copy Data files ***"
cp -vfr SeriousSamClassic/{SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} x64/SamTFE
cp -vfr SeriousSamClassic/{SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} x64/SamTSE
echo "*** Create archive ***"
mv x64 aarch64
XZ_DEFAULTS="-T 10" tar --use-compress-program=xz -cpvf SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-aarch64-bin.tar.xz aarch64
cp SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-aarch64-bin.tar.xz Release/
- name: Prepare Release
run: |
sudo mv ${{github.workspace}}/Release/SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-aarch64-bin.tar.xz ${{github.workspace}}/
- name: Upload Release
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-aarch64-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-rpios-aarch64-bin.tar.xz
build-ubuntu-riscv64:
# The host should always be linux
runs-on: ubuntu-22.04
name: Ubuntu Release ${{ matrix.arch }}
# Run steps on a matrix of 4 arch/distro combinations
strategy:
matrix:
include:
- arch: riscv64
distro: ubuntu22.04
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
# Pass some environment variables to the container
env: | # YAML, but pipe character is necessary
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# The shell to run commands with in the container
shell: /bin/bash
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
apt-get update -qq -y
apt-get install -qq -y git cmake build-essential xz-utils &&
apt-get install -qq -y libsdl2-dev libogg-dev libvorbis-dev &&
apt-get install -qq -y imagemagick bison flex zlib1g-dev libxxhash-dev &&
apt-get install -qq -y libvulkan1 libvulkan-dev vulkan-validationlayers vulkan-validationlayers-dev
;;
fedora*)
dnf -y update
dnf -y install git which
;;
alpine*)
apk update
apk add git
;;
esac
# Produce a binary artifact and place it in the mounted volume
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DUSE_I386_NASM_ASM=FALSE
cd ${{github.workspace}}/build
make -j$(nproc || echo 4)
make install
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-xplus -DCMAKE_BUILD_TYPE=Release -DUSE_I386_NASM_ASM=FALSE -DXPLUS=TRUE
cd ${{github.workspace}}/build-xplus
make -j$(nproc || echo 4)
make install
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Make artifact
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
run: |
cd ${{github.workspace}}
mkdir riscv64 && cd riscv64
mkdir {SamTFE,SamTFE/Mods,SamTFE/Mods/XPLUS,SamTSE,SamTSE/Mods,SamTSE/Mods/XPLUS}
cd ${{github.workspace}}
mv -f ${{github.workspace}}/SamTFE/Bin ${{github.workspace}}/riscv64/SamTFE
mv -f ${{github.workspace}}/SamTSE/Bin ${{github.workspace}}/riscv64/SamTSE
mv -f ${{github.workspace}}/SamTFE/Mods/XPLUS/Bin ${{github.workspace}}/riscv64/SamTFE/Mods/XPLUS
mv -f ${{github.workspace}}/SamTSE/Mods/XPLUS/Bin ${{github.workspace}}/riscv64/SamTSE/Mods/XPLUS
echo "*** Copy Data files ***"
cp -vfr {SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} riscv64/SamTFE
cp -vfr {SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} riscv64/SamTSE
echo "*** Create archive ***"
tar -cJpvf SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-riscv64-bin.tar.xz riscv64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-riscv64-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-riscv64-bin.tar.xz
build-ubuntu-ppc64le:
# The host should always be linux
runs-on: ubuntu-22.04
name: Ubuntu Release ${{ matrix.arch }}
# Run steps on a matrix of 4 arch/distro combinations
strategy:
matrix:
include:
- arch: ppc64le
distro: ubuntu22.04
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
# Pass some environment variables to the container
env: | # YAML, but pipe character is necessary
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# The shell to run commands with in the container
shell: /bin/bash
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
apt-get update -qq -y
apt-get install -qq -y git cmake build-essential xz-utils &&
apt-get install -qq -y libsdl2-dev libogg-dev libvorbis-dev &&
apt-get install -qq -y imagemagick bison flex zlib1g-dev libxxhash-dev &&
apt-get install -qq -y libvulkan1 libvulkan-dev vulkan-validationlayers vulkan-validationlayers-dev
;;
fedora*)
dnf -y update
dnf -y install git which
;;
alpine*)
apk update
apk add git
;;
esac
# Produce a binary artifact and place it in the mounted volume
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DUSE_I386_NASM_ASM=FALSE
cd ${{github.workspace}}/build
make -j$(nproc || echo 4)
make install
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-xplus -DCMAKE_BUILD_TYPE=Release -DUSE_I386_NASM_ASM=FALSE -DXPLUS=TRUE
cd ${{github.workspace}}/build-xplus
make -j$(nproc || echo 4)
make install
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Make artifact
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
run: |
cd ${{github.workspace}}
mkdir ppc64le && cd ppc64le
mkdir {SamTFE,SamTFE/Mods,SamTFE/Mods/XPLUS,SamTSE,SamTSE/Mods,SamTSE/Mods/XPLUS}
cd ${{github.workspace}}
mv -f ${{github.workspace}}/SamTFE/Bin ${{github.workspace}}/ppc64le/SamTFE
mv -f ${{github.workspace}}/SamTSE/Bin ${{github.workspace}}/ppc64le/SamTSE
mv -f ${{github.workspace}}/SamTFE/Mods/XPLUS/Bin ${{github.workspace}}/ppc64le/SamTFE/Mods/XPLUS
mv -f ${{github.workspace}}/SamTSE/Mods/XPLUS/Bin ${{github.workspace}}/ppc64le/SamTSE/Mods/XPLUS
echo "*** Copy Data files ***"
cp -vfr {SamTFE/SE1_10b.gro,SamTFE/ModEXT.txt} ppc64le/SamTFE
cp -vfr {SamTSE/SE1_10b.gro,SamTSE/ModEXT.txt} ppc64le/SamTSE
echo "*** Create archive ***"
tar -cJpvf SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-ppc64le-bin.tar.xz ppc64le
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-ppc64le-bin.tar.xz
path: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-ppc64le-bin.tar.xz
build-ubuntu-s390x:
# The host should always be linux
runs-on: ubuntu-22.04
name: Ubuntu Release ${{ matrix.arch }}
# Run steps on a matrix of 4 arch/distro combinations
strategy:
matrix:
include:
- arch: s390x
distro: ubuntu22.04
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
# Pass some environment variables to the container
env: | # YAML, but pipe character is necessary
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# The shell to run commands with in the container
shell: /bin/bash
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
apt-get update -qq -y
apt-get install -qq -y git cmake build-essential xz-utils &&
apt-get install -qq -y libsdl2-dev libogg-dev libvorbis-dev &&
apt-get install -qq -y imagemagick bison flex zlib1g-dev libxxhash-dev &&
apt-get install -qq -y libvulkan1 libvulkan-dev vulkan-validationlayers vulkan-validationlayers-dev
;;
fedora*)
dnf -y update
dnf -y install git which
;;
alpine*)
apk update
apk add git
;;
esac
# Produce a binary artifact and place it in the mounted volume
run: |
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DUSE_I386_NASM_ASM=FALSE
cd ${{github.workspace}}/build
make -j$(nproc || echo 4)
make install
cd ${{github.workspace}}
cmake -B ${{github.workspace}}/build-xplus -DCMAKE_BUILD_TYPE=Release -DUSE_I386_NASM_ASM=FALSE -DXPLUS=TRUE
cd ${{github.workspace}}/build-xplus
make -j$(nproc || echo 4)
make install
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@v1
with:
format: "YYYYMMDD"
- name: Show current date
run: |
echo "${{ steps.date.outputs.time }}"
- name: Make artifact
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
run: |
cd ${{github.workspace}}
mkdir s390x && cd s390x
mkdir {SamTFE,SamTFE/Mods,SamTFE/Mods/XPLUS,SamTSE,SamTSE/Mods,SamTSE/Mods/XPLUS}