forked from SagerNet/SagerNet
-
Notifications
You must be signed in to change notification settings - Fork 0
298 lines (296 loc) · 9.2 KB
/
debug.yml
File metadata and controls
298 lines (296 loc) · 9.2 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
name: Debug build
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/debug.yml'
pull_request:
branches:
- dev
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
libcore:
name: Native Build (LibCore)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status library/core > libcore_status
- name: LibCore Cache
id: cache
uses: actions/cache@v4
with:
path: |
app/libs/libcore.aar
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/core/*', 'libcore_status') }}
- name: Get latest go version
id: version
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
# Bug: https://github.com/golang/go/issues/58426
# go-version: ${{ steps.version.outputs.go_version }}
go-version: 1.19.8
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run lib core
trojan-go:
name: Native Build (Trojan-Go)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/trojan-go/*' > trojan_go_status
- name: Trojan-Go Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/trojan-go/src/main/jniLibs
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/trojan_go/*', 'trojan_go_status') }}
- name: Install Golang
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.17.1
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin trojan_go
naive:
runs-on: ubuntu-latest
needs:
- setup
name: Native Build (NaïveProxy)
strategy:
fail-fast: false
matrix:
arch: [ armeabi-v7a, arm64-v8a, x86, x86_64 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/naive/*' > naive_status
- name: Naive Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/naive/src/main/jniLibs/${{ matrix.arch }}
key: naive-${{ matrix.arch }}-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: |
./run init action naive
./run plugin naive init
./run plugin naive ${{ matrix.arch }}
- name: Calculate SHA256
run: |
openssl sha256 plugin/naive/src/main/jniLibs/${{ matrix.arch }}/libnaive.so > sha256sum.txt
echo "SHA256SUM=$(cut -d' ' -f2 sha256sum.txt)" >>$GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: "NAIVE-SHA256-${{ matrix.arch }} ${{ env.SHA256SUM }}"
path: sha256sum.txt
# pingtunnel:
# name: Native Build (PingTunnel)
# runs-on: ubuntu-latest
# needs:
# - setup
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Fetch Status
# run: git submodule status 'plugin/pingtunnel/*' > pt_status
# - name: PingTunnel Cache
# id: cache
# uses: actions/cache@v4
# with:
# path: |
# plugin/pingtunnel/src/main/jniLibs
# key: ${{ hashFiles('.github/workflows/*', 'bin/lib/pingtunnel/*', 'pt_status') }}
# - name: Install Golang
# uses: actions/setup-go@v5
# if: steps.cache.outputs.cache-hit != 'true'
# with:
# go-version: 1.16
# - name: Native Build
# if: steps.cache.outputs.cache-hit != 'true'
# run: ./run plugin pingtunnel
relaybaton:
name: Native Build (RelayBaton)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/relaybaton/*' > rb_status
- name: RelayBaton Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/relaybaton/src/main/jniLibs
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/relaybaton/*', 'rb_status') }}
- name: Install Golang
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.18.10
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin relaybaton
brook:
name: Native Build (Brook)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/brook/*' > brook_status
- name: Brook Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/brook/src/main/jniLibs
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/brook/*', 'brook_status') }}
- name: Install Golang
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.18.0
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin brook
hysteria:
name: Native Build (Hysteria)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/hysteria/*' > hysteria_status
- name: Hysteria Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/hysteria/src/main/jniLibs
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/hysteria/*', 'hysteria_status') }}
- name: Install Golang
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.20.5
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin hysteria
mieru:
name: Native Build (Mieru)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/mieru/*' > mieru_status
- name: Mieru Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/mieru/src/main/jniLibs
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/mieru/*', 'mieru_status') }}
- name: Install Golang
uses: actions/setup-go@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
go-version: 1.20.7
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin mieru
tuic:
name: Native Build (TUIC)
runs-on: ubuntu-latest
needs:
- setup
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: git submodule status 'plugin/tuic/*' > tuic_status
- name: Tuic Cache
id: cache
uses: actions/cache@v4
with:
path: |
plugin/tuic/src/main/jniLibs
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/tuic/*', 'tuic_status') }}
- name: Install toolchain
run: |
rustup toolchain install stable
rustup override set stable
if: steps.cache.outputs.cache-hit != 'true'
- name: Install rust android target
run: ./run init action rust
if: steps.cache.outputs.cache-hit != 'true'
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin tuic
lint:
name: Android Lint
runs-on: ubuntu-latest
needs:
- libcore
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Status
run: |
git submodule status library/core > libcore_status
- name: LibCore Cache
uses: actions/cache@v4
with:
path: |
app/libs/libcore.aar
key: ${{ hashFiles('.github/workflows/*', 'bin/lib/core/*', 'libcore_status') }}
- name: Gradle cache
uses: actions/cache@v4
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle.kts') }}
- name: Android Lint
env:
BUILD_PLUGIN: none
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties
./run init action library
./run lint