-
Notifications
You must be signed in to change notification settings - Fork 119
724 lines (624 loc) · 26.3 KB
/
qns.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
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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
on:
push:
branches:
- main
pull_request:
branches:
- main
name: qns
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: 1
# This kept breaking builds so we're pinning for now. We should do our best to keep
# up with the changes, though.
INTEROP_RUNNER_REF: e73ec56cdf5423fa6b1576a2b5fec5eb2171ec5d
# This should be updated when updating wesleyrosenblum/quic-network-simulator
NETWORK_SIMULATOR_REF: sha256:20abe0bed8c0e39e1d8750507b24295f7c978bdd7e05fa6f3a5afed4b76dc191
IPERF_ENDPOINT_REF: sha256:cb50cc8019d45d9cad5faecbe46a3c21dd5e871949819a5175423755a9045106
WIRESHARK_VERSION: 3.7.1
CDN: https://dnglbrstg7yg.cloudfront.net
LOG_URL: logs/latest/SERVER_CLIENT/TEST/index.html
H3_SPEC_VERSION: v0.1.8
QUINN_REF: 6e4bcbb2fcb57ced2ef261c9662521c5baf37f3c
# enable unstable features for testing
S2N_UNSTABLE_CRYPTO_OPT_TX: 100
S2N_UNSTABLE_CRYPTO_OPT_RX: 100
# By default depandabot only receives read permissions. Explicitly give it write
# permissions which is needed by the ouzi-dev/commit-status-updater task.
#
# Updating status is relatively safe (doesnt modify source code) and caution
# should we taken before adding more permissions.
permissions:
statuses: write
jobs:
env:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.implementations.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
path: s2n-quic
- uses: actions/checkout@v3
with:
repository: marten-seemann/quic-interop-runner
ref: ${{ env.INTEROP_RUNNER_REF }}
path: quic-interop-runner
- name: Patch quic-interop-runner
working-directory: quic-interop-runner
run: |
git apply --3way ../s2n-quic/.github/interop/runner.patch
- name: Define implementations
id: implementations
working-directory: quic-interop-runner
run: |
CLIENTS=$(cat implementations.json \
| jq -c '[. | to_entries[] | select(.value.role == "both" or .value.role == "client") | {"client": .key, "server": "s2n-quic"}] | sort'
)
echo "Clients: $CLIENTS"
SERVERS=$(cat implementations.json \
| jq -c '[. | to_entries[] | select(.value.role == "both" or .value.role == "server") | {"client": "s2n-quic", "server": .key}] | sort'
)
echo "Servers: $SERVERS"
MATRIX=$(echo "[$CLIENTS, $SERVERS]" | jq -c '{"include": . | flatten | sort | unique}')
echo "Matrix: $MATRIX"
echo "::set-output name=matrix::$MATRIX"
s2n-quic-qns:
runs-on: ubuntu-20.04
strategy:
matrix:
mode: ["debug", "release"]
# enable debug information
env:
RUSTFLAGS: "-g --cfg s2n_internal_dev --cfg s2n_quic_dump_on_panic"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: stable
profile: minimal
override: true
- uses: camshaft/rust-cache@v1
with:
key: ${{ matrix.mode }}-${{ env.RUSTFLAGS }}
# apply patch to use forked version of the webpki crate
# see https://github.com/aws/s2n-quic/issues/1836
- name: Patch webpki
run: |
git apply --3way quic/s2n-quic-qns/etc/webpki.patch
- name: Run cargo build
uses: actions-rs/[email protected]
with:
command: build
args: --bin s2n-quic-qns ${{ matrix.mode == 'release' && '--release' || '' }}
- name: Prepare artifact
run: |
mkdir -p s2n-quic-qns
cp target/${{ matrix.mode }}/s2n-quic-qns s2n-quic-qns/s2n-quic-qns-${{ matrix.mode }}
- uses: actions/upload-artifact@v3
with:
name: s2n-quic-qns-${{ matrix.mode }}
path: s2n-quic-qns/
quinn:
runs-on: ubuntu-20.04
# enable debug information
env:
RUSTFLAGS: "-g"
steps:
- uses: actions/checkout@v3
with:
repository: quinn-rs/quinn
ref: ${{ env.QUINN_REF }}
- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: stable
profile: minimal
override: true
- uses: camshaft/rust-cache@v1
- name: Cache quinn
id: cache
uses: actions/[email protected]
continue-on-error: true
with:
path: |
target/release/perf_client
target/release/perf_server
key: ${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ github.job }}-quinn-${{ hashFiles('**/Cargo.*') }}-${{ hashFiles('**/*.rs') }}
- name: Build quinn
if: steps.cache.outputs.cache-hit != 'true'
run: cargo build --bin perf_client --bin perf_server --release
- name: Prepare artifact
run: |
mkdir -p quinn
cp target/release/perf_client quinn/perf_client
cp target/release/perf_server quinn/perf_server
- uses: actions/upload-artifact@v3
with:
name: quinn
path: quinn/
interop:
runs-on: ubuntu-latest
needs: [env, s2n-quic-qns]
strategy:
matrix: ${{ fromJson(needs.env.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
with:
path: s2n-quic
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-debug
path: s2n-quic-qns/
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-release
path: s2n-quic-qns/
- name: Setup dockerfile
working-directory: s2n-quic-qns
run: |
cp ../s2n-quic/.github/interop/Dockerfile .
cp ../s2n-quic/quic/s2n-quic-qns/etc/run_endpoint.sh .
- name: Run docker build
working-directory: s2n-quic-qns
run: |
docker build . --file Dockerfile --tag aws/s2n-quic-qns --build-arg tls=s2n-tls
docker build . --file Dockerfile --tag aws/s2n-quic-qns-rustls --build-arg tls=rustls
- uses: actions/checkout@v3
with:
repository: marten-seemann/quic-interop-runner
ref: ${{ env.INTEROP_RUNNER_REF }}
path: quic-interop-runner
- name: Patch quic-interop-runner
working-directory: quic-interop-runner
run: |
git apply --3way ../s2n-quic/.github/interop/runner.patch
- name: Run docker pull
working-directory: quic-interop-runner
run: |
docker pull "wesleyrosenblum/quic-network-simulator@$NETWORK_SIMULATOR_REF"
docker pull "martenseemann/quic-interop-iperf-endpoint@$IPERF_ENDPOINT_REF"
- uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install tshark
run: |
wget --no-verbose https://dnglbrstg7yg.cloudfront.net/tshark/v$WIRESHARK_VERSION/tshark
chmod +x tshark
sudo mv tshark /usr/bin
/usr/bin/tshark -v
- name: Install dependencies
working-directory: quic-interop-runner
run: |
python3 -m pip install --upgrade pip
pip3 install wheel
pip3 install --upgrade -r requirements.txt
- name: Run quic-interop-runner
working-directory: quic-interop-runner
run: |
# enable IPv6 support
sudo modprobe ip6table_filter
python3 run.py --client ${{ matrix.client }} --server ${{ matrix.server }} --json results/result.json --debug --log-dir results/logs
mkdir -p results/logs
- name: Prepare artifacts
working-directory: quic-interop-runner
run: |
ls -al results
# clean up invalid path characters
find results -name '*:*' | while read from; do
echo "Invalid filename: $from"
to=$(echo $from | sed 's/:/_/g')
mv $from $to
done
# remove files we don't do anything with to reduce the artifact size
find results -name '*.qlog' -exec rm {} \;
# remove cross traffic and goodput packet captures as they are large and not useful
find results -maxdepth 7 -type d -path "**/crosstraffic/*/sim" | xargs rm -rf \;
find results -maxdepth 7 -type d -path "**/goodput/*/sim" | xargs rm -rf \;
# Add index files for easy browsing
find results -maxdepth 3 -type d -path "*/logs/*/*" | while read from; do
tree -H "." \
-h \
-L 3 \
-I 'index.html' \
-T "${{ matrix.client }} client / ${{ matrix.server }} server - $(basename $from)" \
--noreport \
--charset utf-8 \
-o $from/index.html \
$from
done
- uses: aws-actions/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Upload to S3
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
id: s3
working-directory: quic-interop-runner
run: |
TARGET="${{ github.sha }}/interop/logs/latest"
aws s3 sync results/logs "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
- uses: actions/upload-artifact@v3
with:
name: interop-${{ matrix.client }}-client-${{ matrix.server }}-server
path: quic-interop-runner/results/result.json
- name: Assert no crashes
working-directory: quic-interop-runner
run: |
! grep -Rq 'The s2n-quic-qns application shut down unexpectedly' results
interop-report:
runs-on: ubuntu-latest
needs: [interop]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: results/
- name: Download latest results
id: download
run: |
rm -f result.json
INTEROP_BASE_URL="https://interop.seemann.io/logs/"
wget ${INTEROP_BASE_URL}latest/result.json || echo '{}' > result.json
mv result.json latest.json
INTEROP_LOG_URL=${INTEROP_BASE_URL}$(jq --raw-output '.log_dir' latest.json)/SERVER_CLIENT/TEST/
echo "::set-output name=INTEROP_LOG_URL::$INTEROP_LOG_URL"
- name: Get latest successful interop commit SHA on main branch
id: mainsha
if: github.event.pull_request
run: |
curl \
--url "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/workflows/qns.yml/runs?branch=main&status=success&per_page=1" \
--header "Accept: application/vnd.github.v3+json" > latest_workflow_run.json
MAIN_SHA=$(jq --raw-output '.workflow_runs[0] | .head_sha' latest_workflow_run.json)
rm -f latest_workflow_run.json
echo "::set-output name=MAIN_SHA::$MAIN_SHA"
- name: Download latest main interop result
if: github.event.pull_request
run: |
rm -f prev_result.json
wget $CDN/${{ steps.mainsha.outputs.MAIN_SHA }}/interop/logs/latest/result.json || echo '{}' > result.json
mv result.json prev_result.json
- name: Generate report for pull request
if: github.event.pull_request
run: |
mkdir -p web/logs/latest
MAIN_SHA=${{ steps.mainsha.outputs.MAIN_SHA }}
python3 .github/interop/merge.py \
--prev_version prev_result.json \
--new_version_suffix "pr${{github.event.pull_request.number}}" \
--new_version_url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/${{github.event.pull_request.number}}" \
--new_version_log_url "$LOG_URL" \
--prev_version_log_url "$CDN/$MAIN_SHA/interop/$LOG_URL" \
--prev_version_url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$MAIN_SHA" \
--interop_log_url "${{ steps.download.outputs.INTEROP_LOG_URL }}" \
latest.json \
results/**/result.json > \
web/logs/latest/result.json
- name: Generate report for push to main
if: github.event_name == 'push'
run: |
mkdir -p web/logs/latest
python3 .github/interop/merge.py \
--new_version_log_url "$LOG_URL" \
--new_version_url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_SHA" \
--interop_log_url "${{ steps.download.outputs.INTEROP_LOG_URL }}" \
latest.json \
results/**/result.json > \
web/logs/latest/result.json
- uses: aws-actions/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Upload to S3
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
id: s3
run: |
cp .github/interop/*.html web/
cp .github/interop/*.js web/
TARGET="${{ github.sha }}/interop"
aws s3 sync web "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
URL="$CDN/$TARGET/index.html"
echo "::set-output name=URL::$URL"
- uses: ouzi-dev/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
name: "interop / report"
status: "success"
url: "${{ steps.s3.outputs.URL }}"
- name: Check for regressions
run: |
python3 .github/interop/check.py \
--required .github/interop/required.json \
web/logs/latest/result.json
bench:
runs-on: ubuntu-20.04
needs: [env, s2n-quic-qns]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: stable
override: true
- uses: camshaft/rust-cache@v1
- name: Install tshark
run: |
wget --no-verbose https://dnglbrstg7yg.cloudfront.net/tshark/v$WIRESHARK_VERSION/tshark
chmod +x tshark
sudo mv tshark /usr/bin
/usr/bin/tshark -v
- name: Install gnuplot
run: |
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 install -y gnuplot
# authenticate pull to avoid hitting pull quota
- name: Login to Amazon Elastic Container Registry Public
if: github.repository == github.event.pull_request.head.repo.full_name
uses: docker/[email protected]
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Pull s2n-quic-qns:main
if: github.event.pull_request
run: docker pull public.ecr.aws/s2n/s2n-quic-qns:main
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-debug
path: s2n-quic-qns-build/
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-release
path: s2n-quic-qns-build/
- name: Setup dockerfile
working-directory: s2n-quic-qns-build
run: |
cp ../.github/interop/Dockerfile .
cp ../quic/s2n-quic-qns/etc/run_endpoint.sh .
- name: Run docker build
working-directory: s2n-quic-qns-build
run: |
docker build . --file Dockerfile --tag aws/s2n-quic-qns
- name: Run script for pull request
if: github.event.pull_request
run: sudo env "PATH=$PATH" "BUILD_S2N_QUIC=false" "COMPARE_TO_MAIN=true" ./scripts/benchmark/run-all
- name: Run script for push to main
if: github.event_name == 'push'
run: sudo env "PATH=$PATH" "BUILD_S2N_QUIC=false" ./scripts/benchmark/run-all
- uses: aws-actions/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Upload results
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
id: s3
run: |
TARGET="${{ github.sha }}/bench"
aws s3 sync target/benchmark/results "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
URL="$CDN/$TARGET/index.html"
echo "::set-output name=URL::$URL"
- uses: ouzi-dev/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
name: "bench / report"
status: "success"
url: "${{ steps.s3.outputs.URL }}"
- name: Assert no crashes
run: |
! grep -Rq 'The s2n-quic-qns application shut down unexpectedly' target/benchmark/results
h3spec:
runs-on: ubuntu-20.04
needs: [s2n-quic-qns]
strategy:
matrix:
tls: ["s2n-tls", "rustls"]
steps:
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-debug
- name: Install h3spec
run: |
curl -L -o h3spec https://github.com/kazu-yamamoto/h3spec/releases/download/$H3_SPEC_VERSION/h3spec-linux-x86_64
chmod +x h3spec
chmod +x s2n-quic-qns-debug
- name: Run test (${{ matrix.tls }})
# the skipped tests here require modifications to the TLS library
# TODO remove the skips once these are fixed
# https://github.com/aws/s2n-quic/issues/858
# https://github.com/aws/s2n-quic/issues/859
if: ${{ matrix.tls == 'rustls' }}
run: |
./s2n-quic-qns-debug interop server --port 4433 --tls ${{ matrix.tls }} &
# wait for the server to boot
sleep 3
./h3spec localhost 4433 \
` h3spec appends the KeyUpdate message to the end of the valid Handshake data. `\
` s2n-quic considers the handshake "done" before it receives the bad message, `\
` and instead fails because the bad message is considered leftover data. See: `\
` https://github.com/aws/s2n-quic/blob/bb74c8e98adf12d805d26987fad02ffe45df97a7/quic/s2n-quic-transport/src/space/crypto_stream.rs#L64-L73 `\
--skip "MUST send unexpected_message TLS alert if KeyUpdate in Handshake is received [TLS 6]" \
\
` s2n-quic chooses to ignore CRYPTO frames in application data. See: `\
` https://github.com/aws/s2n-quic/blob/bb74c8e98adf12d805d26987fad02ffe45df97a7/quic/s2n-quic-transport/src/space/application.rs#L625-L630 `\
--skip "MUST send unexpected_message TLS alert if KeyUpdate in 1-RTT is received [TLS 6]" \
\
` The quic_transport_parameters are part of the ClientHello. `\
` s2n-quic currently does not respond to malformed ClientHellos. See: `\
` https://github.com/aws/s2n-quic/blob/bb74c8e98adf12d805d26987fad02ffe45df97a7/quic/s2n-quic-transport/src/endpoint/mod.rs#L725 `\
--skip "MUST send missing_extension TLS alert if the quic_transport_parameters extension does not included [TLS 8.2]" \
\
` RUSTLS specific failures. `\
` The quic_transport_parameters are part of the ClientHello. `\
` s2n-quic currently does not respond to malformed ClientHellos. See: `\
` https://github.com/aws/s2n-quic/blob/bb74c8e98adf12d805d26987fad02ffe45df97a7/quic/s2n-quic-transport/src/endpoint/mod.rs#L725 `\
--skip "MUST send TRANSPORT_PARAMETER_ERROR if initial_source_connection_id is missing [Transport 7.3]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if original_destination_connection_id is received [Transport 18.2]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if preferred_address, is received [Transport 18.2]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if retry_source_connection_id is received [Transport 18.2]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if stateless_reset_token is received [Transport 18.2]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if max_udp_payload_size < 1200 [Transport 7.4 and 18.2]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if ack_delay_exponen > 20 [Transport 7.4 and 18.2]" \
--skip "MUST send TRANSPORT_PARAMETER_ERROR if max_ack_delay >= 2^14 [Transport 7.4 and 18.2]" \
--skip "MUST send no_application_protocol TLS alert if no application protocols are supported [TLS 8.1]" \
perf:
runs-on: ubuntu-20.04
needs: [quinn, s2n-quic-qns]
strategy:
matrix:
include:
- client: "quinn"
server: "s2n-quic"
- client: "s2n-quic"
server: "s2n-quic"
- client: "s2n-quic-null"
server: "s2n-quic-null"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: stable
profile: minimal
override: true
- uses: camshaft/[email protected]
- name: Install inferno
uses: camshaft/install@v1
with:
crate: inferno
bins: inferno-collapse-perf,inferno-flamegraph
- name: Install ultraman
uses: camshaft/install@v1
with:
crate: ultraman
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-release
path: target/release/
- uses: actions/download-artifact@v3
with:
name: quinn
path: target/perf/quinn/bin/
- name: Setup artifacts
run: |
mv target/release/s2n-quic-qns-release target/release/s2n-quic-qns
chmod +x target/release/s2n-quic-qns
chmod +x target/perf/quinn/bin/perf_client
chmod +x target/perf/quinn/bin/perf_server
- name: Run script
env:
# ultraman wants a SHELL var to spawn tasks
SHELL: /bin/bash
run: |
set -e
# set larger socket buffers
sudo sysctl -w net.core.wmem_default=2000000
sudo sysctl -w net.core.rmem_default=2000000
mkdir -p target/perf/results
sudo env "PATH=$PATH" "SHELL=$SHELL" ./scripts/perf/test 10000 0 ${{ matrix.server }} ${{ matrix.client }}
sudo env "PATH=$PATH" "SHELL=$SHELL" ./scripts/perf/test 7500 2500 ${{ matrix.server }} ${{ matrix.client }}
sudo env "PATH=$PATH" "SHELL=$SHELL" ./scripts/perf/test 5000 5000 ${{ matrix.server }} ${{ matrix.client }}
sudo env "PATH=$PATH" "SHELL=$SHELL" ./scripts/perf/test 2500 7500 ${{ matrix.server }} ${{ matrix.client }}
sudo env "PATH=$PATH" "SHELL=$SHELL" ./scripts/perf/test 0 10000 ${{ matrix.server }} ${{ matrix.client }}
sudo chown -R $(whoami) target/perf/results
- name: Prepare artifacts
run: |
cd ./target/perf/results
zip perf.zip **/*.script
rm -rf **/*.script
- uses: actions/upload-artifact@v3
with:
name: perf-results-${{ matrix.server }}-${{ matrix.client }}
path: target/perf/results
perf-report:
runs-on: ubuntu-latest
needs: [perf]
steps:
- uses: actions/checkout@v3
# add any additional perf tests here
- uses: actions/download-artifact@v3
with:
name: perf-results-s2n-quic-quinn
path: perf-results/
- uses: actions/download-artifact@v3
with:
name: perf-results-s2n-quic-s2n-quic
path: perf-results/
- uses: actions/download-artifact@v3
with:
name: perf-results-s2n-quic-null-s2n-quic-null
path: perf-results/
- name: Generate report
run: |
cd perf-results
tree -H "." -T "Performance Results" --noreport --charset utf-8 > index.html
- uses: aws-actions/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Upload results
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
id: s3
run: |
TARGET="${{ github.sha }}/perf"
aws s3 sync perf-results "s3://s2n-quic-ci-artifacts/$TARGET" --acl private --follow-symlinks
URL="$CDN/$TARGET/index.html"
echo "::set-output name=URL::$URL"
- uses: ouzi-dev/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
name: "perf / report"
status: "success"
url: "${{ steps.s3.outputs.URL }}"
attack:
runs-on: ubuntu-latest
needs: [s2n-quic-qns]
strategy:
matrix:
attack: ["udp"]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: stable
profile: minimal
override: true
- uses: actions/download-artifact@v3
with:
name: s2n-quic-qns-debug
- name: Run cargo build
working-directory: tools/${{ matrix.attack }}-attack
run: cargo build --release
- name: Start client
working-directory: tools/${{ matrix.attack }}-attack
run: |
./target/release/${{ matrix.attack }}-attack localhost:4433 &
- name: Start server
shell: bash
run: |
chmod +x ./s2n-quic-qns-debug
# disable exiting on errors to capture the timeout status
set +e
timeout 5m ./s2n-quic-qns-debug interop server --port 4433
EXIT_CODE="$?"
set -e
# `timeout` exits with `124` if the time limit was reached
[[ "$EXIT_CODE" == "124" ]] || exit $EXIT_CODE