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
name: CI
on:
push:
branches:
pull_request:
schedule:
# Weekly, so a newly published RustSec/npm advisory turns the badge red
# even when nothing was pushed.
- cron: "0 6 * * 1"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: test (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: default (http3)
args: ""
- name: http1 only
args: --no-default-features --features http1
- name: tls + auth + sso
args: --features "sso sso-server sso-saml auth-asymmetric http-client acme"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.name }}
- run: cargo test ${{ matrix.args }}
msrv:
name: msrv (1.88, all features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features
# End-to-end checks against real external implementations — see ci/e2e/.
e2e:
name: e2e (${{ matrix.check }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
check:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: e2e
- run: cargo build --bin rws --features "acme auth"
- name: ACME against Pebble (Let's Encrypt's test CA)
if: matrix.check == 'acme-pebble'
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p "$RUNNER_TEMP/pebble/src"
gh release download v2.10.1 --repo letsencrypt/pebble --pattern 'pebble-linux-amd64.tar.gz' --dir "$RUNNER_TEMP/pebble"
tar xzf "$RUNNER_TEMP/pebble/pebble-linux-amd64.tar.gz" -C "$RUNNER_TEMP/pebble"
gh api repos/letsencrypt/pebble/tarball/v2.10.1 | tar xz -C "$RUNNER_TEMP/pebble/src" --strip-components=1
# The release archive ships the binary without the execute bit.
pebble_bin="$RUNNER_TEMP/pebble/pebble-linux-amd64/linux/amd64/pebble"
chmod +x "$pebble_bin"
ci/e2e/acme_pebble.sh target/debug/rws "$pebble_bin" "$RUNNER_TEMP/pebble/src"
- name: HTTP/2 conformance (h2spec)
if: matrix.check == 'h2spec'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download v2.6.0 --repo summerwind/h2spec --pattern 'h2spec_linux_amd64.tar.gz' --dir "$RUNNER_TEMP"
tar xzf "$RUNNER_TEMP/h2spec_linux_amd64.tar.gz" -C "$RUNNER_TEMP"
ci/e2e/h2spec.sh target/debug/rws "$RUNNER_TEMP/h2spec"
- name: Idle / slow clients can't starve the server
if: matrix.check == 'slow-clients'
run: ci/e2e/slow_clients.sh target/debug/rws
- name: rws --check and SIGHUP route reload
if: matrix.check == 'config-reload'
run: ci/e2e/config_reload.sh target/debug/rws
# Every parser that sees untrusted input — see fuzz/README.md. 30 s per
# target on push; 10 minutes each in the weekly scheduled run.
fuzz:
name: fuzz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
workspaces: fuzz
- uses: taiki-e/install-action@v2
with:
tool: cargo-fuzz
- run: fuzz/run.sh ${{ github.event_name == 'schedule' && 600 || 30 }} 4
- name: Keep crashing inputs
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts
path: |
fuzz/artifacts
fuzz/logs
audit:
name: cargo audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@cargo-audit
# Reads ignores (with justifications) from .cargo/audit.toml
- run: cargo audit
docs:
name: docs site
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: docs/package-lock.json
- run: npm ci
- run: npm audit --audit-level=moderate
- run: npm run build