From 422f8a9f72ffd2a2d919d9ba50c21b6df6575094 Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Fri, 9 Oct 2020 23:03:30 +0000 Subject: [PATCH 1/2] Revert "actions: Force Rust 1.46.0 temporarily" This reverts commit 7fc8620fc3cc180a8669f07012b33dfb92740aca. --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91fc4156976..6c6503cb736 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,6 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v2 - - run: rustup toolchain install 1.46.0 && rustup default 1.46.0 - run: cargo install --version 0.30.0 cargo-make - run: cargo install --version 0.6.6 cargo-deny --no-default-features - run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} unit-tests From 3e75f29638e8ba0a4c8d5bc111594ac0648fe94f Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Fri, 9 Oct 2020 22:35:43 +0000 Subject: [PATCH 2/2] build: align opt-level for crate build deps Our OS packages are built as a byproduct of build script execution, while the final Rust artifacts are largely ignored. Since Rust 1.47.0, cargo builds host dependencies like build scripts with opt-level "0" by default, which did not match the "z" level we picked to minimize the size of the output artifacts. This caused package build dependencies to be built more than once, with concurrent Docker builds for the same package. This is wasteful and creates races that our build tool does not handle gracefully. By aligning the opt-level we restore the previous behavior. Signed-off-by: Ben Cressey --- packages/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/Cargo.toml b/packages/Cargo.toml index f1479851707..72ffa6fa833 100644 --- a/packages/Cargo.toml +++ b/packages/Cargo.toml @@ -76,3 +76,6 @@ members = [ [profile.dev] debug = false opt-level = 'z' + +[profile.dev.build-override] +opt-level = 'z'