@@ -7,6 +7,9 @@ features_flag := '--all-features'
77# Use `CI=true just ci-test` to run the same tests as in GitHub CI.
88# Use `just env-info` to see the current values of RUSTFLAGS and RUSTDOCFLAGS
99ci_mode := if env (' CI' , ' ' ) != ' ' {' 1' } else {' ' }
10+ # cargo-binstall needs a workaround due to caching
11+ # ci_mode might be manually set by user, so re-check the env var
12+ binstall_args := if env (' CI' , ' ' ) != ' ' {' --no-track' } else {' ' }
1013export RUSTFLAGS := env (' RUSTFLAGS' , if ci_mode == ' 1' {' -D warnings' } else {' ' })
1114export RUSTDOCFLAGS := env (' RUSTDOCFLAGS' , if ci_mode == ' 1' {' -D warnings' } else {' ' })
1215export RUST_BACKTRACE := env (' RUST_BACKTRACE' , if ci_mode == ' 1' {' 1' } else {' ' })
@@ -16,7 +19,7 @@ export RUST_BACKTRACE := env('RUST_BACKTRACE', if ci_mode == '1' {'1'} else {''}
1619
1720# Run integration tests and save its output as the new expected output
1821bless * args : (cargo-install ' cargo-insta' )
19- TRYBUILD=overwrite cargo insta test --accept --unreferenced=delete --all-features
22+ cargo insta test --accept --unreferenced=delete {{ features_flag }} {{ args }}
2023
2124# Build the project
2225build :
@@ -58,6 +61,7 @@ docs *args='--open':
5861# Print environment info
5962env -info:
6063 @ echo " Running {{ if ci_mode == ' 1' {' in CI mode' } else {' in dev mode' } }} on {{ os ()}} / {{ arch ()}} "
64+ @ echo " PWD $(pwd)"
6165 {{ just_executable ()}} --version
6266 rustc --version
6367 cargo --version
@@ -93,6 +97,7 @@ get-msrv package=main_crate: (get-crate-field 'rust_version' package)
9397msrv : (cargo-install ' cargo-msrv' )
9498 cargo msrv find --write-msrv --component rustfmt {{ features_flag}} --ignore-lockfile -- {{ just_executable ()}} ci-test-msrv
9599
100+ # Run cargo-release
96101release * args = ' ': (cargo-install ' release-plz' )
97102 release-plz {{ args}}
98103
@@ -112,6 +117,10 @@ test-doc: (docs '')
112117test-fmt : && (fmt-toml ' --check' ' --check-format' )
113118 cargo fmt --all -- --check
114119
120+ # Use the experimental workspace publishing with --dry-run. Requires nightly Rust.
121+ test-publish :
122+ cargo + nightly -Z package-workspace publish --dry-run
123+
115124# Find unused dependencies. Install it with `cargo install cargo-udeps`
116125udeps : (cargo-install ' cargo-udeps' )
117126 cargo + nightly udeps --workspace --all-targets {{ features_flag}}
@@ -150,7 +159,7 @@ cargo-install $COMMAND $INSTALL_CMD='' *args='':
150159 echo " $COMMAND could not be found. Installing it with cargo install ${INSTALL_CMD:-$COMMAND} --locked {{ args}} "
151160 cargo install ${INSTALL_CMD:-$COMMAND} --locked {{ args}}
152161 else
153- echo " $COMMAND could not be found. Installing it with cargo binstall ${INSTALL_CMD:-$COMMAND} --locked {{ args}} "
154- cargo binstall ${INSTALL_CMD:-$COMMAND} --locked {{ args}}
162+ echo " $COMMAND could not be found. Installing it with cargo binstall ${INSTALL_CMD:-$COMMAND} {{ binstall_args }} --locked {{ args}} "
163+ cargo binstall ${INSTALL_CMD:-$COMMAND} {{ binstall_args }} --locked {{ args}}
155164 fi
156165 fi
0 commit comments