subsurface/.github/workflows/android.yml
Dirk Hohndel c1e7cd1428 build-system: consistently mark git directories safe
Even on platforms that don't have the new git version, yet.
And using the convoluted way to create an environment variable that should
point to our checked out tree in the GitHub Action. The more obvious ways
have resulted in failed builds for obscure reasons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-05-14 10:28:56 -07:00

43 lines
1.3 KiB
YAML

name: Android
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
buildAndroid:
runs-on: ubuntu-latest
container:
image: docker://subsurface/android-build-container:5.15.1
steps:
- name: checkout sources
uses: actions/checkout@v1
- name: run build
env:
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
run: |
# this is rather awkward, but it allows us to use the preinstalled
# Android and Qt versions with relative paths
cd $GITHUB_WORKSPACE/..
ln -s /android/5.15.* .
ln -s /android/build-tools .
ln -s /android/cmdline-tools .
ln -s /android/ndk .
ln -s /android/platform-tools .
ln -s /android/platforms .
ln -s /android/tools .
ls -l
git config --global user.email "ci@subsurface-divelog.org"
git config --global user.name "Subsurface CI"
# it turns out our build container doesn't have a native compiler
# yet ECM needs that
apt-get install --reinstall cpp-7 gcc-7-base libgcc-7-dev libcc1-0 gcc-7
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
bash -x ./subsurface/packaging/android/qmake-build.sh