-
-
Notifications
You must be signed in to change notification settings - Fork 104
378 lines (331 loc) · 10.4 KB
/
ci.yml
File metadata and controls
378 lines (331 loc) · 10.4 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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
rust-tests:
name: Rust Tests
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libssl-dev python3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Rust fmt
run: cargo fmt --check
- name: Rust clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Rust tests
env:
RUST_BACKTRACE: "1"
run: |
cargo test -p slipstream-dns
cargo test
- name: IPv4 listener check
run: ./scripts/verify_ipv4_listener.sh
rust-tests-ignored:
name: Rust Tests (Ignored)
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libssl-dev python3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Run ignored tests
env:
RUST_BACKTRACE: "1"
run: |
cargo test -p slipstream-dns -- --ignored
cargo test --workspace --exclude slipstream-dns -- --ignored
cargo-audit:
name: Cargo Audit
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
- name: Install cargo-audit
uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- name: Run cargo audit
run: cargo audit
rust-clippy-features:
name: Rust Clippy (features)
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libssl-dev python3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust clippy (features)
env:
PICOQUIC_BUILD_DIR: .picoquic-build/minimal
run: cargo clippy -p slipstream-client -p slipstream-server --features openssl-vendored,picoquic-minimal-build -- -D warnings
build-binaries-macos-arm64:
name: Build Binaries (macos-arm64)
runs-on: macos-26
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Build binary artifact
uses: ./.github/actions/build-binary
with:
target: aarch64-apple-darwin
artifact-name: slipstream-macos-arm64
build-binaries-macos-x86_64:
name: Build Binaries (macos-x86_64)
runs-on: macos-15-intel
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Build binary artifact
uses: ./.github/actions/build-binary
with:
target: x86_64-apple-darwin
artifact-name: slipstream-macos-x86_64
build-binaries-linux-x86_64:
name: Build Binaries (linux-x86_64)
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Build binary artifact
uses: ./.github/actions/build-binary
with:
target: x86_64-unknown-linux-gnu
artifact-name: slipstream-linux-x86_64
build-binaries-linux-arm64:
name: Build Binaries (linux-arm64)
runs-on: ubuntu-24.04-arm
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Build binary artifact
uses: ./.github/actions/build-binary
with:
target: aarch64-unknown-linux-gnu
artifact-name: slipstream-linux-arm64
build-binaries-windows-x86_64:
name: Build Binaries (windows-x86_64)
runs-on: windows-2025
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Build binary artifact
uses: ./.github/actions/build-binary
with:
target: x86_64-pc-windows-msvc
artifact-name: slipstream-windows-x86_64
windows-platform: x64
vcpkg-triplet: x64-windows-static-md
build-binaries-windows-arm64:
name: Build Binaries (windows-arm64)
runs-on: windows-11-arm
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Build binary artifact
uses: ./.github/actions/build-binary
with:
target: aarch64-pc-windows-msvc
artifact-name: slipstream-windows-arm64
windows-platform: ARM64
vcpkg-triplet: arm64-windows-static-md
interop:
name: Interop (${{ matrix.name }})
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
# C repo interop disabled (C repo currently broken).
# - name: run_local
# script: run_local.sh
# - name: run_rust_client
# script: run_rust_client.sh
# - name: run_rust_server
# script: run_rust_server.sh
- name: rust-rust
script: run_rust_rust.sh
domains: ""
client_domain: ""
- name: rust-rust-multi-domain
script: run_rust_rust.sh
domains: "example.com,tunnel.example.com"
client_domain: "tunnel.example.com"
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
# C repo interop disabled (C repo currently broken).
# - name: Check out C slipstream
# uses: actions/checkout@v4
# with:
# repository: EndPositive/slipstream
# path: slipstream-c
# submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson ninja-build cmake pkg-config libssl-dev python3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Run interop script
env:
SLIPSTREAM_DIR: slipstream-c
RUST_BACKTRACE: "1"
DOMAINS: ${{ matrix.domains }}
CLIENT_DOMAIN: ${{ matrix.client_domain }}
run: ./scripts/interop/${{ matrix.script }}
benchmarks:
name: Bench (${{ matrix.name }})
runs-on: ubuntu-24.04
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
include:
- name: rust-rust
script: run_rust_rust_10mb.sh
needs_c: false
client_args: ""
resolver_mode: resolver
min_exfil: "5"
min_download: "10"
artifact_glob: bench-rust-rust-*
- name: rust-rust-auth
script: run_rust_rust_10mb.sh
needs_c: false
client_args: ""
resolver_mode: authoritative
min_exfil: "5"
min_download: "15"
artifact_glob: bench-rust-rust-*
- name: rust-rust-mixed
script: run_rust_rust_10mb.sh
needs_c: false
client_args: ""
resolver_mode: mixed
min_exfil: "5"
min_download: "25"
artifact_glob: bench-rust-rust-mixed-*
# C repo benchmark disabled (C repo currently broken).
# - name: c-c
# script: run_c_c_10mb.sh
# needs_c: true
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
# C repo benchmark disabled (C repo currently broken).
# - name: Check out C slipstream
# if: matrix.needs_c
# uses: actions/checkout@v4
# with:
# repository: EndPositive/slipstream
# path: slipstream-c
# submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson ninja-build cmake pkg-config libssl-dev python3
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Run benchmark
env:
SLIPSTREAM_DIR: slipstream-c
RUNS: "5"
TRANSFER_BYTES: "10485760"
CLIENT_ARGS: ${{ matrix.client_args }}
RESOLVER_MODE: ${{ matrix.resolver_mode }}
MIN_AVG_MIB_S_EXFIL: ${{ matrix.min_exfil }}
MIN_AVG_MIB_S_DOWNLOAD: ${{ matrix.min_download }}
run: ./scripts/bench/${{ matrix.script }}
- name: Upload benchmark logs
if: always()
uses: actions/upload-artifact@v7
with:
name: bench-${{ matrix.name }}-logs
path: .interop/${{ matrix.artifact_glob }}
include-hidden-files: true
bench-memory:
name: Bench Memory (rust-rust)
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- name: Check out slipstream-rust
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libssl-dev python3 procps
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Run memory benchmark
env:
TRANSFER_BYTES: "104857600"
RUNS: "1"
RUN_EXFIL: "1"
RUN_DOWNLOAD: "1"
SOCKET_TIMEOUT: "60"
MAX_RSS_MB: "80"
MIN_AVG_MIB_S: "0"
run: ./scripts/bench/run_rust_rust_mem.sh
- name: Upload memory logs
if: always()
uses: actions/upload-artifact@v7
with:
name: bench-rust-rust-mem-logs
path: .interop/mem-rust-rust-*.csv
include-hidden-files: true