3030 echo "===== freebsd-version ====="
3131 freebsd-version
3232
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
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
3434
3535 test-netbsd :
3636 name : test on netbsd
5555 echo "===== uname -a ====="
5656 uname -a
5757
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
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
5959
6060 test-solaris :
6161 name : test on solaris
7878 # Unlike others, don't un-ignore stress tests, because they hang on Solaris
7979 run : |
8080 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
81+ cargo build --locked -- all-targets && cargo test --locked -- manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches
8282
8383 test-illumos :
8484 name : test on illumos
9696 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
9797 run : |
9898 . "$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
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