Merge pull request #1129 from xtensor-stack/bug/548 #1660
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android build | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - armeabi-v7a | |
| - arm64-v8a | |
| - x86 | |
| - x86_64 | |
| api: | |
| - 16 | |
| - 18 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Build script | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| API: ${{ matrix.api }} | |
| run: | | |
| mkdir _build | |
| NDK="$($ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list_installed | sed -E 's/( +[|] +)/|/g;s/ +$//' | grep '^ ndk' | cut -d '|' -f 4 | sort | head -n1)" | |
| cd _build && \ | |
| cmake .. -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/$NDK/build/cmake/android.toolchain.cmake \ | |
| -DANDROID_ABI=$ABI \ | |
| -DANDROID_PLATFORM=android-$API \ | |
| -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . --verbose |