Skip to content

Commit

Permalink
Make use of profile clear by '-github' suffix
Browse files Browse the repository at this point in the history
Additionally, make current release profile potentially faster by allowing
the standard optimizations, probably opt-level 2.

In GitHub release mode, optimize even further as time doesn't matter quite
as much there.

The `build-override` with `opt-leve = 0` was removed in fear this might
actually detremental for folks using `cargo install`.
  • Loading branch information
Byron committed Aug 8, 2024
1 parent 871eec7 commit 34b1060
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
TARGET: ${{ matrix.target }}
TARGET_FLAGS: --target=${{ matrix.target }}
TARGET_DIR: target/${{ matrix.target }}
PROFILE: release-opt
PROFILE: release-github

steps:
- name: Checkout repository
Expand Down
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,17 @@ lto = "thin"
# can wire up the 'abrt' signal handler so tempfiles will be removed in case of panics.
panic = "unwind"
incremental = false
build-override = { opt-level = 0 }

# This profile is currently used in building releases for GitHub.
# It may be removed at any time and should not otherwise be relied on.
[profile.release-opt]
[profile.release-github]
inherits = "release"
overflow-checks = false
panic = "unwind"
lto = "fat"
codegen-units = 1
strip = "symbols"
build-override = { opt-level = 3 }

[workspace]
members = [
Expand Down

0 comments on commit 34b1060

Please sign in to comment.