Use 16-core GitHub runner Android (#2891)
This commit is contained in:
153
.github/workflows/android-ci.yml
vendored
153
.github/workflows/android-ci.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
files_yaml_from_source_file: .github/changed-files.yml
|
||||
|
||||
android-build:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: MapLibre_Native_Ubuntu_24_04_x84_16_core
|
||||
needs:
|
||||
- pre_job
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
@@ -48,18 +48,6 @@ jobs:
|
||||
IS_LOCAL_DEVELOPMENT: false
|
||||
MLN_ANDROID_STL: c++_static
|
||||
steps:
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
if: startsWith(runner.name, 'GitHub Actions')
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: false
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
docker-images: true
|
||||
swap-storage: false
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
@@ -72,6 +60,12 @@ jobs:
|
||||
distribution: "temurin"
|
||||
java-version: "17"
|
||||
|
||||
- name: Get CMake and Ninja
|
||||
uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: 3.24.1
|
||||
ninjaVersion: latest
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
@@ -96,14 +90,20 @@ jobs:
|
||||
run: node platform/android/scripts/generate-style-code.mjs
|
||||
working-directory: .
|
||||
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
- run: |
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip3 install pre-commit
|
||||
|
||||
- run: |
|
||||
source venv/bin/activate
|
||||
pre-commit run clang-format --all-files
|
||||
continue-on-error: true # this can mean files are modified, which is not an error
|
||||
with:
|
||||
extra_args: clang-format --all-files
|
||||
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
with:
|
||||
extra_args: clang-format --all-files
|
||||
- run: |
|
||||
source venv/bin/activate
|
||||
pre-commit run clang-format --all-files
|
||||
rm -rf venv
|
||||
|
||||
- uses: infotroph/tree-is-clean@v1
|
||||
with:
|
||||
@@ -178,105 +178,35 @@ jobs:
|
||||
platform/android/InstrumentationTestApp.apk
|
||||
platform/android/InstrumentationTests.apk
|
||||
|
||||
android-build-cpp-test:
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
- pre_job
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
defaults:
|
||||
run:
|
||||
- name: Create data.zip in assets directory
|
||||
run: zip -r test/android/app/src/main/assets/data.zip -@ < test/android/app/src/main/assets/to_zip.txt
|
||||
working-directory: .
|
||||
|
||||
- name: Build C++ Unit Tests App
|
||||
working-directory: test/android
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: "17"
|
||||
|
||||
- name: Get CMake and Ninja
|
||||
uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: 3.24.1
|
||||
ninjaVersion: latest
|
||||
|
||||
- uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.job }}
|
||||
|
||||
- name: Create data.zip in assets directory
|
||||
run: zip -r test/android/app/src/main/assets/data.zip -@ < test/android/app/src/main/assets/to_zip.txt
|
||||
working-directory: .
|
||||
|
||||
- name: Build C++ Unit Tests App
|
||||
run: |
|
||||
./gradlew assembleDebug assembleAndroidTest
|
||||
cp app/build/outputs/apk/debug/app-debug.apk .
|
||||
cp app/build/outputs/apk/androidTest/release/app-release-androidTest.apk .
|
||||
|
||||
- name: Store C++ Unit Tests .apk files
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-cpp-tests
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
./test/android/app-debug.apk
|
||||
./test/android/app-release-androidTest.apk
|
||||
|
||||
android-build-render-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
flavor: [opengl, vulkan]
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_job
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
steps:
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
if: startsWith(runner.name, 'GitHub Actions')
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: false
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
docker-images: true
|
||||
swap-storage: false
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.job }}
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: "17"
|
||||
|
||||
- name: Build Render Test App
|
||||
run: |
|
||||
./gradlew assemble${{ matrix.flavor }} assemble${{ matrix.flavor }}AndroidTest
|
||||
cp app/build/outputs/apk/${{ matrix.flavor }}/release/app-${{ matrix.flavor }}-release.apk RenderTestsApp-${{ matrix.flavor }}.apk
|
||||
cp app/build/outputs/apk/androidTest/${{ matrix.flavor }}/release/app-${{ matrix.flavor }}-release-androidTest.apk RenderTests-${{ matrix.flavor }}.apk
|
||||
working-directory: ./render-test/android
|
||||
./gradlew assembleDebug assembleAndroidTest
|
||||
cp app/build/outputs/apk/debug/app-debug.apk .
|
||||
cp app/build/outputs/apk/androidTest/release/app-release-androidTest.apk .
|
||||
|
||||
- name: Store Render Test .apk files
|
||||
- name: Store C++ Unit Tests .apk files
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-render-tests-${{ matrix.flavor }}
|
||||
name: android-cpp-tests
|
||||
if-no-files-found: error
|
||||
path: |
|
||||
./render-test/android/RenderTestsApp-${{ matrix.flavor }}.apk
|
||||
./render-test/android/RenderTests-${{ matrix.flavor }}.apk
|
||||
./test/android/app-debug.apk
|
||||
./test/android/app-release-androidTest.apk
|
||||
|
||||
- name: Build and Upload Render Test APKs for OpenGL
|
||||
uses: ./.github/actions/android-build-and-upload-render-test
|
||||
with:
|
||||
flavor: opengl
|
||||
|
||||
- name: Build and Upload Render Test APKs for Vulkan
|
||||
uses: ./.github/actions/android-build-and-upload-render-test
|
||||
with:
|
||||
flavor: vulkan
|
||||
|
||||
android-ci-result:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -284,7 +214,6 @@ jobs:
|
||||
needs:
|
||||
- pre_job
|
||||
- android-build
|
||||
- android-build-render-test
|
||||
steps:
|
||||
- name: Mark result as failed
|
||||
if: needs.android-build.result != 'success'
|
||||
|
||||
Reference in New Issue
Block a user