Skip to content

Commit 79dea19

Browse files
committed
Add --locked in CI and Makefile
1 parent b9874fd commit 79dea19

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/test.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
uses: dtolnay/rust-toolchain@nightly
153153

154154
- name: cargo test (debug; all features; -Z minimal-versions)
155-
run: cargo -Z minimal-versions test --all-features
155+
run: cargo -Z minimal-versions test --all-features --locked
156156

157157
format:
158158
name: Format
@@ -190,7 +190,7 @@ jobs:
190190
# (below) will have a new lint that we want to suppress.
191191
# If we suppress (e.g. #![allow(clippy::arc_with_non_send_sync)]),
192192
# we would get an unknown-lint error from older clippy versions.
193-
run: cargo clippy --workspace -- -D warnings -A unknown-lints
193+
run: cargo clippy --locked --workspace -- -D warnings -A unknown-lints
194194

195195
clippy-nightly-optional:
196196
name: Clippy nightly (optional)
@@ -205,7 +205,7 @@ jobs:
205205
with:
206206
components: clippy
207207
- name: Check clippy
208-
run: cargo clippy --workspace -- -D warnings
208+
run: cargo clippy --locked --workspace -- -D warnings
209209

210210
clang-tidy:
211211
name: Clang Tidy

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ else
55
endif
66

77
CARGO ?= cargo
8+
CARGOFLAGS += --locked
89

910
CFLAGS := -Werror -Wall -Wextra -Wpedantic -g -I src/
1011
PROFILE := release
@@ -32,7 +33,7 @@ test: all test-rust
3233
./tests/client-server.py ./target/client ./target/server
3334

3435
test-rust:
35-
${CARGO} test
36+
${CARGO} test --locked
3637

3738
target:
3839
mkdir -p $@

0 commit comments

Comments
 (0)