1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

CI: Refactor Android workflow, use pre-installed SDK and NDK

No need to waste time downloading all this when it's readily available :)
Also use the official action to setup Java 8.

Also build both architectures (armv7 and arm64v8) and generate the APK,
so we can upload it.

Remove now unused and outdated `misc/ci/android-tools-linux.sh`.
This commit is contained in:
Rémi Verschelde
2020-10-22 13:10:34 +02:00
parent baec2445e1
commit 5f19e1d571
3 changed files with 11 additions and 125 deletions

View File

@@ -23,20 +23,10 @@ jobs:
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install openjdk-8-jdk
echo 'JAVA_HOME=usr/lib/jvm/java-8-openjdk-amd64' >> $GITHUB_ENV
- name: Install Android SDK and NDK
run: |
echo '/usr/lib/jvm/java-8-openjdk-amd64/jre/bin' >> $GITHUB_PATH
java -version
echo "ANDROID_HOME=$(pwd)/godot-dev/build-tools/android-sdk" >> $GITHUB_ENV
echo "ANDROID_NDK_ROOT=$(pwd)/godot-dev/build-tools/android-ndk" >> $GITHUB_ENV
misc/ci/android-tools-linux.sh
source ~/.bashrc
- name: Set up Java 8
uses: actions/setup-java@v1
with:
java-version: 8
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
@@ -59,7 +49,6 @@ jobs:
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
# You can test your matrix by printing the current Python version
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
@@ -70,8 +59,13 @@ jobs:
- name: Compilation
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk-bundle
run: |
scons target=release tools=no
scons target=release tools=no android_arch=armv7
scons target=release tools=no android_arch=arm64v8
cd platform/android/java
./gradlew generateGodotTemplates
cd ../../..
ls -l bin/
- uses: actions/upload-artifact@v2

View File

@@ -98,7 +98,7 @@ jobs:
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: linux-editor-cache
id: linux-sanitizers-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/