small fix #39
This file contains 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: Build Android | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/build-android.yml' | |
- 'src/**' | |
- 'include/**' | |
- 'example/**' | |
- 'CMakeLists.txt' | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
abi: [arm64-v8a, x86_64] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install CMake | |
run: | | |
sudo apt-get update | | |
sudo apt-get install -y cmake | |
echo "CMake Version: $(cmake --version)" | |
- name: Setup NDK | |
run: | | |
wget https://dl.google.com/android/repository/android-ndk-r27-linux.zip | |
unzip android-ndk-r27-linux.zip | |
export ANDROID_NDK_HOME=${PWD}/android-ndk-r27 | |
echo "ANDROID_NDK_HOME=${PWD}/android-ndk-r27" >> $GITHUB_ENV | |
- name: Verify NDK Version | |
run: | | |
${ANDROID_NDK_HOME}/ndk-build --version | |
- name: Determine CPU Cores | |
id: cpu-info | |
run: echo "CPU_CORES=$(nproc)" >> $GITHUB_ENV | |
- name: Configure CMake | |
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=android-21 | |
- name: Build | |
run: cmake --build build --config Release -- -j${{ env.CPU_CORES }} | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: android-${{ matrix.abi }} | |
path: | | |
lib/ | |
include/ |