diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5abc07..b5027f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ env: CTEST_OUTPUT_ON_FAILURE: 1 jobs: - build: + desktop-build: runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -74,3 +74,43 @@ jobs: run: | ctest --test-dir "${{ env.CMAKE_BUILD_DIR }}" + android-build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + crypto: [OPENSSL_1_1, OPENSSL_3, BORINGSSL] + no_alloc: [OFF, ON] + + env: + CMAKE_BUILD_DIR: ${{ github.workspace }}/build + CMAKE_GENERATOR: "Ninja" + + steps: + - uses: actions/checkout@v4 + + - name: dependencies + run: | + sudo apt-get install -y nasm ninja-build + + - name: Restore cache + uses: actions/cache@v4 + with: + path: | + ${{ env.CMAKE_BUILD_DIR }}/vcpkg_installed + key: android-arm64-v8a-${{ matrix.crypto }}-${{ hashFiles( '**/vcpkg.json' ) }} + + - name: configure + run: cmake -B "${{ env.CMAKE_BUILD_DIR }}" + -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" + -DVCPKG_TARGET_TRIPLET="arm64-android" + -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" + -DANDROID_ABI="arm64-v8a" + -DANDROID_PLATFORM=android-24 + -DCRYPTO="${{ matrix.crypto }}" + -DVCPKG_MANIFEST_DIR="alternatives/${{ matrix.crypto }}" + -DNO_ALLOC="${{ matrix.no_alloc }}" + + - name: build + run: cmake --build "${{ env.CMAKE_BUILD_DIR }}" --config Release +