11name : Build
22
33on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
48 workflow_dispatch :
59
610jobs :
7- buildLinux :
8- runs-on : ubuntu-latest
9-
11+ buildAndroid :
12+ runs-on : macos-14
1013 steps :
11- - uses : actions/checkout@main
12-
13- - uses : krdlab/setup-haxe@master
14+ - name : Checkout
15+ uses : actions/checkout@main
16+
17+ - name : Setup Haxe
18+ uses : krdlab/setup-haxe@master
1419 with :
15- haxe-version : 4.3.7
20+ haxe-version : 4.3.6
1621
1722 - name : Restore Previous Cache
1823 id : cache-build-restore
1924 uses : actions/cache/restore@main
2025 with :
2126 path : |
2227 .haxelib/
23- export/debug/linux /haxe/
24- export/debug/linux /obj/
25- key : cache-linux -debug
28+ export/debug/android /haxe/
29+ export/debug/android /obj/
30+ key : cache-android -debug
2631
27- - name : Installing Libraries
28- run : haxe --interp -cp ./actions/libs-installer -D analyzer-optimize -main Main
2932 - name : Create Version Tag
3033 run : echo "${{github.run_id}}" > VERSION
3134
32- - name : Compile
33- run : haxelib run lime build linux -debug
34-
35- - name : Clear Previous Cache
36- uses : actions/github-script@main
37- with :
38- script : await require('./actions/cache/clear-cache.js')({github, context}, 'cache-linux-debug');
39-
40- - name : Save Current Cache
41- uses : actions/cache@main
42- with :
43- key : cache-linux-debug
44- path : |
45- .haxelib/
46- export/debug/linux/haxe/
47- export/debug/linux/obj/
48- restore-keys : |
49- cache-linux-debug
50-
51- - name : Tar files
52- run : tar -zcvf Rhythmo.tar.gz export/debug/linux/bin
53- - name : Publish Artifact
54- uses : actions/upload-artifact@main
55- with :
56- name : linuxBuild
57- path : Rhythmo.tar.gz
58- buildWindows :
59- runs-on : windows-latest
60-
61- steps :
62- - uses : actions/checkout@main
63-
64- - uses : krdlab/setup-haxe@master
65- with :
66- haxe-version : 4.3.7
67-
68- - name : Restore Previous Cache
69- id : cache-build-restore
70- uses : actions/cache/restore@main
71- with :
72- path : |
73- .haxelib/
74- export/debug/windows/haxe/
75- export/debug/windows/obj/
76- key : cache-windows-debug
77-
78- - name : Set Cache Status
79- id : cache-status
80- run : echo CACHE_HIT=${{ steps.cache-build-restore.outputs.cache-hit }} | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8
81- shell : powershell
82-
83- - name : Installing Libraries
84- run : haxe --interp -cp ./actions/libs-installer -D analyzer-optimize -main Main
85- - name : Create Version Tag
86- run : echo "${{github.run_id}}" > VERSION
35+ # https://github.com/actions/runner-images/issues/10814
36+ - name : Workaround build-tools issue
37+ run : |
38+ curl https://dl.google.com/android/repository/build-tools_r35_macosx.zip > $ANDROID_HOME/build-tools_r35_macosx.zip
39+ cd $ANDROID_HOME
40+ mkdir build-tools || true
41+ unzip build-tools_r35_macosx.zip
42+ mv android-15 build-tools/35.0.0 || true
43+
44+ - name : Install Libraries
45+ run : |
46+ run: haxe --interp -cp ./actions/libs-installer -D analyzer-optimize -main Main
47+
48+ - name : Configure Android
49+ run : |
50+ haxelib run lime config ANDROID_SDK $ANDROID_HOME
51+ haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
52+ haxelib run lime config JAVA_HOME $JAVA_HOME_17_arm64
53+ haxelib run lime config ANDROID_SETUP true
8754
8855 - name : Compile
89- run : haxelib run lime build windows -debug
56+ run : haxelib run lime build android -D 32bits_disabled -ARM64 -debug
9057
9158 - name : Clear Previous Cache
9259 uses : actions/github-script@main
9360 with :
94- script : await require('./actions/cache/clear-cache.js')({github, context}, 'cache-windows -debug');
61+ script : await require('./actions/cache/clear-cache.js')({github, context}, 'cache-android -debug');
9562
9663 - name : Save Current Cache
9764 uses : actions/cache@main
9865 with :
99- key : cache-windows -debug
66+ key : cache-android -debug
10067 path : |
10168 .haxelib/
102- export/debug/windows /haxe/
103- export/debug/windows /obj/
69+ export/debug/android /haxe/
70+ export/debug/android /obj/
10471 restore-keys : |
105- cache-windows -debug
72+ cache-android -debug
10673
10774 - name : Upload Artifact
10875 uses : actions/upload-artifact@main
10976 with :
110- name : windowsBuild
111- path : export/debug/windows/bin
112- buildMac :
113- runs-on : macos-13
114-
115- steps :
116- - uses : actions/checkout@main
117-
118- - uses : krdlab/setup-haxe@master
119- with :
120- haxe-version : 4.3.7
121-
122- - name : Restore Previous Cache
123- id : cache-build-restore
124- uses : actions/cache/restore@main
125- with :
126- path : |
127- .haxelib/
128- export/debug/macos/haxe/
129- export/debug/macos/obj/
130- key : cache-mac-debug
131-
132- - name : Installing Libraries
133- run : haxe --interp -cp ./actions/libs-installer -D analyzer-optimize -main Main
134- - name : Create Version Tag
135- run : echo "${{github.run_id}}" > VERSION
136-
137- - name : Compile
138- run : haxelib run lime build mac -debug
139-
140- - name : Clear Previous Cache
141- uses : actions/github-script@main
142- with :
143- script : await require('./actions/cache/clear-cache.js')({github, context}, 'cache-mac-debug');
144-
145- - name : Save Current Cache
146- uses : actions/cache@main
147- with :
148- key : cache-mac-debug
149- path : |
150- .haxelib/
151- export/debug/macos/haxe/
152- export/debug/macos/obj/
153- restore-keys : |
154- cache-mac-debug
155-
156- - name : Tar files
157- run : tar -zcvf Rhythmo.tar.gz export/debug/macos/bin
158- - name : Publish Artifact
159- uses : actions/upload-artifact@main
160- with :
161- name : macBuild
162- path : Rhythmo.tar.gz
77+ name : androidBuild
78+ path : export/release/android/bin/app/build/outputs/apk/release/*.apk
79+ if-no-files-found : error
0 commit comments