forked from dyhkwong/Exclave
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (66 loc) · 1.89 KB
/
debug.yml
File metadata and controls
66 lines (66 loc) · 1.89 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
name: Debug Build
on:
push:
branches:
- dev*
paths:
- "app/**"
- "buildSrc/**"
- "library/**"
- ".github/workflows/debug.yml"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.25.7
cache-dependency-path: "library/core/go.sum"
- name: Setup Go Mobile
# https://github.com/golang/mobile/blob/c31d5b91ecc32c0d598b8fe8457d244ca0b4e815/cmd/gomobile/init.go#L83
run: |
go install github.com/sagernet/gomobile/cmd/gomobile@v0.1.11
go install github.com/sagernet/gomobile/cmd/gobind@v0.1.11
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r29
- name: Native Build
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
./run lib core debug
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
path: app/libs/libcore.aar
name: "LibCore"
- name: Gradle Cache
uses: actions/cache@v5
with:
path: ~/.gradle
key: gradle-debug-${{ hashFiles('**/*.gradle.kts') }}
- name: Gradle Build
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
./gradlew :app:downloadAssets
./gradlew :app:assembleOssDebug
APK="app/build/outputs/apk/oss/debug"
echo "APK=$APK" >> $GITHUB_ENV
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: APKs
path: ${{ env.APK }}