From d6665efd21b0c177ec8076fd85c6dc6bf19d3e68 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Tue, 28 Jan 2025 13:11:49 -0500 Subject: [PATCH] Set cargo env vars and manifest config for faster CI builds. (#733) Based on advice from https://corrode.dev/blog/tips-for-faster-ci-builds/ --- .github/workflows/ci.yml | 4 ++++ .github/workflows/publish-python.yml | 4 ++++ .github/workflows/publish-rust.yml | 4 ++++ Cargo.toml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21d6827a..f8c15a7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,10 @@ concurrency: env: RUST_BACKTRACE: 1 CARGO_TERM_COLOR: always + # The below settings are based on advice from: + # https://corrode.dev/blog/tips-for-faster-ci-builds/ + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_TEST_DEBUG: 0 jobs: ci-everything: diff --git a/.github/workflows/publish-python.yml b/.github/workflows/publish-python.yml index 6874d21a..c4142871 100644 --- a/.github/workflows/publish-python.yml +++ b/.github/workflows/publish-python.yml @@ -9,6 +9,10 @@ concurrency: env: RUST_BACKTRACE: 1 CARGO_TERM_COLOR: always + # The below settings are based on advice from: + # https://corrode.dev/blog/tips-for-faster-ci-builds/ + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_TEST_DEBUG: 0 jobs: tag: diff --git a/.github/workflows/publish-rust.yml b/.github/workflows/publish-rust.yml index ed4495ba..c4a4abd4 100644 --- a/.github/workflows/publish-rust.yml +++ b/.github/workflows/publish-rust.yml @@ -16,6 +16,10 @@ concurrency: env: RUST_BACKTRACE: 1 CARGO_TERM_COLOR: always + # The below settings are based on advice from: + # https://corrode.dev/blog/tips-for-faster-ci-builds/ + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_TEST_DEBUG: 0 jobs: publish: diff --git a/Cargo.toml b/Cargo.toml index a18ee463..3ab23b6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,3 +42,7 @@ quote = "1.0" proc-macro2 = "1.0.51" globset = "0.4.6" walkdir = "2.3.1" + +[profile.release] +lto = true +codegen-units = 1