@@ -184,8 +184,78 @@ jobs:
184184 path : artifacts/${{ matrix.target }}
185185 retention-days : 30
186186
187+ build-android :
188+ runs-on : ubuntu-latest
189+ name : Android
190+
191+ steps :
192+ - name : Checkout repository
193+ uses : actions/checkout@v4
194+
195+ - name : Setup mise toolchain
196+ uses : jdx/mise-action@v2
197+ with :
198+ cache : true
199+
200+ - name : Cache Cargo registry and build
201+ uses : actions/cache@v4
202+ with :
203+ path : |
204+ ~/.cargo/registry
205+ ~/.cargo/git
206+ target
207+ key : android-build-cargo-${{ hashFiles('**/Cargo.lock', 'mise.toml') }}
208+ restore-keys : |
209+ android-build-cargo-
210+
211+ - name : Cache Gradle
212+ uses : actions/cache@v4
213+ with :
214+ path : |
215+ ~/.gradle/caches
216+ ~/.gradle/wrapper
217+ android/.gradle
218+ key : android-build-gradle-${{ hashFiles('android/**/*.gradle.kts', 'mise.toml') }}
219+ restore-keys : |
220+ android-build-gradle-
221+
222+ - name : Build Android Rust libraries
223+ run : mise exec -- mise run android:build-rust
224+
225+ - name : Build Android WebView bridge
226+ run : mise exec -- mise run android:kotlin
227+
228+ - name : Prepare Android artifacts
229+ run : |
230+ CARGO_TARGET_DIR="$(cargo metadata --no-deps --format-version 1 | python -c 'import json,sys; print(json.load(sys.stdin)["target_directory"])')"
231+ mkdir -p artifacts/aarch64-linux-android artifacts/x86_64-linux-android artifacts/android-webview
232+ cp "$CARGO_TARGET_DIR/aarch64-linux-android/release/libgdcef.so" artifacts/aarch64-linux-android/
233+ cp "$CARGO_TARGET_DIR/x86_64-linux-android/release/libgdcef.so" artifacts/x86_64-linux-android/
234+ cp android/godot-cef-webview/build/outputs/aar/godot-cef-webview-debug.aar artifacts/android-webview/
235+
236+ - name : Upload Android ARM64 artifact
237+ uses : actions/upload-artifact@v4
238+ with :
239+ name : gdcef-aarch64-linux-android
240+ path : artifacts/aarch64-linux-android
241+ retention-days : 30
242+
243+ - name : Upload Android x86_64 artifact
244+ uses : actions/upload-artifact@v4
245+ with :
246+ name : gdcef-x86_64-linux-android
247+ path : artifacts/x86_64-linux-android
248+ retention-days : 30
249+
250+ - name : Upload Android WebView bridge artifact
251+ uses : actions/upload-artifact@v4
252+ with :
253+ name : gdcef-android-webview
254+ path : artifacts/android-webview
255+ retention-days : 30
256+
187257 pack :
188- needs : [build-macos, build-windows, build-linux]
258+ needs : [build-macos, build-windows, build-linux, build-android ]
189259 runs-on : ubuntu-latest
190260 name : Pack Addon
191261
0 commit comments