Avoid checking dev-deps for jobs *-check and lint in workflow ci.yml (#978)

Avoid checking dev-deps for jobs `*-check` and lint in workflow `ci.yml`

We just want to make sure cargo-binstall can compile for the target, we
don't want to pull in the extra dependencies.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-04-04 01:51:13 +10:00 committed by GitHub
parent 8dd7aa5688
commit f384088fd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -220,6 +220,14 @@ fmt-check: fmt
lint: clippy fmt-check
# Some dev-dependencies require a newer version of Rust, but it doesn't matter for MSRV check
# This is a workaround for the cargo nightly option `-Z avoid-dev-deps`
avoid-dev-deps:
for crate in ./crates/*; do \
sed 's/\[dev-dependencies\]/[workaround-avoid-dev-deps]/g' "$crate/Cargo.toml" >"$crate/Cargo.toml.tmp"; \
mv "$crate/Cargo.toml.tmp" "$crate/Cargo.toml" \
; done
package-dir:
rm -rf packages/prep
mkdir -p packages/prep