-
Notifications
You must be signed in to change notification settings - Fork 544
58 lines (55 loc) · 1.65 KB
/
PR.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
name: PR Build
on: [pull_request]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: true
CCACHE_MAXSIZE: 1G
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
steps:
- name: Check out
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- uses: seanmiddleditch/gha-setup-ninja@master
with:
version: 1.12.0
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-${{ github.sha }}
restore-keys: ${{ runner.os }}
- name: Build with Gradle
run: |
sudo rm -rf $ANDROID_HOME/cmake
echo 'org.gradle.caching=true' >> gradle.properties
echo 'org.gradle.parallel=true' >> gradle.properties
echo 'org.gradle.vfs.watch=true' >> gradle.properties
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
echo 'android.native.buildOutput=verbose' >> gradle.properties
./gradlew assemble
- name: Stop gradle daemon
run: ./gradlew --stop
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-artifact
path: |
app/build/outputs
app/release