mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 13:08:42 +00:00
Optimize release-build.yml
: Avoid building benchmark dependencies (#981)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
0de3b21004
commit
f134df548d
2 changed files with 10 additions and 2 deletions
4
.github/workflows/release-build.yml
vendored
4
.github/workflows/release-build.yml
vendored
|
@ -60,7 +60,9 @@ jobs:
|
||||||
|
|
||||||
- name: Run unit tests in release build
|
- name: Run unit tests in release build
|
||||||
if: "matrix.r"
|
if: "matrix.r"
|
||||||
run: just unit-tests
|
run: |
|
||||||
|
just avoid-benchmark-deps
|
||||||
|
just unit-tests
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
8
justfile
8
justfile
|
@ -220,7 +220,7 @@ fmt-check: fmt
|
||||||
|
|
||||||
lint: clippy fmt-check
|
lint: clippy fmt-check
|
||||||
|
|
||||||
# Some dev-dependencies require a newer version of Rust, but it doesn't matter for MSRV check
|
# Rm dev-dependencies for `cargo-check` and clippy to speedup compilation.
|
||||||
# This is a workaround for the cargo nightly option `-Z avoid-dev-deps`
|
# This is a workaround for the cargo nightly option `-Z avoid-dev-deps`
|
||||||
avoid-dev-deps:
|
avoid-dev-deps:
|
||||||
for crate in ./crates/*; do \
|
for crate in ./crates/*; do \
|
||||||
|
@ -228,6 +228,12 @@ avoid-dev-deps:
|
||||||
mv "$crate/Cargo.toml.tmp" "$crate/Cargo.toml" \
|
mv "$crate/Cargo.toml.tmp" "$crate/Cargo.toml" \
|
||||||
; done
|
; done
|
||||||
|
|
||||||
|
# leon dev-dependencies pulls in crates for benchmark but not used in test.
|
||||||
|
# This is a workaround for the lack of `benchmark-dependencies`.
|
||||||
|
avoid-benchmark-deps:
|
||||||
|
sed 's/\[dev-dependencies\]/[workaround-avoid-dev-deps]/g' ./crates/leon/Cargo.toml >./crates/leon/Cargo.toml.tmp
|
||||||
|
mv ./crates/leon/Cargo.toml.tmp ./crates/leon/Cargo.toml
|
||||||
|
|
||||||
package-dir:
|
package-dir:
|
||||||
rm -rf packages/prep
|
rm -rf packages/prep
|
||||||
mkdir -p packages/prep
|
mkdir -p packages/prep
|
||||||
|
|
Loading…
Add table
Reference in a new issue