Skip to content

Commit

Permalink
project: check-in Cargo.lock file, use --locked
Browse files Browse the repository at this point in the history
This matches updated guidance from the Rust project that libraries
_should_ check in their lockfile. Also updates CI to use `--locked`
where appropriate.
  • Loading branch information
cpu committed Dec 1, 2023
1 parent 854ba8d commit 829d6a3
Show file tree
Hide file tree
Showing 3 changed files with 946 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ jobs:
toolchain: ${{ matrix.rust }}

- name: cargo build (debug; default features)
run: cargo build
run: cargo build --locked

- name: cargo test (debug; default features)
run: cargo test
run: cargo test --locked
env:
RUST_BACKTRACE: 1

- name: cargo test (debug; all features)
run: cargo test --all-features
run: cargo test --locked --all-features
env:
RUST_BACKTRACE: 1

- name: cargo build (debug; no default features)
run: cargo build --no-default-features
run: cargo build --locked --no-default-features

- name: cargo test (debug; no default features; no run)
run: cargo test --no-default-features --no-run
run: cargo test --locked --no-default-features --no-run

- name: cargo test (release; no run)
run: cargo test --release --no-run
run: cargo test --locked --release --no-run

- name: run macOS integration test
if: matrix.os == 'macos-latest'
Expand All @@ -83,7 +83,7 @@ jobs:
with:
toolchain: "1.60"

- run: cargo check --lib --all-features
- run: cargo check --locked --lib --all-features

format:
name: Format
Expand Down Expand Up @@ -112,4 +112,4 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-features -- --deny warnings
- run: cargo clippy --locked --all-features -- --deny warnings
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Cargo.lock
target/
*.gcda
*.gcno
Expand Down
Loading

0 comments on commit 829d6a3

Please sign in to comment.