From 676a6e2b6709fcafa83df3e9278cac0f8d22bdf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 7 Nov 2024 11:56:30 +0100 Subject: [PATCH] another try --- .github/workflows/android_builds.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index 0f880d0d9a1c..705599a3b320 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -4,6 +4,8 @@ on: [push, pull_request] # Global Settings env: SCONSFLAGS: platform=android verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2 + ANDROID_HOME: /home/runner/work/godot/godot/android-sdk + ANDROID_NDK_ROOT: /home/runner/work/godot/godot/android-sdk/ndk/21.1.6352462 ANDROID_NDK_VERSION: 21.1.6352462 jobs: @@ -22,20 +24,19 @@ jobs: sudo cp -f misc/ci/sources.list /etc/apt/sources.list sudo apt-get update - - name: Set up Java 8 + - name: Set up Java 8, Android SDK and NDK run: | - # Not using actions/setup-java as it doesn't seem to work well with the Android NDK stuff. - # The version already present in Ubuntu should be fine. + # Not using actions/setup-java and android-actions/setup-android as I couldn't make them work for such old Java/SDK/NDK combination. sudo apt-get install openjdk-8-jdk sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java - - - name: Setup Android SDK and NDK - uses: android-actions/setup-android@v3 - with: + mkdir -p ${{env.ANDROID_HOME}} + cd ${{env.ANDROID_HOME}} # Using an old version to be compatible with older Java. - cmdline-tools-version: 8512546 + curl -LO https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip + unzip commandlinetools-linux-8512546_latest.zip + yes | ./cmdline-tools/bin/sdkmanager --sdk_root=${{env.ANDROID_HOME}} --licenses # https://github.com/godotengine/build-containers/blob/3.2/Dockerfile.android - packages: build-tools;28.0.3 platforms;android-28 cmake;3.10.2.4988404 ndk;${{env.ANDROID_NDK_VERSION}} + ./cmdline-tools/bin/sdkmanager --sdk_root=${{env.ANDROID_HOME}} 'build-tools;28.0.3' 'platforms;android-28' 'cmake;3.10.2.4988404' 'ndk;${{env.ANDROID_NDK_VERSION}}' # Use python 3.x release (works cross platform) - name: Set up Python 3.x @@ -54,8 +55,6 @@ jobs: scons --version - name: Compilation - env: - ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/${{env.ANDROID_NDK_VERSION}}/ run: | scons target=release tools=no android_arch=armv7 scons target=release tools=no android_arch=arm64v8