name: android on: push: paths: - ".github/workflows/android.yml" - "cmake/**" - "CMakeLists.txt" - "tile/**" - "third_party/**" pull_request: paths: - ".github/workflows/android.yml" - "cmake/**" - "CMakeLists.txt" - "tile/**" - "third_party/**" concurrency: group: android-${{github.ref}} cancel-in-progress: true jobs: build: runs-on: ubuntu-20.04 env: TILE_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake \ -DANDROID_PLATFORM=android-21 \ -DCMAKE_INSTALL_PREFIX=install \ -DCMAKE_BUILD_TYPE=Release \ -DNCNN_VULKAN=ON \ steps: - uses: actions/checkout@v4 with: submodules: true - name: install-tools run: | apt-get update -y apt-get install -y cmake make - name: armeabi-v7a run: | mkdir build-armeabi-v7a && cd build-armeabi-v7a cmake .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON cmake --build . -j $(nproc) - name: arm64-v8a run: | mkdir build-arm64-v8a && cd build-arm64-v8a cmake .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="arm64-v8a" cmake --build . -j $(nproc) - name: x86 run: | mkdir build-x86 && cd build-x86 cmake .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="x86" cmake --build . -j $(nproc) - name: x86_64 run: | mkdir build-x86_64 && cd build-x86_64 cmake .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="x86_64" cmake --build . -j $(nproc)