-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (55 loc) · 1.9 KB
/
android-build.yml
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
name: Android Build CI
on:
push:
branches: [ main ]
merge_group:
pull_request:
branches: [ main ]
jobs:
android-build:
runs-on: macos-11
steps:
- name: android_images cache
uses: actions/cache@v2
with:
path: |
$ANDROID_SDK_ROOT/system-images/
key: ${{ runner.os }}-android_images-${{ hashFiles('android_build.sh') }}
restore-keys: |
${{ runner.os }}-android_images-
- uses: actions/checkout@v3
- run: |
export JAVA_HOME=$JAVA_HOME_8_X64
echo y | $ANDROID_SDK_ROOT/tools/bin/sdkmanager "system-images;android-31;google_apis;x86_64"
echo no | $ANDROID_SDK_ROOT/tools/bin/avdmanager create avd -n testavd -c 2048M -k "system-images;android-31;google_apis;x86_64"
$ANDROID_SDK_ROOT/tools/emulator @testavd -partition-size 2048 -wipe-data &
- name: NDK cache
uses: actions/cache@v2
with:
path: |
NDK/
key: ${{ runner.os }}-ndk-${{ hashFiles('android_build.sh') }}
restore-keys: |
${{ runner.os }}-ndk-
- name: Android module cache
uses: actions/cache@v2
with:
path: |
mobile_modules/android_module/
key: ${{ runner.os }}-android-${{ hashFiles('**/Cargo.lock', '**/*.kt', 'android_build.sh') }}
- name: Rust cache
uses: Swatinem/rust-cache@v1
- name: Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- run: |
export ANDROID_HOME=$HOME/Library/Android/sdk
export NDK_HOME=$ANDROID_NDK_HOME
export JAVA_HOME=$JAVA_HOME_11_X64
./android_build.sh x86