From f1eeb7e2c3730349ab682e7fa71b0eb528e99429 Mon Sep 17 00:00:00 2001 From: Valentin Date: Tue, 1 Mar 2022 23:19:47 +0100 Subject: [PATCH] Move cargo release configuration to CI By setting these in Cargo.toml everyone is forced to build with them. It is better to leave the defaults to Cargo and the user building the project. If there are important gains in binary size or speed with these options they can continue to be set for the official builds as performed by CI. --- .github/workflows/release.yml | 3 +++ Cargo.toml | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75b46ed9..23814dd3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,9 @@ jobs: make_release: name: Make release runs-on: ubuntu-20.04 + env: + CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 + CARGO_PROFILE_RELEASE_LTO: fat steps: - uses: actions/checkout@v2 diff --git a/Cargo.toml b/Cargo.toml index 04aad3a2..5f9b8758 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,3 @@ members = [ "crates/termbox", "crates/tiny", ] - -[profile.release] -lto = true -codegen-units = 1