Skip to content

Commit

Permalink
ci: Turn off debuginfo in ci test builds
Browse files Browse the repository at this point in the history
We don't consume debuginfo from CI builds, so we can disable debug
symbols in these builds.

The coverage test is also fixed to address a linking issue with the
version of cargo-tarpaulin we have cached. The coverage workflow has all
debuginfo enabled since it's used for coverage generation.
  • Loading branch information
olix0r committed Nov 10, 2023
1 parent fefdd12 commit 640230f
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
- justfile

env:
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"

jobs:
check-all:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-each.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"

jobs:
list-changed-crates:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=2"
RUSTUP_MAX_RETRIES: 10

jobs:
Expand All @@ -26,6 +26,9 @@ jobs:
image: docker://ghcr.io/linkerd/dev:v42-rust
options: --security-opt seccomp=unconfined # 🤷
steps:
# XXX(ver) Workaround for a linking problem in the binary we store in the
# devcontainer.
- run: rm -f /usr/local/bin/cargo-tarpaulin && cargo install cargo-tarpaulin
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
# XXX(ver) AFAICT, Tarpaulin doesn't allow us to compose a report over multiple invocations,
# so we have to choose between getting coverage from unit tests and integration tests (since
Expand All @@ -35,4 +38,5 @@ jobs:
#- run: cargo tarpaulin --locked --workspace --exclude=linkerd2-proxy --exclude=linkerd-app-integration --skip-clean --ignore-tests --no-fail-fast --out=Xml
- run: cargo tarpaulin --locked --packages=linkerd-app-integration --no-default-features --skip-clean --no-run
- run: cargo tarpaulin --locked --packages=linkerd-app-integration --no-default-features --skip-clean --ignore-tests --no-fail-fast --out=Xml
continue-on-error: true
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
2 changes: 1 addition & 1 deletion .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"
RUSTUP_MAX_RETRIES: 10

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"
RUSTUP_MAX_RETRIES: 10

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"
RUSTUP_MAX_RETRIES: 10

# Run only the app-level tests. These may take longer to compile (usually due to very large stack
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"

jobs:
clippy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -A opaque_hidden_inferred_bound"
RUSTFLAGS: "-D warnings -A opaque_hidden_inferred_bound -C debuginfo=0"
RUSTUP_MAX_RETRIES: 10

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- .github/actions/package/*
- .github/workflows/release.yml
- justfile
- Cargo.toml # For release build settings
push:
tags:
- "release/*"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: "-D warnings -A deprecated"
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"
RUSTUP_MAX_RETRIES: 10

jobs:
Expand Down

0 comments on commit 640230f

Please sign in to comment.