11#!/ usr/ bin/ env just --justfile
22
3- # Define the name of the main crate based
3+ # Define the name of the main crate based on the directory name
44main_crate := file_name (justfile_directory ())
55# How to call the current just executable. Note that just_executable() may have `\` in Windows paths, so we need to quote it.
66just := quote (just_executable ())
@@ -31,10 +31,6 @@ build:
3131check :
3232 cargo check --workspace --all-features --all-targets
3333
34- # Quick compile for MSRV, without compiling benches
35- check-msrv :
36- cargo check --all-targets
37-
3834# Generate code coverage report to upload to codecov.io
3935ci-coverage : env-info && \
4036 (coverage ' --codecov --output-path target/llvm-cov/codecov.info' )
@@ -45,7 +41,8 @@ ci-coverage: env-info && \
4541ci-test : env-info test-fmt clippy check test test-doc && assert-git-is-clean
4642
4743# Run minimal subset of tests to ensure compatibility with MSRV
48- ci-test-msrv : env-info check-msrv test-msrv
44+ ci-test-msrv : env-info
45+ cargo check --all-features --package {{ main_crate}}
4946
5047# Clean all build artifacts
5148clean :
@@ -123,10 +120,6 @@ test-doc: (docs '')
123120test-fmt : && (fmt-toml ' --check' ' --check-format' )
124121 cargo fmt --all -- --check
125122
126- # Run all tests for MSRV
127- test-msrv :
128- cargo test --workspace
129-
130123# Find unused dependencies. Uses `cargo-udeps`
131124udeps : (cargo-install ' cargo-udeps' )
132125 cargo + nightly udeps --workspace --all-features --all-targets
@@ -148,11 +141,11 @@ assert-cmd command:
148141[private ]
149142assert -git-is-clean :
150143 @ if [ -n " $(git status --untracked-files --porcelain)" ]; then \
151- >&2 echo " ERROR: git repo is no longer clean. Make sure compilation and tests artifacts are in the .gitignore, and no repo files are modified." ;\
152- >&2 echo " ######### git status ##########" ;\
153- git status ;\
154- git --no-pager diff ;\
155- exit 1 ;\
144+ >&2 echo " ERROR: git repo is no longer clean. Make sure compilation and tests artifacts are in the .gitignore, and no repo files are modified." ;\
145+ >&2 echo " ######### git status ##########" ;\
146+ git status ;\
147+ git --no-pager diff ;\
148+ exit 1 ;\
156149 fi
157150
158151# Check if a certain Cargo command is installed, and install it if needed
0 commit comments