-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (59 loc) · 2.41 KB
/
android.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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Android CI
on:
push:
branches: [ "main" ]
paths:
- android/**
pull_request:
branches: [ "main" ]
paths:
- android/**
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: source submodules
run: git submodule update --init
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: rust deps
run: cargo install [email protected] --locked
- name: rust targets
run: rustup target add aarch64-linux-android armv7-linux-androideabi
- name: rust cache
uses: actions/[email protected]
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
rust/target/
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# Run the post step to save the cache even if another step before fail
save-always: true
- name: Grant execute permission for gradlew
working-directory: android/
run: chmod +x gradlew
- name: Build with Gradle
working-directory: android/
run: ./gradlew build
- name: Upload Build Artifacts (unsigned Apks)
uses: actions/[email protected]
with:
# Artifact name
name: BuiltApks-${{ github.sha }}
# A file, directory or wildcard pattern that describes what to upload
path: android/app/build/outputs/apk/
# The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
#compression-level: # optional, default is 6
# If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.
#overwrite: # optional, default is false