Skip to content

Commit 1c27b02

Browse files
committed
Use Cargo.lock in CI jobs
1 parent ecc5e7d commit 1c27b02

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/rust.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
echo "===== freebsd-version ====="
3434
freebsd-version
3535
36-
cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches
36+
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 quinn-udp --benches
3737
3838
test-netbsd:
3939
name: test on netbsd
@@ -58,7 +58,7 @@ jobs:
5858
echo "===== uname -a ====="
5959
uname -a
6060
61-
cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches
61+
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 quinn-udp --benches
6262
6363
test-solaris:
6464
name: test on solaris
@@ -81,7 +81,7 @@ jobs:
8181
# Unlike others, don't un-ignore stress tests, because they hang on Solaris
8282
run: |
8383
export PATH=$HOME/.rust_solaris/bin:$PATH
84-
cargo build --all-targets && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches
84+
cargo build --locked --all-targets && cargo test --locked --manifest-path fuzz/Cargo.toml && cargo test --locked -p quinn-udp --benches
8585
8686
test-illumos:
8787
name: test on illumos
@@ -99,7 +99,7 @@ jobs:
9999
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
100100
run: |
101101
. "$HOME/.cargo/env"
102-
cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches
102+
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 quinn-udp --benches
103103
104104
test:
105105
strategy:
@@ -120,13 +120,13 @@ jobs:
120120
with:
121121
toolchain: ${{ matrix.rust }}
122122
- uses: Swatinem/rust-cache@v2
123-
- run: cargo build --all-targets
124-
- run: cargo test
125-
- run: cargo test -- --ignored stress
126-
- run: cargo test --manifest-path fuzz/Cargo.toml
123+
- run: cargo build --locked --all-targets
124+
- run: cargo test --locked
125+
- run: cargo test --locked -- --ignored stress
126+
- run: cargo test --locked --manifest-path fuzz/Cargo.toml
127127
if: ${{ matrix.rust }} == "stable"
128-
- run: cargo test -p quinn-udp --benches
129-
- run: cargo test -p quinn-udp --benches --features fast-apple-datapath
128+
- run: cargo test --locked -p quinn-udp --benches
129+
- run: cargo test --locked -p quinn-udp --benches --features fast-apple-datapath
130130
if: ${{ matrix.os }} == "macos-latest"
131131

132132
test-aws-lc-rs:
@@ -136,11 +136,11 @@ jobs:
136136
- uses: dtolnay/rust-toolchain@stable
137137
- uses: Swatinem/rust-cache@v2
138138
# 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
139+
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs
140+
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio
141141
# 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
142+
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips
143+
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,runtime-tokio
144144

145145
wasm_test:
146146
name: test wasm32-unknown-unknown
@@ -155,9 +155,9 @@ jobs:
155155
- uses: bytecodealliance/actions/wasm-tools/setup@v1
156156
- uses: cargo-bins/cargo-binstall@main
157157

158-
- run: cargo test -p quinn-proto --target wasm32-unknown-unknown --no-run
159-
- run: cargo check -p quinn-udp --target wasm32-unknown-unknown --no-default-features --features=tracing,log
160-
- run: cargo rustc -p quinn --target wasm32-unknown-unknown --no-default-features --features=log,platform-verifier,rustls-ring --crate-type=cdylib
158+
- run: cargo test --locked -p quinn-proto --target wasm32-unknown-unknown --no-run
159+
- run: cargo check --locked -p quinn-udp --target wasm32-unknown-unknown --no-default-features --features=tracing,log
160+
- run: cargo rustc --locked -p quinn --target wasm32-unknown-unknown --no-default-features --features=log,platform-verifier,rustls-ring --crate-type=cdylib
161161

162162
# If the Wasm file contains any 'import "env"' declarations, then
163163
# some non-Wasm-compatible code made it into the final code.
@@ -169,7 +169,7 @@ jobs:
169169
! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/quinn.wasm | grep 'import "env"'
170170
171171
- run: cargo binstall wasm-bindgen-cli --locked --no-confirm
172-
- run: cargo test -p quinn-proto --target wasm32-unknown-unknown
172+
- run: cargo test --locked -p quinn-proto --target wasm32-unknown-unknown
173173

174174
msrv:
175175
runs-on: ubuntu-latest
@@ -178,7 +178,7 @@ jobs:
178178
# Note that we must also update the README when changing the MSRV
179179
- uses: dtolnay/[email protected]
180180
- uses: Swatinem/rust-cache@v2
181-
- run: cargo check --lib --all-features -p quinn-udp -p quinn-proto -p quinn
181+
- run: cargo check --locked --lib --all-features -p quinn-udp -p quinn-proto -p quinn
182182

183183
lint:
184184
runs-on: ubuntu-latest
@@ -189,19 +189,19 @@ jobs:
189189
components: rustfmt, clippy
190190
- uses: Swatinem/rust-cache@v2
191191
- run: cargo fmt --all -- --check
192-
- run: cargo check --manifest-path quinn/Cargo.toml --all-targets --no-default-features
193-
- run: cargo clippy --all-targets -- -D warnings
192+
- run: cargo check --locked --manifest-path quinn/Cargo.toml --all-targets --no-default-features
193+
- run: cargo clippy --locked --all-targets -- -D warnings
194194
- uses: dtolnay/rust-toolchain@stable
195195
with:
196196
components: clippy
197197
- name: doc
198-
run: cargo doc --no-deps --document-private-items
198+
run: cargo doc --locked --no-deps --document-private-items
199199
env:
200200
RUSTDOCFLAGS: -Dwarnings
201201
- name: lint fuzz
202202
run: |
203203
cd fuzz
204-
cargo clippy -- -D warnings
204+
cargo clippy --locked -- -D warnings
205205
206206
audit:
207207
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)