mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
github: Use NDK version in build.gradle to build OpenSSL
Also fix the path to the sdkmanager (the old one was removed in the latest images and the incorrect path caused a weird sudo error) and install Java 17 as that's necessary for newer versions of the Gradle plugin.
This commit is contained in:
parent
980491ebcd
commit
0d61efdf02
23
.github/workflows/android.yml
vendored
23
.github/workflows/android.yml
vendored
@ -26,26 +26,37 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST: android
|
||||
# since the NDK is newly installed every time, we have to use this to avoid cache misses
|
||||
# since the NDK might be newly installed, we have to use this to avoid cache misses
|
||||
CCACHE_COMPILERCHECK: content
|
||||
steps:
|
||||
# we currently don't specify a specific NDK version in our gradle files,
|
||||
# so we load the version the Gradle Plugin uses as default but which is
|
||||
# not installed anymore in the image
|
||||
- name: Install NDK
|
||||
run: yes | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;23.1.7779620'
|
||||
- uses: actions/checkout@v3
|
||||
# make sure the NDK we reference is installed and exported so we can use it to build OpenSSL
|
||||
- name: Install NDK
|
||||
id: ndk-install
|
||||
run: |
|
||||
NDK_VERSION=$(grep "ndkVersion" src/frontends/android/app/build.gradle | sed -e 's/.*"\(.*\)"/\1/')
|
||||
echo Using NDK ${NDK_VERSION}
|
||||
yes | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${NDK_VERSION}"
|
||||
echo "ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/${NDK_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/ccache
|
||||
key: ccache-android-${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache-android-
|
||||
# necessary for newer versions of the Gradle plugin
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
cache: 'gradle'
|
||||
- run: |
|
||||
sudo apt-get install -qq ccache
|
||||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
|
||||
ccache -z
|
||||
- uses: ./.github/actions/default
|
||||
env:
|
||||
ANDROID_NDK_ROOT: ${{ steps.ndk-install.outputs.ANDROID_NDK_ROOT }}
|
||||
- run: ccache -s
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
Loading…
x
Reference in New Issue
Block a user