ci: Test Android NDK matrix combinations
This commit is contained in:
parent
c81b34fb24
commit
026a9bcdb2
72
.github/workflows/continuous_integration.yml
vendored
72
.github/workflows/continuous_integration.yml
vendored
@ -144,56 +144,38 @@ jobs:
|
|||||||
cd ../Test && bash runtests
|
cd ../Test && bash runtests
|
||||||
|
|
||||||
android:
|
android:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
# Android NDK currently offers 2 different toolchains.
|
||||||
compiler: [{cc: clang, cxx: clang++}]
|
# Test both to ensure we are compatible with either approach.
|
||||||
cmake_build_type: [Release]
|
LEGACY: [ON, OFF]
|
||||||
|
# Oldest/newest NDK currently provided by GitHub runners
|
||||||
|
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#android
|
||||||
|
NDK: [23.2.8568313, 25.2.9519653]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
- name: Install Ubuntu Package Dependencies
|
- uses: lukka/get-cmake@latest
|
||||||
if: ${{matrix.os == 'ubuntu-20.04'}}
|
- name: Setup ccache
|
||||||
run: |
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
sudo apt-get -qq update
|
with:
|
||||||
sudo apt-get install -y clang-6.0
|
key: android-${{ matrix.LEGACY }}-${{ matrix.NDK }}
|
||||||
- name: Install Android NDK
|
|
||||||
run: |
|
|
||||||
export ANDROID_NDK=$HOME/android-ndk
|
|
||||||
git init $ANDROID_NDK
|
|
||||||
pushd $ANDROID_NDK
|
|
||||||
git remote add dneto0 https://github.com/dneto0/android-ndk.git
|
|
||||||
git fetch --depth=1 dneto0 r17b-strip
|
|
||||||
git checkout FETCH_HEAD
|
|
||||||
popd
|
|
||||||
- name: Install GoogleTest
|
|
||||||
run: |
|
|
||||||
# check out pre-breakage version of googletest; can be deleted when
|
|
||||||
# issue 3128 is fixed
|
|
||||||
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
|
||||||
mkdir -p External/googletest
|
|
||||||
cd External/googletest
|
|
||||||
git init
|
|
||||||
git remote add origin https://github.com/google/googletest.git
|
|
||||||
git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
|
|
||||||
git reset --hard FETCH_HEAD
|
|
||||||
cd ../..
|
|
||||||
- name: Update Glslang Sources
|
- name: Update Glslang Sources
|
||||||
|
run: ./update_glslang_sources.py
|
||||||
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
./update_glslang_sources.py
|
cmake -S . -B build/ \
|
||||||
- name: Build
|
--toolchain $ANDROID_HOME/ndk/${{ matrix.NDK }}/build/cmake/android.toolchain.cmake \
|
||||||
|
-D CMAKE_BUILD_TYPE=Release \
|
||||||
|
-D ANDROID_ABI=armeabi-v7a \
|
||||||
|
-D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=${{ matrix.LEGACY }} \
|
||||||
|
-D BUILD_TESTING=OFF
|
||||||
env:
|
env:
|
||||||
CC: ${{matrix.compiler.cc}}
|
CMAKE_GENERATOR: Ninja
|
||||||
CXX: ${{matrix.compiler.cxx}}
|
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||||
run: |
|
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||||
export ANDROID_NDK=$HOME/android-ndk
|
- name: Build
|
||||||
export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake
|
run: cmake --build build/
|
||||||
echo $ANDROID_NDK
|
|
||||||
echo $TOOLCHAIN_PATH
|
|
||||||
mkdir build && cd build
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH} -DANDROID_NATIVE_API_LEVEL=android-14 -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DANDROID_ABI="armeabi-v7a with NEON" -DBUILD_TESTING=OFF ..
|
|
||||||
make -j4
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user