Skip to content

Commit

Permalink
Add a profile specifically for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlattimore committed Dec 14, 2024
1 parent 491dd0d commit 36910f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
- run: sudo apt install bubblewrap lld
- run: cargo build --workspace --no-default-features
- run: cargo test --workspace
- run: cargo build --profile ci --workspace --no-default-features
- run: cargo test --profile ci --workspace

clippy:
name: Clippy
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ debug = true
inherits = "release"
lto = "thin"

# In CI, we disable debug info. This gives us faster builds. It also reduces the size of the target
# directory, allowing us to fit more into cache. The only resulting loss is line numbers in
# backtraces. If we really wanted those, we could set `debug = "line-tables-only"`, however it seems
# unlikely that we'd need line numbers in backtraces all that often, so we don't for now.
[profile.ci]
inherits = "dev"
debug = 0

[workspace.lints.clippy]
# It's not always desirable to use if-let instead of a match, especially if you might later end up
# adding more branches to the match.
Expand Down

0 comments on commit 36910f7

Please sign in to comment.