From 643a5b7b81377af42e0c2fc9b5bafc11f54a71f0 Mon Sep 17 00:00:00 2001 From: Emre Kultursay Date: Mon, 2 Mar 2026 12:26:39 -0800 Subject: [PATCH] Build and upload all Android artifacts on CI 1. Build Android libraries on Ubuntu, not macOS. It's cheaper to use Ubuntu. 2. Use latest NDK, which is r29. This means we get 16KB page support enabled by default. 3. Build two ABIs: arm64 and x86_64 4. Use the `scripts/android.py` script instead of invoking CMake directly. 5. Upload the resulting artifacts to GitHub actions. This includes all layers (even though we don't really need the api_dump layer, it's easier to build/upload it this way). --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48fbbb3fb2..7703e45d01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,23 +80,23 @@ jobs: - run: cmake --install build --prefix build/install android: - runs-on: macos-latest + runs-on: ubuntu-latest if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v6 - uses: lukka/get-cmake@latest - - name: Configure + - name: Build run: | - cmake -S . -B build/ --toolchain $ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \ - -D ANDROID_PLATFORM=29 \ - -D CMAKE_ANDROID_ARCH_ABI=arm64-v8a \ - -D CMAKE_ANDROID_STL_TYPE=c++_static \ - -D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=NO \ - -D CMAKE_BUILD_TYPE=Release \ - -D UPDATE_DEPS=ON \ - -G "Ninja" - - run: cmake --build build - - run: cmake --install build --prefix build/install + ANDROID_NDK_ROOT=${ANDROID_NDK_LATEST_HOME} scripts/android.py \ + --config Release \ + --app-abi "arm64-v8a x86_64" + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: layers-${{ github.run_id }} + path: build-android/libs/lib/**/* + if-no-files-found: 'error' macos: runs-on: macos-latest