You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +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`.
(cherry picked from commit 5f19e1d571)
This commit is contained in:
23
.github/workflows/android_builds.yml
vendored
23
.github/workflows/android_builds.yml
vendored
@@ -23,17 +23,10 @@ jobs:
|
||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
|
||||
# Install dependencies
|
||||
- name: Install Java, Android SDK and NDK
|
||||
run: |
|
||||
sudo apt-get install openjdk-8-jdk
|
||||
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
|
||||
echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $GITHUB_ENV
|
||||
java -version
|
||||
misc/ci/android-tools-linux.sh
|
||||
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
|
||||
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
|
||||
@@ -56,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)"
|
||||
@@ -67,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
|
||||
|
||||
Reference in New Issue
Block a user