Repository navigation
1659 lines (1390 loc) · 55.9 KB
/
Copy pathmain.yml
File metadata and controls
1659 lines (1390 loc) · 55.9 KB
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: CI
on: [push, pull_request]
env:
HAXE_VERSION: 4.2.5
HXCPP_COMPILE_CACHE: ${{ github.workspace }}/.hxcpp_cache
HXCPP_NONINTERACTIVE: 1
jobs:
linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev libpulse-dev libmbedtls-dev libpng-dev libturbojpeg-dev libuv1-dev libvorbis-dev libvulkan-dev
# GStreamer decodes video in the unit tests
sudo apt-get install -y gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav xvfb libgl1-mesa-dri
- uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib install crossbyte 1.0.1 --quiet
haxelib --global update haxelib --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib install utest --quiet
# CrossByte, which serves lime test html5, needs Haxe 4.3 to build the tools
- uses: ./.github/actions/rebuild-lime-tools
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set up Lime
run: |
haxelib run lime setup -alias -y -nocffi
- name: Rebuild Lime (Linux)
run: |
lime rebuild linux -32 -release -nocolor -verbose -nocffi
lime rebuild linux -64 -release -nocolor -verbose -nocffi
lime rebuild hl -clean -release -nocolor -verbose -nocffi
- uses: actions/upload-artifact@v7
with:
name: Linux-NDLL
path: |
ndll/Linux/
!**/.gitignore
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: Linux64-NDLL
path: |
ndll/Linux64/
!**/.gitignore
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: Linux64-Hashlink
path: |
templates/bin/hl/Linux64
if-no-files-found: error
- uses: actions/setup-python@v6
id: tls-python
with:
python-version: '3.12'
- name: Run unit tests
working-directory: tests/unit
# A deadlock hangs the tests rather than failing them
timeout-minutes: 30
env:
LIME_TEST_PYTHON: ${{ steps.tls-python.outputs.python-path }}
# OpenAL's null output stands in for the sound card runners lack
ALSOFT_DRIVERS: "null"
run: |
python -m unittest discover -s fixtures
lime test neko -release -verbose -nocolor
lime test hl -release -verbose -nocolor
lime test linux -release -verbose -nocolor
- name: Run OpenGL tests
working-directory: tests/unit
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
LIBGL_ALWAYS_SOFTWARE: "1"
SDL_VIDEODRIVER: "x11"
run: |
xvfb-run -a lime test neko -release -verbose -nocolor -DUTEST_PATTERN=OpenGLTest -Dlime_test_require_opengl
xvfb-run -a lime test hl -release -verbose -nocolor -DUTEST_PATTERN=OpenGLTest -Dlime_test_require_opengl
xvfb-run -a lime test linux -release -verbose -nocolor -DUTEST_PATTERN=OpenGLTest -Dlime_test_require_opengl
- name: Check window creation failure and recovery
working-directory: tests/window-creation
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
xvfb-run -a lime test neko -release -verbose -nocolor
xvfb-run -a lime test hl -release -verbose -nocolor
xvfb-run -a lime test linux -release -verbose -nocolor
lime build neko -release -verbose -nocolor -Dwindow_creation_startup_failure
python check_startup.py bin/neko/bin/WindowCreationTest
- name: Run WebView tests
working-directory: tests/unit
# WebKitGTK needs a display, so the tests above do not reach it
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
sudo apt-get install -y libwebkit2gtk-4.1-0
xvfb-run -a lime test neko -release -verbose -nocolor -DUTEST_PATTERN=WebViewTest
xvfb-run -a lime test hl -release -verbose -nocolor -DUTEST_PATTERN=WebViewTest
xvfb-run -a lime test linux -release -verbose -nocolor -DUTEST_PATTERN=WebViewTest
- name: Run software OpenGL tests
working-directory: tests/unit
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
# Skips the GPU, as on a machine without one
LIME_SOFTWARE_GL: "1"
run: |
xvfb-run -a lime test linux -release -verbose -nocolor -Dsoftware-gl -DUTEST_PATTERN=OpenGLTest -Dlime_test_require_opengl
- name: Run unit tests past 24.8 days
working-directory: tests/unit
# A timer stuck at the Int limit hangs the tests rather than failing them
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
# The timer starts 10 s short of 2^31 ms, where an Int millisecond count
# runs out, so the tests run on across it
lime test linux -release -verbose -nocolor -Dsimulate_uptime=2147473648
- name: Run video smoke test
working-directory: tests/video-smoke
run: |
lime build linux -release -verbose -nocolor
SDL_AUDIODRIVER=dummy xvfb-run -a Export/linux/bin/LimeVideoSmoke
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Build HelloWorld sample
run: |
lime create HelloWorld -verbose -nocolor
lime build HelloWorld linux -release -verbose -nocolor
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor
lime build SimpleImage linux -release -verbose -nocolor
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio linux -release -verbose -nocolor
- name: Build SimpleVideo sample
run: |
lime create SimpleVideo -verbose -nocolor
lime build SimpleVideo linux -release -verbose -nocolor
linux-arm64:
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install system dependencies
run: |
sudo add-apt-repository ppa:haxe/releases -y
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev libpulse-dev libmbedtls-dev libpng-dev libturbojpeg-dev libuv1-dev libvorbis-dev libvulkan-dev
# GStreamer decodes video in the unit tests
sudo apt-get install -y gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav xvfb libgl1-mesa-dri
# krdlab/setup-haxe doesn't support arm64 linux
# so this is our workaround for now
- name: Install Haxe
run: |
sudo add-apt-repository ppa:haxe/releases -y
sudo apt-get update
sudo apt-get install -y haxe
mkdir $HOME/haxelib
haxelib setup $HOME/haxelib
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib install crossbyte 1.0.1 --quiet
haxelib --global update haxelib --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib install utest --quiet
- name: Rebuild Lime tools
run: |
haxelib dev lime ${{ github.workspace }}
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime setup -alias -y -nocffi
- name: Rebuild Lime (Linux ARM64)
run: |
lime rebuild linux -release -nocolor -verbose -nocffi
- uses: actions/upload-artifact@v7
with:
name: LinuxArm64-NDLL
path: |
ndll/LinuxArm64/
!**/.gitignore
if-no-files-found: error
- uses: actions/setup-python@v6
id: tls-python
with:
python-version: '3.12'
- name: Run unit tests
working-directory: tests/unit
env:
LIME_TEST_PYTHON: ${{ steps.tls-python.outputs.python-path }}
# OpenAL's null output stands in for the sound card runners lack
ALSOFT_DRIVERS: "null"
run: |
python -m unittest discover -s fixtures
lime test neko -release -verbose -nocolor
lime test linux -release -verbose -nocolor
# The package waits for this job, so a hang must not hold it for hours
timeout-minutes: 60
- name: Run OpenGL tests
working-directory: tests/unit
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
LIBGL_ALWAYS_SOFTWARE: "1"
SDL_VIDEODRIVER: "x11"
run: |
xvfb-run -a lime test neko -release -verbose -nocolor -DUTEST_PATTERN=OpenGLTest -Dlime_test_require_opengl
xvfb-run -a lime test linux -release -verbose -nocolor -DUTEST_PATTERN=OpenGLTest -Dlime_test_require_opengl
- name: Check window creation failure and recovery
working-directory: tests/window-creation
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
xvfb-run -a lime test neko -release -verbose -nocolor
xvfb-run -a lime test linux -release -verbose -nocolor
lime build neko -release -verbose -nocolor -Dwindow_creation_startup_failure
python check_startup.py bin/neko/bin/WindowCreationTest
- name: Run WebView tests
working-directory: tests/unit
# WebKitGTK needs a display, so the tests above do not reach it
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
sudo apt-get install -y libwebkit2gtk-4.1-0 xvfb
xvfb-run -a lime test neko -release -verbose -nocolor -DUTEST_PATTERN=WebViewTest
xvfb-run -a lime test linux -release -verbose -nocolor -DUTEST_PATTERN=WebViewTest
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Build HelloWorld sample
run: |
lime create HelloWorld -verbose -nocolor
lime build HelloWorld linux -release -verbose -nocolor
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor
lime build SimpleImage linux -release -verbose -nocolor
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio linux -release -verbose -nocolor
- name: Build SimpleVideo sample
run: |
lime create SimpleVideo -verbose -nocolor
lime build SimpleVideo linux -release -verbose -nocolor
vulkan-smoke:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libx11-dev libx11-xcb1 libxext-dev libxi-dev libxrandr-dev libxinerama-dev libpulse-dev libmbedtls-dev libpng-dev libturbojpeg-dev libuv1-dev libvorbis-dev libvulkan-dev mesa-vulkan-drivers xvfb
- uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib install crossbyte 1.0.1 --quiet
haxelib --global update haxelib --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib install utest --quiet
# CrossByte, which serves lime test html5, needs Haxe 4.3 to build the tools
- uses: ./.github/actions/rebuild-lime-tools
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set up Lime
run: |
haxelib run lime setup -alias -y -nocffi
- name: Rebuild Lime (Linux default Vulkan)
run: |
lime rebuild linux -64 -release -nocolor -verbose -nocffi
- name: Build Vulkan smoke test app
working-directory: tests/vulkan-smoke
run: |
lime build linux -release -verbose -nocolor
- name: Run Vulkan smoke test app
working-directory: tests/vulkan-smoke
timeout-minutes: 5
run: |
if [ -f /usr/share/vulkan/icd.d/lvp_icd.x86_64.json ]; then
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json
fi
SDL_AUDIODRIVER=dummy xvfb-run -a Export/linux/bin/LimeVulkanSmoke
macos:
runs-on: macos-15
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: krdlab/setup-haxe@v2
with:
haxe-version: 4.3.7
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib install crossbyte 1.0.1 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib install utest --quiet
- name: Rebuild Lime tools
run: |
haxelib dev lime ${{ github.workspace }}
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime setup -alias -y -nocffi
- name: Rebuild Lime (macOS)
run: |
lime rebuild macos -clean -release -arm64 -nocolor -verbose -nocffi
- uses: actions/upload-artifact@v7
with:
name: MacArm64-NDLL
path: |
ndll/MacArm64/
!**/.gitignore
if-no-files-found: error
- uses: actions/setup-python@v6
id: tls-python
with:
python-version: '3.12'
- name: Set trust settings for the HTTPS tests
working-directory: tests/unit
run: |
# Lets the runner change the administrator's trust settings without a password prompt.
# macOS 15 refuses this change through security authorizationdb, so it is made in the
# authorization database itself, where class 4 is allow
sudo sqlite3 /var/db/auth.db "UPDATE rules SET class = 4 WHERE name = 'com.apple.trust-settings.admin'"
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain fixtures/trusted-ca.pem
sudo security add-trusted-cert -d -r deny -k /Library/Keychains/System.keychain fixtures/test-ca.pem
echo "LIME_TEST_TRUST_SETTINGS=1" >> $GITHUB_ENV
- name: Run unit tests
working-directory: tests/unit
# A deadlock hangs the tests rather than failing them
timeout-minutes: 30
env:
LIME_TEST_PYTHON: ${{ steps.tls-python.outputs.python-path }}
# OpenAL's null output stands in for the sound card runners lack
ALSOFT_DRIVERS: "null"
run: |
python -m unittest discover -s fixtures
lime test neko -release -verbose -nocolor
lime test mac -arm64 -release -verbose -nocolor
- name: Run software OpenGL tests
working-directory: tests/unit
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
# Skips the GPU, as on a machine without one
LIME_SOFTWARE_GL: "1"
run: |
lime test mac -arm64 -release -verbose -nocolor -Dsoftware-gl -DUTEST_PATTERN=OpenGLTest
- name: Run video smoke test
working-directory: tests/video-smoke
run: |
lime test mac -arm64 -release -verbose -nocolor
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
# - name: Build HelloWorld sample
# run: |
# lime create HelloWorld -verbose -nocolor
# lime build HelloWorld macos -release -verbose -nocolor
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor
lime build SimpleImage macos -arm64 -release -verbose -nocolor
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio macos -arm64 -release -verbose -nocolor
- name: Build SimpleVideo sample
run: |
lime create SimpleVideo -verbose -nocolor
lime build SimpleVideo macos -arm64 -release -verbose -nocolor
macos-intel:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install HashLink dependencies
env:
# Homebrew no longer builds bottles for Intel macOS, so updating it and
# upgrading what the runner already has rebuilds cmake, OpenSSL and
# Python from source, which takes an hour. Only what is missing is
# installed, from the formulae the runner image came with.
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
set -euxo pipefail
rm -f /usr/local/bin/2to3*
rm -f /usr/local/bin/idle3*
rm -f /usr/local/bin/pydoc3*
rm -f /usr/local/bin/python3*
rm -f /usr/local/bin/pip3*
for attempt in 1 2 3; do
if /usr/local/bin/brew install jpeg-turbo libpng libuv libvorbis; then
break
fi
if [ "$attempt" -eq 3 ]; then
exit 1
fi
sleep $((attempt * 30))
done
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib install crossbyte 1.0.1 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib install utest --quiet
# CrossByte, which serves lime test html5, needs Haxe 4.3 to build the tools
- uses: ./.github/actions/rebuild-lime-tools
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set up Lime
run: |
haxelib run lime setup -alias -y -nocffi
- name: Rebuild Lime (macOS)
run: |
lime rebuild macos -clean -release -x86_64 -nocolor -verbose -nocffi
- name: Rebuild Lime (HashLink macOS)
run: |
lime rebuild hl -clean -release -nocolor -verbose -nocffi
- uses: actions/upload-artifact@v7
with:
name: Mac64-NDLL
path: |
ndll/Mac64/
!**/.gitignore
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: Mac64-Hashlink
path: |
templates/bin/hl/Mac64
if-no-files-found: error
- uses: actions/setup-python@v6
id: tls-python
with:
python-version: '3.12'
- name: Run unit tests
working-directory: tests/unit
# A deadlock hangs the tests rather than failing them
timeout-minutes: 30
env:
LIME_TEST_PYTHON: ${{ steps.tls-python.outputs.python-path }}
# OpenAL's null output stands in for the sound card runners lack
ALSOFT_DRIVERS: "null"
run: |
python -m unittest discover -s fixtures
lime test neko -release -verbose -nocolor
lime test hl -release -verbose -nocolor
lime test mac -x86_64 -release -verbose -nocolor
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
# - name: Build HelloWorld sample
# run: |
# lime create HelloWorld -verbose -nocolor
# lime build HelloWorld macos -release -verbose -nocolor
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor
lime build SimpleImage macos -x86_64 -release -verbose -nocolor
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio macos -x86_64 -release -verbose -nocolor
- name: Build SimpleVideo sample
run: |
lime create SimpleVideo -verbose -nocolor
lime build SimpleVideo macos -x86_64 -release -verbose -nocolor
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
- uses: joshtynjala/setup-adobe-air-action@v2
with:
air-version: "33.1"
accept-license: true
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib install crossbyte 1.0.1 --quiet
haxelib install lime-mesa 1.0.0 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib install utest --quiet
# CrossByte, which serves lime test html5, needs Haxe 4.3 to build the tools
- uses: ./.github/actions/rebuild-lime-tools
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set up Lime
run: |
haxelib run lime setup -alias -y -nocffi
haxelib run lime config AIR_SDK ${{ env.AIR_HOME }} -eval
- name: Rebuild Lime (Windows)
run: |
lime rebuild windows -32 -release -nocolor -verbose -nocffi
lime rebuild windows -64 -release -nocolor -verbose -nocffi
lime rebuild hl -clean -release -nocolor -verbose -nocffi
- uses: actions/upload-artifact@v7
with:
name: Windows-NDLL
path: |
ndll/Windows/
!**/.gitignore
if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: Windows64-NDLL
path: |
ndll/Windows64/
!**/.gitignore
if-no-files-found: error
# - uses: actions/upload-artifact@v7
# with:
# name: Windows-Hashlink
# path: |
# templates/bin/hl/Windows
# if-no-files-found: error
- uses: actions/upload-artifact@v7
with:
name: Windows64-Hashlink
path: |
templates/bin/hl/Windows64
if-no-files-found: error
- uses: actions/setup-python@v6
id: tls-python
with:
python-version: '3.12'
- name: Run unit tests
working-directory: tests/unit
# A deadlock hangs the tests rather than failing them
timeout-minutes: 30
env:
LIME_TEST_PYTHON: ${{ steps.tls-python.outputs.python-path }}
# OpenAL's null output stands in for the sound card runners lack
ALSOFT_DRIVERS: "null"
run: |
python -m unittest discover -s fixtures
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
lime test neko -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
lime test hl -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
lime test air -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
lime test windows -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Run software OpenGL tests
working-directory: tests/unit
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
# Skips the GPU, as on a machine without one
LIME_SOFTWARE_GL: "1"
run: |
lime test windows -release -verbose -nocolor -Dsoftware-gl -DUTEST_PATTERN=OpenGLTest
- name: Check window creation failure and recovery
working-directory: tests/window-creation
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
lime test neko -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
lime test hl -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
lime test windows -release -verbose -nocolor
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Check native desktop integration through SDL
working-directory: tests/native-desktop
timeout-minutes: 5
run: lime test windows -release -verbose -nocolor
- name: Check local sockets between processes
working-directory: tests/local-socket
timeout-minutes: 5
run: lime test windows -release -verbose -nocolor
- name: Run unit tests past 24.8 days
working-directory: tests/unit
# A timer stuck at the Int limit hangs the tests rather than failing them
timeout-minutes: 10
env:
ALSOFT_DRIVERS: "null"
run: |
# The timer starts 10 s short of 2^31 ms, where an Int millisecond count
# runs out, so the tests run on across it
lime test windows -release -verbose -nocolor -Dsimulate_uptime=2147473648
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Build HelloWorld sample
run: |
lime create HelloWorld -verbose -nocolor
lime build HelloWorld windows -release -verbose -nocolor
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor
lime build SimpleImage windows -release -verbose -nocolor
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor
lime build SimpleAudio windows -release -verbose -nocolor
- name: Build SimpleVideo sample
run: |
lime create SimpleVideo -verbose -nocolor
lime build SimpleVideo windows -release -verbose -nocolor
- name: Rebuild Lime (Windows, Mingw)
run: |
rm ndll/Windows64/*
lime rebuild windows -Dmingw -D MINGW_ROOT=C:\mingw64 -64 -clean -release -nocolor -verbose -nocffi
- uses: actions/upload-artifact@v7
with:
name: Windows64-MinGW-NDLL
path: |
ndll/Windows64/
!**/.gitignore
if-no-files-found: error
webassembly:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install Emscripten NDK
uses: emscripten-core/setup-emsdk@v16
with:
# Emscripten 7.0.0 hangs compiling Lime
version: 6.0.13
- uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
- name: Prepare Lime
run: |
haxelib dev lime ${{ github.workspace }}
haxelib run lime setup -alias -y -nocffi -eval
- name: Configure Emscripten support
run: |
lime config EMSCRIPTEN_SDK $EMSDK/upstream/emscripten -eval
lime config -eval
- name: Rebuild Lime (WebAssembly)
run: |
lime rebuild webassembly -release -nocolor -verbose -nocffi -eval
- uses: actions/upload-artifact@v7
with:
name: Emscripten-NDLL
path: |
ndll/Emscripten/
!**/.gitignore
if-no-files-found: error
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor -eval
lime build SimpleImage webassembly -release -verbose -nocolor -eval
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor -eval
lime build SimpleAudio webassembly -release -verbose -nocolor -eval
- name: Build SimpleVideo sample
run: |
lime create SimpleVideo -verbose -nocolor -eval
lime build SimpleVideo webassembly -release -verbose -nocolor -eval
android:
runs-on: ubuntu-22.04
strategy:
matrix:
ndk-version: [r28c, stable]
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
if: matrix.ndk-version != 'stable'
with:
ndk-version: ${{ matrix.ndk-version }}
- uses: actions/setup-java@v5
with:
distribution: "zulu"
java-version: 17
- uses: krdlab/setup-haxe@v2
with:
haxe-version: ${{ env.HAXE_VERSION }}
- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
- name: Install Haxe dependencies
run: |
haxelib install native-desktop 1.1.0 --quiet
haxelib install native-ipc 1.0.0 --quiet
haxelib install StageWebView 1.0.1 --quiet
haxelib install wsproto 1.0.0 --quiet
haxelib git libhxcpp https://github.com/openfl/libhxcpp --quiet
haxelib run libhxcpp setup
haxe --cwd "$(haxelib libpath libhxcpp)/tools/hxcpp" compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
- name: Prepare Lime
run: |
haxelib dev lime ${{ github.workspace }}
haxelib run lime setup -alias -y -nocffi -eval
- name: Configure Android support
run: |
lime config ANDROID_SDK $ANDROID_HOME -eval
lime config ANDROID_NDK_ROOT ${{ env.LIME_NDK_ROOT }} -eval
lime config JAVA_HOME $JAVA_HOME -eval
lime config ANDROID_SETUP true -eval
lime config -eval
env:
LIME_NDK_ROOT: ${{ matrix.ndk-version == 'stable' && '$ANDROID_NDK_ROOT' || steps.setup-ndk.outputs.ndk-path }}
- name: Rebuild Lime (Android)
run: |
lime rebuild android -release -nocolor -verbose -nocffi -eval
- name: Check Lime's mbedTLS names (Android)
run: |
haxe --cwd project/lib/custom/mbedtls --run GeneratePrefix -check ../../../obj
- uses: actions/upload-artifact@v7
with:
name: Android-NDLL
path: |
ndll/Android/
!**/.gitignore
if-no-files-found: error
if: matrix.ndk-version != 'stable'
- name: Install samples
run: |
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Build HelloWorld sample
run: |
lime create HelloWorld -verbose -nocolor -eval
lime build HelloWorld android -release -verbose -nocolor -eval
- name: Build SimpleImage sample
run: |
lime create SimpleImage -verbose -nocolor -eval
lime build SimpleImage android -release -verbose -nocolor -eval
- name: Build SimpleAudio sample
run: |
lime create SimpleAudio -verbose -nocolor -eval
lime build SimpleAudio android -release -verbose -nocolor -eval
- name: Build SimpleVideo sample