-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (60 loc) · 2.4 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
name: Build
on: [ push, pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Configuration Environment
shell: bash
run: |
echo 'android.sdk.channel=3' >> gradle.properties
echo 'android.native.buildOutput=verbose' >> gradle.properties
echo 'org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8' >> gradle.properties
echo 'org.gradle.caching=true' >> gradle.properties
echo 'org.gradle.parallel=true' >> gradle.properties
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
sudo usermod -aG kvm,render $USER
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null || true
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --channel=3 platform-tools emulator
sh copy_test_files.sh
git apply boringssl/src/main/native/patchs/*.patch
rm -rf boringssl/src/main/native/src/third_party/googletest
curl -sL https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz | tar -xz -C boringssl/src/main/native/src/third_party
mv boringssl/src/main/native/src/third_party/googletest-1.15.2 boringssl/src/main/native/src/third_party/googletest
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: |
./gradlew :a:assemble
./gradlew :b:publishToMavenLocal
./gradlew :b:publishToMavenLocal -PenableLTO=1
- name: Test with Gradle
run: |
./gradlew :a:allDevicesDebugAndroidTest
- name: Upload app
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: app
path: app/build/outputs
compression-level: 9
- name: Upload library
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: library
path: ~/.m2
compression-level: 9
include-hidden-files: true