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:
Jiahao XU 2023-07-09 22:06:04 +10:00 committed by GitHub
parent c4b6921314
commit d280e122ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 7 deletions

View file

@ -14,12 +14,15 @@ members = [
]
[profile.release]
opt-level = "z"
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = "symbols"
[profile.release.build-override]
inherits = "dev.build-override"
[profile.dev]
opt-level = 0
debug = true
@ -28,6 +31,10 @@ debug-assertions = true
overflow-checks = true
codegen-units = 1024
# Set the default for dependencies on debug.
[profile.dev.package."*"]
opt-level = 3
[profile.dev.build-override]
inherits = "dev"
debug = false
@ -35,5 +42,15 @@ debug-assertions = false
overflow-checks = false
incremental = false
[profile.release.build-override]
inherits = "dev.build-override"
[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"