-
Notifications
You must be signed in to change notification settings - Fork 84
90 lines (79 loc) · 3.38 KB
/
android.yml
File metadata and controls
90 lines (79 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: 🤖 Android Builds
# TODO: Investigate making this on tag instead of push since builds take so long
on: [push]
# Global Cache Settings
env:
GODOT_BASE_BRANCH: '3.2.2-stable'
BASE_BRANCH: master
SCONS_CACHE_LIMIT: 4096
jobs:
android-template:
runs-on: ubuntu-latest
name: Android Template
container:
# See how this image is built at https://github.com/Flux159/godot-docker
image: flux159/godot:1.0.0
steps:
- name: Get dependencies
run: |
apt-get update
apt-get install -y openjdk-8-jdk curl unzip
echo "::set-env name=JAVA_HOME::/usr/lib/jvm/java-8-openjdk-amd64"
- name: Checkout Godot
uses: actions/checkout@v2
with:
repository: 'godotengine/godot'
ref: ${{ env.GODOT_BASE_BRANCH }}
- name: Checkout ECMAScript
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/modules/ECMAScript/
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
id: android-template-cache
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{github.job}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{github.job}}-${{env.BASE_BRANCH}}-${{github.ref}}
${{github.job}}-${{env.BASE_BRANCH}}
- name: Install Android SDK and NDK
run: |
echo "::set-env name=PATH::/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:$(pwd)/godot-dev/build-tools/android-sdk/tools:$(pwd)/godot-dev/build-tools/android-sdk/tools/bin:${PATH}"
echo "::set-env name=ANDROID_HOME::$(pwd)/godot-dev/build-tools/android-sdk"
echo "::set-env name=ANDROID_NDK_ROOT::$(pwd)/godot-dev/build-tools/android-ndk"
wget https://raw.githubusercontent.com/godotengine/godot/431930b/misc/ci/android-tools-linux.sh
chmod +x android-tools-linux.sh
./android-tools-linux.sh
- name: Build godot with ECMAScript module for Android (release)
run: |
scons p=android android_arch=armv7 tools=no target=release -j8
scons p=android android_arch=arm64v8 tools=no target=release -j8
scons p=android android_arch=x86 tools=no target=release -j8
scons p=android android_arch=x86_64 tools=no target=release -j8
cd platform/android/java
./gradlew generateGodotTemplates
- name: Publish artifact (release)
uses: actions/upload-artifact@v2
with:
name: android_release
path: bin/
- name: Remove Previous Build
uses: JesseTG/rm@v1.0.2
with:
path: ${{github.workspace}}/bin/
- name: Build godot with ECMAScript module for Android (debug)
run: |
scons p=android android_arch=armv7 tools=no target=release_debug -j8
scons p=android android_arch=arm64v8 tools=no target=release_debug -j8
scons p=android android_arch=x86 tools=no target=release_debug -j8
scons p=android android_arch=x86_64 tools=no target=release_debug -j8
cd platform/android/java
./gradlew generateGodotTemplates
- name: Publish artifact (debug)
uses: actions/upload-artifact@v2
with:
name: android_debug
path: bin/