Skip to content

Commit

Permalink
ci: Speedup ci testing time
Browse files Browse the repository at this point in the history
Due to the merge of #1184, CI now takes 11m just to shallow clone
crates.io git index.

Building all dependencies with `opt-level = "z"` should speed it up.

Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Jun 30, 2023
1 parent 01a87ac commit 4798858
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,29 @@ debug-assertions = true
overflow-checks = true
codegen-units = 1024

# Set the default for dependencies on debug.
[profile.dev.package."*"]
opt-level = "z"

[profile.dev.build-override]
inherits = "dev"
debug = false
debug-assertions = false
overflow-checks = false
incremental = false

[profile.check-only]
inherits = "dev"
debug = false
debug-assertions = false
overflow-checks = false
panic = "abort"

[profile.check-only.build-override]
inherits = "check-only"

[profile.check-only.package."*"]
inherits = "check-only"

[profile.release.build-override]
inherits = "dev.build-override"
9 changes: 5 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,14 @@ build: print-env
{{cargo-bin}} build {{cargo-build-args}}

check: print-env
{{cargo-bin}} check {{cargo-build-args}}
cargo-hack hack check --feature-powerset -p leon {{cargo-check-args}}
{{cargo-bin}} check -p binstalk-downloader --no-default-features
{{cargo-bin}} check -p cargo-binstall --no-default-features --features rustls {{cargo-check-args}}
{{cargo-bin}} check {{cargo-build-args}} --profile check-only
cargo-hack hack check --feature-powerset -p leon {{cargo-check-args}} --profile check-only
{{cargo-bin}} check -p binstalk-downloader --no-default-features --profile check-only
{{cargo-bin}} check -p cargo-binstall --no-default-features --features rustls {{cargo-check-args}} --profile check-only
cargo-hack hack check -p binstalk-downloader \
--feature-powerset \
--include-features default,json,gh-api-client \
--profile check-only \
{{cargo-check-args}}

get-output file outdir=".":
Expand Down

0 comments on commit 4798858

Please sign in to comment.