github: Remove build on Ubuntu Xenial (16.04)
[strongswan.git] / .github / workflows / android.yml
1 name: Android
2
3 on: [push, pull_request]
4
5 env:
6   CCACHE_BASEDIR: ${{ github.workspace }}
7   CCACHE_COMPRESS: true
8   CCACHE_MAXSIZE: 400M
9   CC: gcc
10   OS_NAME: linux
11
12 jobs:
13   pre-check:
14     runs-on: ubuntu-latest
15     outputs:
16       should_skip: ${{ steps.skip-check.outputs.should_skip }}
17     steps:
18       - id: skip-check
19         uses: fkirc/skip-duplicate-actions@master
20         with:
21           concurrent_skipping: 'same_content'
22
23   android:
24     needs: pre-check
25     if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
26     runs-on: ubuntu-latest
27     env:
28       TEST: android
29       # since the NDK is newly installed every time, we have to use this to avoid cache misses
30       CCACHE_COMPILERCHECK: content
31     steps:
32       # even though we don't specify a specific version in our gradle files, the
33       # build fails without this because some arbitrary NDK version, that's
34       # weirdly not installed, is requested
35       - name: Install NDK
36         run: yes | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;21.0.6113669'
37       - uses: actions/checkout@v2
38       - uses: actions/cache@v2
39         with:
40           path: ~/.ccache
41           key: ccache-android-${{ github.sha }}
42           restore-keys: |
43             ccache-android-
44       - run: |
45           sudo apt-get install -qq ccache
46           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
47           ccache -z
48       - uses: ./.github/actions/default
49       - run: ccache -s
50       - uses: actions/upload-artifact@v2
51         with:
52           name: Lint Results
53           path: src/frontends/android/app/build/reports/lint-results.xml