forked from SagerNet/SagerNet
-
Notifications
You must be signed in to change notification settings - Fork 14
142 lines (140 loc) · 4.38 KB
/
debug.yml
File metadata and controls
142 lines (140 loc) · 4.38 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Debug build
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/debug.yml'
pull_request:
branches:
- dev
jobs:
v2ray:
name: Native Build (Xray)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status library/xray > xray_status
- name: Xray Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/libxray.aar
key: ${{ hashFiles('bin/lib/xray/*', 'xray_status') }}
- name: Install Golang
uses: actions/setup-go@v2
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.16
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib v2ray
shadowsocks:
name: Native Build (Shadowsocks)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status 'library/shadowsocks/*' > shadowsocks_status
- name: Shadowsocks Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocks-release.aar
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
- name: Install Rust
if: steps.cache.outputs.cache-hit != 'true'
run: ./run init action shadowsocks
- name: Gradle cache
uses: actions/cache@v2
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ~/.gradle
key: native-${{ hashFiles('**/*.gradle') }}
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
./run init action library
./run lib shadowsocks
shadowsocksr:
name: Native Build (ShadowsocksR)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
- name: ShadowsocksR Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocksr-release.aar
key: ${{ hashFiles('shadowsocksr_status') }}
- name: Gradle cache
uses: actions/cache@v2
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ~/.gradle
key: native-${{ hashFiles('**/*.gradle') }}
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
./run init action library
./run lib shadowsocksr
build:
name: Gradle Build
runs-on: ubuntu-latest
needs:
- v2ray
- shadowsocks
- shadowsocksr
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: |
git submodule status 'library/shadowsocks/*' > shadowsocks_status
git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
git submodule status library/xray > xray_status
- name: Xray Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/libxray.aar
key: ${{ hashFiles('bin/lib/xray/*', 'xray_status') }}
- name: Shadowsocks Cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocks-release.aar
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
- name: ShadowsocksR Cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocksr-release.aar
key: ${{ hashFiles('shadowsocksr_status') }}
- name: Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle') }}
- name: Debug Build
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
./run init action library
./gradlew app:assembleOssDebug