diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c561dbf..8570224 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,16 +5,18 @@ on: [push] jobs: build: runs-on: ubuntu-latest + container: + image: kunitoki/android-ndk-r21 steps: - uses: actions/checkout@v2 with: submodules: recursive - name: Install Android NDK - run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;21.0.6113669' > /dev/null 2>&1 - - name: Install GFortran & OpenGL deps + run: echo "y" | ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;21.0.6113669' > /dev/null 2>&1 + - name: Install build system dependencies run: | - sudo apt-get update - sudo apt-get install -y gfortran mesa-common-dev libglfw3-dev + apt-get update + apt-get install -y gfortran mesa-common-dev libglfw3-dev clang - name: Build for Linux run: | DO_CLEAR=OFF BUILD_VISUALIZATIONS=OFF ./scripts/build.sh diff --git a/scripts/android/build.sh b/scripts/android/build.sh index c4db971..e9087c3 100755 --- a/scripts/android/build.sh +++ b/scripts/android/build.sh @@ -15,7 +15,9 @@ else fi export ANDROID_HOME export ANDROID_SDK="$ANDROID_HOME" -export ANDROID_NDK="$ANDROID_HOME/ndk-bundle" +# not always installed into this default directory in, e.g., CI environments +: "${ANDROID_NDK:=$ANDROID_HOME/ndk-bundle}" +export ANDROID_NDK # Build Eigen # TODO: Move to component/eigen.sh