Skip to content

Commit

Permalink
Use cargo with --locked option in checks
Browse files Browse the repository at this point in the history
Prompted by me overwriting dependabot's updates to the lock file
several times when it was inconsistent with the update was inconsistent
with the manifest file.

This change should also improve reproducibility in general.
  • Loading branch information
apljungquist committed Sep 14, 2024
1 parent 56b9a7c commit 0c85460
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ check_build: $(patsubst %/,%/LICENSE,$(wildcard apps/*/))
--exclude mdb \
--exclude mdb-sys \
--exclude send_event \
--locked \
--workspace
cargo-acap-build \
--target aarch64 \
Expand All @@ -154,6 +155,7 @@ check_build: $(patsubst %/,%/LICENSE,$(wildcard apps/*/))
--exclude cargo-acap-build \
--exclude cargo-acap-sdk \
--exclude device-manager \
--locked \
--workspace

.PHONY: check_build
Expand All @@ -163,14 +165,15 @@ check_docs:
RUSTDOCFLAGS="-Dwarnings" cargo doc
RUSTDOCFLAGS="-Dwarnings" cargo doc \
--document-private-items \
--locked \
--no-deps \
--target aarch64-unknown-linux-gnu \
--workspace
.PHONY: check_docs

## Check that the code is formatted correctly
check_format:
cargo fmt --check
cargo fmt --check --locked
.PHONY: check_format

## Check that generated files are up to date
Expand All @@ -196,11 +199,13 @@ check_lint:
--exclude mdb \
--exclude mdb-sys \
--exclude send_event \
--locked \
--workspace \
-- \
-Dwarnings
cargo clippy \
--all-targets \
--locked \
--no-deps \
--target aarch64-unknown-linux-gnu \
--workspace \
Expand All @@ -223,6 +228,7 @@ check_tests:
--exclude mdb \
--exclude mdb-sys \
--exclude send_event \
--locked \
--workspace
.PHONY: check_tests

Expand Down

0 comments on commit 0c85460

Please sign in to comment.