66 pull_request :
77
88jobs :
9- test-freebsd :
10- # see https://github.com/actions/runner/issues/385
11- # use https://github.com/vmactions/freebsd-vm for now
12- name : test on freebsd
13- runs-on : ubuntu-latest
14- steps :
15- - uses : actions/checkout@v4
16- - name : test on freebsd
17- uses : vmactions/freebsd-vm@v1
18- with :
19- usesh : true
20- mem : 4096
21- copyback : false
22- prepare : |
23- pkg install -y curl
24- curl https://sh.rustup.rs -sSf --output rustup.sh
25- sh rustup.sh -y --profile minimal --default-toolchain stable
26- run : |
27- export PATH="$HOME/.cargo/bin:$PATH"
28- echo "===== rustc --version ====="
29- rustc --version
30- echo "===== freebsd-version ====="
31- freebsd-version
32-
33- cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches
34-
35- test-netbsd :
36- name : test on netbsd
37- runs-on : ubuntu-latest
38- steps :
39- - uses : actions/checkout@v4
40- - name : test on netbsd
41- uses : vmactions/netbsd-vm@v1
42- with :
43- usesh : true
44- mem : 4096
45- copyback : false
46- prepare : |
47- export PATH="/usr/sbin:/sbin:$PATH"
48- pkg_add curl
49- curl https://sh.rustup.rs -sSf --output rustup.sh
50- sh rustup.sh -y --profile minimal --default-toolchain stable
51- run : |
52- export PATH="$HOME/.cargo/bin:$PATH"
53- echo "===== rustc --version ====="
54- rustc --version
55- echo "===== uname -a ====="
56- uname -a
57-
58- cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches
59-
60- test-solaris :
61- name : test on solaris
62- runs-on : ubuntu-latest
63- steps :
64- - uses : actions/checkout@v4
65- - name : test on Solaris
66- uses : vmactions/solaris-vm@v1
67- with :
68- release : " 11.4-gcc"
69- usesh : true
70- mem : 4096
71- copyback : false
72- prepare : |
73- source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
74- echo "~~~~ rustc --version ~~~~"
75- rustc --version
76- echo "~~~~ Solaris-version ~~~~"
77- uname -a
78- # Unlike others, don't un-ignore stress tests, because they hang on Solaris
79- run : |
80- export PATH=$HOME/.rust_solaris/bin:$PATH
81- cargo build --all-targets && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches
82-
83- test-illumos :
84- name : test on illumos
85- runs-on : ubuntu-latest
86- steps :
87- - uses : actions/checkout@v4
88- - name : test on Illumos
89- uses : vmactions/omnios-vm@v1
90- with :
91- usesh : true
92- mem : 4096
93- copyback : false
94- prepare : |
95- pkg install gcc14 curl pkg-config glib2
96- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
97- run : |
98- . "$HOME/.cargo/env"
99- cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches
9+ # test-freebsd:
10+ # # see https://github.com/actions/runner/issues/385
11+ # # use https://github.com/vmactions/freebsd-vm for now
12+ # name: test on freebsd
13+ # runs-on: ubuntu-latest
14+ # steps:
15+ # - uses: actions/checkout@v4
16+ # - name: test on freebsd
17+ # uses: vmactions/freebsd-vm@v1
18+ # with:
19+ # usesh: true
20+ # mem: 4096
21+ # copyback: false
22+ # prepare: |
23+ # pkg install -y curl
24+ # curl https://sh.rustup.rs -sSf --output rustup.sh
25+ # sh rustup.sh -y --profile minimal --default-toolchain stable
26+ # run: |
27+ # export PATH="$HOME/.cargo/bin:$PATH"
28+ # echo "===== rustc --version ====="
29+ # rustc --version
30+ # echo "===== freebsd-version ====="
31+ # freebsd-version
32+
33+ # cargo build --locked -- all-targets && cargo test --locked && cargo test --locked -- -- ignored stress && cargo test --locked -- manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches
34+
35+ # test-netbsd:
36+ # name: test on netbsd
37+ # runs-on: ubuntu-latest
38+ # steps:
39+ # - uses: actions/checkout@v4
40+ # - name: test on netbsd
41+ # uses: vmactions/netbsd-vm@v1
42+ # with:
43+ # usesh: true
44+ # mem: 4096
45+ # copyback: false
46+ # prepare: |
47+ # export PATH="/usr/sbin:/sbin:$PATH"
48+ # pkg_add curl
49+ # curl https://sh.rustup.rs -sSf --output rustup.sh
50+ # sh rustup.sh -y --profile minimal --default-toolchain stable
51+ # run: |
52+ # export PATH="$HOME/.cargo/bin:$PATH"
53+ # echo "===== rustc --version ====="
54+ # rustc --version
55+ # echo "===== uname -a ====="
56+ # uname -a
57+
58+ # cargo build --locked -- all-targets && cargo test --locked && cargo test --locked -- -- ignored stress && cargo test --locked -- manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches
59+
60+ # test-solaris:
61+ # name: test on solaris
62+ # runs-on: ubuntu-latest
63+ # steps:
64+ # - uses: actions/checkout@v4
65+ # - name: test on Solaris
66+ # uses: vmactions/solaris-vm@v1
67+ # with:
68+ # release: "11.4-gcc"
69+ # usesh: true
70+ # mem: 4096
71+ # copyback: false
72+ # prepare: |
73+ # source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
74+ # echo "~~~~ rustc --version ~~~~"
75+ # rustc --version
76+ # echo "~~~~ Solaris-version ~~~~"
77+ # uname -a
78+ # # Unlike others, don't un-ignore stress tests, because they hang on Solaris
79+ # run: |
80+ # export PATH=$HOME/.rust_solaris/bin:$PATH
81+ # cargo build --locked -- all-targets && cargo test --locked -- manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches
82+
83+ # test-illumos:
84+ # name: test on illumos
85+ # runs-on: ubuntu-latest
86+ # steps:
87+ # - uses: actions/checkout@v4
88+ # - name: test on Illumos
89+ # uses: vmactions/omnios-vm@v1
90+ # with:
91+ # usesh: true
92+ # mem: 4096
93+ # copyback: false
94+ # prepare: |
95+ # pkg install gcc14 curl pkg-config glib2
96+ # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
97+ # run: |
98+ # . "$HOME/.cargo/env"
99+ # cargo build --locked -- all-targets && cargo test --locked && cargo test --locked -- -- ignored stress && cargo test --locked -- manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches
100100
101101 test :
102102 strategy :
@@ -122,12 +122,15 @@ jobs:
122122 - uses : dtolnay/rust-toolchain@master
123123 with :
124124 toolchain : ${{ matrix.rust }}
125- - run : cargo build --all-targets
126- - run : cargo test
127- - run : cargo test -- --ignored stress
128- - run : cargo test --manifest-path fuzz/Cargo.toml
125+ - uses : Swatinem/rust-cache@v2
126+ - run : cargo build --locked --all-targets
127+ - run : cargo test --locked
128+ - run : cargo test --locked -- --ignored stress
129+ - run : cargo test --locked --manifest-path fuzz/Cargo.toml
129130 if : ${{ matrix.rust }} == "stable"
130- - run : cargo test -p iroh-quinn-udp --benches
131+ - run : cargo test --locked -p iroh-quinn-udp --benches
132+ - run : cargo test --locked -p iroh-quinn-udp --benches --features fast-apple-datapath
133+ if : ${{ matrix.os }} == "macos-latest"
131134
132135 test-aws-lc-rs :
133136 runs-on : ubuntu-latest
@@ -136,50 +139,40 @@ jobs:
136139 - uses : dtolnay/rust-toolchain@stable
137140 - uses : Swatinem/rust-cache@v2
138141 # Prevent feature unification from selecting *ring* as the crypto provider
139- - run : RUST_BACKTRACE=1 cargo test --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs
140- - run : RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio
142+ - run : RUST_BACKTRACE=1 cargo test --locked -- manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs
143+ - run : RUST_BACKTRACE=1 cargo test --locked -- manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio
141144 # FIPS
142- - run : RUST_BACKTRACE=1 cargo test --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips
143- - run : RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,runtime-tokio
145+ - run : RUST_BACKTRACE=1 cargo test --locked -- manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips
146+ - run : RUST_BACKTRACE=1 cargo test --locked -- manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,runtime-tokio
144147
145148 wasm_test :
146149 name : test wasm32-unknown-unknown
147150 runs-on : ubuntu-latest
148151 steps :
149- - name : Checkout sources
150- uses : actions/checkout@v4
151-
152- - name : Install stable toolchain
153- uses : dtolnay/rust-toolchain@stable
154-
155- - name : Add wasm target
156- run : rustup target add wasm32-unknown-unknown
157-
158- - name : Install nodejs v20
159- uses : actions/setup-node@v4
152+ - uses : actions/checkout@v4
153+ - uses : dtolnay/rust-toolchain@stable
154+ - run : rustup target add wasm32-unknown-unknown
155+ - uses : actions/setup-node@v4
160156 with :
161157 node-version : 20
158+ - uses : bytecodealliance/actions/wasm-tools/setup@v1
159+ - uses : cargo-bins/cargo-binstall@main
162160
163- - name : Setup `wasm-tools`
164- uses : bytecodealliance/actions/wasm-tools/setup@v1
165-
166- - name : Install cargo binstall
167- uses : cargo-bins/cargo-binstall@main
168-
169- - name : build wasm32 tests (quinn-proto)
170- run : cargo test -p iroh-quinn-proto --target wasm32-unknown-unknown --no-run
161+ - run : cargo test --locked -p iroh-quinn-proto --target wasm32-unknown-unknown --no-run
162+ - run : cargo check --locked -p iroh-quinn-udp --target wasm32-unknown-unknown --no-default-features --features=tracing,log
163+ - run : cargo rustc --locked -p iroh-quinn --target wasm32-unknown-unknown --no-default-features --features=log,platform-verifier,rustls-ring --crate-type=cdylib
171164
172165 # If the Wasm file contains any 'import "env"' declarations, then
173166 # some non-Wasm-compatible code made it into the final code.
174- - name : Check for 'import "env"' in Wasm
167+ - name : Ensure no 'import "env"' in quinn_proto Wasm
175168 run : |
176- ! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/deps/iroh_quinn_proto -*.wasm | grep 'import "env"'
177-
178- - name : Install wasm-bindgen-test-runner
179- run : cargo binstall wasm-bindgen-cli --locked --no-confirm
169+ ! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/deps/quinn_proto -*.wasm | grep 'import "env"'
170+ - name : Ensure no 'import "env"' in quinn Wasm
171+ run : |
172+ ! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/quinn.wasm | grep 'import "env"'
180173
181- - name : wasm32 test (quinn-proto)
182- run : cargo test -p iroh-quinn-proto --target wasm32-unknown-unknown
174+ - run : cargo binstall wasm-bindgen-cli --locked --no-confirm
175+ - run : cargo test --locked -p iroh-quinn-proto --target wasm32-unknown-unknown
183176
184177 msrv :
185178 runs-on : ubuntu-latest
@@ -190,7 +183,8 @@ jobs:
190183 - uses : actions/checkout@v4
191184 -
uses :
mozilla-actions/[email protected] 192185193- - run : cargo check --lib --all-features -p iroh-quinn-udp -p iroh-quinn-proto -p iroh-quinn
186+ - uses : Swatinem/rust-cache@v2
187+ - run : cargo check --locked --lib --all-features -p iroh-quinn-udp -p iroh-quinn-proto -p iroh-quinn
194188
195189 lint :
196190 runs-on : ubuntu-latest
@@ -204,19 +198,19 @@ jobs:
204198 with :
205199 components : rustfmt, clippy
206200 - run : cargo fmt --all -- --check
207- - run : cargo check --manifest-path quinn/Cargo.toml --all-targets --no-default-features
208- - run : cargo clippy --all-targets -- -D warnings
201+ - run : cargo check --locked -- manifest-path quinn/Cargo.toml --all-targets --no-default-features
202+ - run : cargo clippy --locked -- all-targets -- -D warnings
209203 - uses : dtolnay/rust-toolchain@stable
210204 with :
211205 components : clippy
212206 - name : doc
213- run : cargo doc --no-deps --document-private-items
207+ run : cargo doc --locked -- no-deps --document-private-items
214208 env :
215209 RUSTDOCFLAGS : -Dwarnings
216210 - name : lint fuzz
217211 run : |
218212 cd fuzz
219- cargo clippy -- -D warnings
213+ cargo clippy --locked -- -D warnings
220214
221215 audit :
222216 runs-on : ubuntu-latest
@@ -285,3 +279,18 @@ jobs:
285279 api-level : ${{ matrix.api-level }}
286280 arch : ${{ matrix.emulator-arch }}
287281 script : .github/workflows/rust-android-run-tests-on-emulator.sh
282+
283+ # features:
284+ # strategy:
285+ # matrix:
286+ # os: [ubuntu-latest, macos-latest, windows-latest]
287+ # runs-on: ${{ matrix.os }}
288+ # env:
289+ # RUSTFLAGS: -Dwarnings
290+ # # skip FIPS features outside of Linux
291+ # SKIP_FEATURES: ${{ matrix.os != 'ubuntu-latest' && 'rustls-aws-lc-rs-fips,aws-lc-rs-fips' || '' }}
292+ # steps:
293+ # - uses: actions/checkout@v4
294+ # - uses: dtolnay/rust-toolchain@stable
295+ # - uses: taiki-e/install-action@cargo-hack
296+ # - run: cargo hack check --feature-powerset --optional-deps --clean-per-run --no-dev-deps --ignore-unknown-features --ignore-private --group-features runtime-async-std,async-io,async-std --group-features runtime-smol,async-io,smol --skip "${{env.SKIP_FEATURES}}"
0 commit comments