This repository was archived by the owner on Dec 13, 2025. It is now read-only.
forked from JoaTH-Team/Rhythmo-SC
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (75 loc) · 2.53 KB
/
main.yml
File metadata and controls
88 lines (75 loc) · 2.53 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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
buildAndroid:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Restore Previous Cache
id: cache-build-restore
uses: actions/cache/restore@main
with:
path: |
.haxelib/
export/debug/android/haxe/
export/debug/android/obj/
key: cache-android-debug
- name: Create Version Tag
run: echo "${{github.run_id}}" > VERSION
# https://github.com/actions/runner-images/issues/10814
- name: Workaround build-tools issue
run: |
curl https://dl.google.com/android/repository/build-tools_r35_macosx.zip > $ANDROID_HOME/build-tools_r35_macosx.zip
cd $ANDROID_HOME
mkdir build-tools || true
unzip build-tools_r35_macosx.zip
mv android-15 build-tools/35.0.0 || true
- name: Install Libraries
run: |
haxe --interp -cp ./actions/libs-installer -D analyzer-optimize -main Main
- name: Save Current Haxelib Cache
uses: actions/cache@main
with:
key: cache-android-debug
path: |
.haxelib/
restore-keys: |
cache-android-debug
- name: Configure Android
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME_17_arm64
haxelib run lime config ANDROID_SETUP true
- name: Compile
run: haxelib run lime build android -D 32bits_disabled -ARM64 -final
- name: Clear Previous Cache
uses: actions/github-script@main
with:
script: await require('./actions/cache/clear-cache.js')({github, context}, 'cache-android-debug');
- name: Save Current Cache
uses: actions/cache@main
with:
key: cache-android-debug
path: |
.haxelib/
export/debug/android/haxe/
export/debug/android/obj/
restore-keys: |
cache-android-debug
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: androidBuild
path: export/release/android/bin/app/build/outputs/apk/release/*.apk
if-no-files-found: error