Skip to content

Commit

Permalink
Disable incremental compilation in CI (#1322)
Browse files Browse the repository at this point in the history
There's no reason to use Rust's incremental compilation in CI. According
to matklad's blog post on [fast Rust builds][fastbuilds]:

> CI builds often are closer to from-scratch builds, as changes are
> typically much bigger than from a local edit-compile cycle. For
> from-scratch builds, incremental adds an extra dependency-tracking
> overhead. It also significantly increases the amount of IO and the
> size of ./target, which make caching less effective.

[fastbuilds]: https://matklad.github.io/2021/09/04/fast-rust-builds.html

(cherry picked from commit f7651a3)
Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
olix0r committed Mar 30, 2022
1 parent af26feb commit 73845c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/advisory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ name: Advisory
on:
pull_request: {}

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10

jobs:
# Prevent sudden announcement of a new advisory from failing Ci.
advisories:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
tags:
- "release/*"

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10

jobs:
package:
permissions:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Rust PR
on:
pull_request: {}

env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10

jobs:

## Required builds
Expand Down

0 comments on commit 73845c6

Please sign in to comment.