-
Notifications
You must be signed in to change notification settings - Fork 1.4k
263 lines (210 loc) · 6.66 KB
/
build_and_test_debug_client.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
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
name: Build and Test / Client
concurrency:
group: '${{ github.head_ref || github.ref }} Client'
cancel-in-progress: true
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- master
# TODO: run go tests
jobs:
web_test:
name: Web Test
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm set cache .npm && npm ci
- name: Build Web App
run: npm run action client/src/www/build
- name: Test Web App
run: npm run action client/src/www/test
- uses: codecov/codecov-action@v3
with:
files: ./client/src/output/coverage/www/coverage-final.json
flags: unittests, www
linux_debug_build:
name: Linux Debug Build
runs-on: ubuntu-20.04
timeout-minutes: 20
needs: web_test
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm ci
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Build Linux Client
run: npm run action client/electron/build linux
windows_debug_build:
name: Windows Debug Build
runs-on: windows-2019
timeout-minutes: 20
needs: web_test
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm ci
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Build Windows Client
run: npm run action client/electron/build windows
macos_debug_build:
name: MacOS Debug Build
runs-on: macos-13
timeout-minutes: 20
needs: web_test
steps:
- name: Display XCode
run: xcode-select --print-path
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm ci
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build macos
- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test macos
- name: Build MacOS Client
run: npm run action client/src/cordova/build macos
- uses: codecov/codecov-action@v3
with:
xcode: true
xcode_archive_path: ./client/src/output/coverage/apple/macos/TestResult.xcresult
flags: unittests, apple, macos
ios_debug_build:
name: iOS Debug Build
runs-on: macos-13
timeout-minutes: 20
needs: web_test
steps:
- name: Display XCode
run: xcode-select --print-path
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm ci
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build ios
- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test ios
- name: Build iOS Client
run: npm run action client/src/cordova/build ios
- uses: codecov/codecov-action@v3
with:
xcode: true
xcode_archive_path: ./client/src/output/coverage/apple/ios/TestResult.xcresult
flags: unittests, apple, ios
maccatalyst_debug_build:
name: Mac Catalyst Debug Build
runs-on: macos-13
timeout-minutes: 20
needs: web_test
steps:
- name: Display XCode
run: xcode-select --print-path
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm ci
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build maccatalyst
- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test maccatalyst
- name: Build Mac Catalyst Client
run: npm run action client/src/cordova/build maccatalyst
- uses: codecov/codecov-action@v3
with:
xcode: true
xcode_archive_path: ./client/src/output/coverage/apple/maccatalyst/TestResult.xcresult
flags: unittests, apple, maccatalyst
android_debug_build:
name: Android Debug Build
runs-on: ubuntu-20.04
timeout-minutes: 20
needs: web_test
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- name: Install NPM Dependencies
run: npm ci
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Install Java
uses: actions/[email protected]
with:
java-version: 11
- name: Setup Android
run: bash ./.github/scripts/android_setup_ci.sh
- name: Build Android Client
run: npm run action client/src/cordova/build android -- --verbose