mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Speedup prebuilt binary (#1188)
After the merge of #1184, CI now takes 11m just to shallow clone crates.io git index, which means that our user using alternative git index would also be quite slow. This commit speeds it up by building all dependencies with `-O3` in dev and release build, in release build we build everything with `-O3`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c4b6921314
commit
d280e122ca
2 changed files with 25 additions and 7 deletions
23
Cargo.toml
23
Cargo.toml
|
@ -14,12 +14,15 @@ members = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
opt-level = "z"
|
opt-level = 3
|
||||||
lto = true
|
lto = true
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
strip = "symbols"
|
strip = "symbols"
|
||||||
|
|
||||||
|
[profile.release.build-override]
|
||||||
|
inherits = "dev.build-override"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
opt-level = 0
|
opt-level = 0
|
||||||
debug = true
|
debug = true
|
||||||
|
@ -28,6 +31,10 @@ debug-assertions = true
|
||||||
overflow-checks = true
|
overflow-checks = true
|
||||||
codegen-units = 1024
|
codegen-units = 1024
|
||||||
|
|
||||||
|
# Set the default for dependencies on debug.
|
||||||
|
[profile.dev.package."*"]
|
||||||
|
opt-level = 3
|
||||||
|
|
||||||
[profile.dev.build-override]
|
[profile.dev.build-override]
|
||||||
inherits = "dev"
|
inherits = "dev"
|
||||||
debug = false
|
debug = false
|
||||||
|
@ -35,5 +42,15 @@ debug-assertions = false
|
||||||
overflow-checks = false
|
overflow-checks = false
|
||||||
incremental = false
|
incremental = false
|
||||||
|
|
||||||
[profile.release.build-override]
|
[profile.check-only]
|
||||||
inherits = "dev.build-override"
|
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"
|
||||||
|
|
9
justfile
9
justfile
|
@ -181,13 +181,14 @@ build: print-env
|
||||||
{{cargo-bin}} build {{cargo-build-args}}
|
{{cargo-bin}} build {{cargo-build-args}}
|
||||||
|
|
||||||
check: print-env
|
check: print-env
|
||||||
{{cargo-bin}} check {{cargo-build-args}}
|
{{cargo-bin}} check {{cargo-build-args}} --profile check-only
|
||||||
cargo-hack hack check --feature-powerset -p leon {{cargo-check-args}}
|
cargo-hack hack check --feature-powerset -p leon {{cargo-check-args}} --profile check-only
|
||||||
{{cargo-bin}} check -p binstalk-downloader --no-default-features
|
{{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}}
|
{{cargo-bin}} check -p cargo-binstall --no-default-features --features rustls {{cargo-check-args}} --profile check-only
|
||||||
cargo-hack hack check -p binstalk-downloader \
|
cargo-hack hack check -p binstalk-downloader \
|
||||||
--feature-powerset \
|
--feature-powerset \
|
||||||
--include-features default,json,gh-api-client \
|
--include-features default,json,gh-api-client \
|
||||||
|
--profile check-only \
|
||||||
{{cargo-check-args}}
|
{{cargo-check-args}}
|
||||||
|
|
||||||
get-output file outdir=".":
|
get-output file outdir=".":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue