Debian Codegraph @

.github/workflows/android_builds.yml

raw symbols SCIP
1 name: 🤖 Android Builds
2 on:
3 workflow_call:
4 workflow_dispatch:
5
6 # Global Settings
7 env:
8 SCONS_FLAGS: >-
9 dev_mode=yes
10 module_text_server_fb_enabled=yes
11 tests=no
12 swappy=yes
13
14 jobs:
15 build-android:
16 runs-on: ubuntu-24.04
17 name: ${{ matrix.name }}
18 timeout-minutes: 60
19 strategy:
20 fail-fast: false
21 matrix:
22 include:
23 - name: Editor (target=editor)
24 cache-name: android-editor
25 target: editor
26 scons-flags: >-
27 arch=arm64
28 production=yes
29
30 - name: Template arm32 (target=template_debug, arch=arm32)
31 cache-name: android-template-arm32
32 target: template_debug
33 scons-flags: arch=arm32
34
35 - name: Template arm64 (target=template_debug, arch=arm64)
36 cache-name: android-template-arm64
37 target: template_debug
38 scons-flags: arch=arm64
39
40 steps:
41 - name: Checkout
42 uses: actions/checkout@v6
43 with:
44 submodules: recursive
45
46 - name: Set up Java 17
47 uses: actions/setup-java@v5
48 with:
49 distribution: temurin
50 java-version: 17
51
52 - name: Restore Godot build cache
53 uses: ./.github/actions/godot-cache-restore
54 with:
55 cache-name: ${{ matrix.cache-name }}
56 continue-on-error: true
57
58 - name: Setup Python and SCons
59 uses: ./.github/actions/godot-deps
60
61 - name: Download Swappy
62 run: python ./misc/scripts/install_swappy_android.py
63
64 - name: Compilation
65 uses: ./.github/actions/godot-build
66 with:
67 scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
68 platform: android
69 target: ${{ matrix.target }}
70
71 - name: Save Godot build cache
72 uses: ./.github/actions/godot-cache-save
73 with:
74 cache-name: ${{ matrix.cache-name }}
75 continue-on-error: true
76
77 - name: Generate Godot templates
78 if: matrix.target == 'template_debug'
79 run: |
80 cd platform/android/java
81 ./gradlew generateGodotTemplates
82 cd ../../..
83 ls -l bin/
84
85 - name: Generate Godot editor
86 if: matrix.target == 'editor'
87 run: |
88 cd platform/android/java
89 ./gradlew generateGodotEditor
90 ./gradlew generateGodotHorizonOSEditor
91 ./gradlew generateGodotPicoOSEditor
92 cd ../../..
93 ls -l bin/android_editor_builds/
94
95 # Separate different editors for multiple artifacts
96 mkdir horizonos
97 mv bin/android_editor_builds/*-horizonos-* horizonos
98 mkdir picoos
99 mv bin/android_editor_builds/*-picoos-* picoos
100
101 - name: Upload artifact
102 uses: ./.github/actions/upload-artifact
103 with:
104 name: ${{ matrix.cache-name }}
105
106 - name: Upload artifact (Horizon OS)
107 if: matrix.target == 'editor'
108 uses: ./.github/actions/upload-artifact
109 with:
110 name: ${{ matrix.cache-name }}-horizonos
111 path: horizonos
112
113 - name: Upload artifact (PICO OS)
114 if: matrix.target == 'editor'
115 uses: ./.github/actions/upload-artifact
116 with:
117 name: ${{ matrix.cache-name }}-picoos
118 path: picoos