From 213cd3ce254334bb88d4e88ed69b674c9fdb8f61 Mon Sep 17 00:00:00 2001 From: Iscle Date: Tue, 16 May 2023 01:57:13 +0200 Subject: [PATCH] Actions: Set minimum SDK version to 21 --- .github/workflows/build.yml | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c003111..a903eee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,17 +4,22 @@ on: [push, pull_request] env: NDK_VERSION: 25.2.9519653 + MIN_SDK_VERSION: 21 jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + abi: ['armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'] + steps: - uses: actions/checkout@v3 - name: Cache NDK id: ndk-cache - uses: actions/cache@v3 + uses: actions/cache@v2 with: path: ndk key: ndk-${{ env.NDK_VERSION }} @@ -30,36 +35,22 @@ jobs: - name: Set NDK environment variable run: echo "ANDROID_NDK_HOME=$(pwd)/ndk" >> $GITHUB_ENV - - name: Build with CMake for arm + - name: Build with CMake run: | - cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a . + cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=android-${{ env.MIN_SDK_VERSION }} . cmake --build . -- -j$(nproc) - env: - BUILD_TYPE: 'arm' - - name: Rename and move output for arm + - name: Rename and move output run: | - mv libv4a_re.so libv4a_re_arm.so + mv libv4a_re.so libv4a_re_${{ matrix.abi }}.so - name: Clean build run: | cmake --build . --target clean - - name: Build with CMake for arm64 - run: | - cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a . - cmake --build . -- -j$(nproc) - env: - BUILD_TYPE: 'arm64' - - - name: Rename and move output for arm64 - run: | - mv libv4a_re.so libv4a_re_arm64.so - - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: compiled-binaries path: | - libv4a_re_arm.so - libv4a_re_arm64.so + libv4a_re_*.so