From e646a7663064d41876c59f8c0cc32cac920ae0fc Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 29 Apr 2022 18:15:49 -0400 Subject: [PATCH] ci: disable debug symbols and incremental in CI, force locked #719 Disables incremental compilation and debug symbols in CI and other related workflows, since they're not used there at all. Also forces --locked as needed. --- .github/workflows/ci.yml | 19 +++++++++++++++---- .github/workflows/coverage.yml | 3 +++ .github/workflows/deployment.yml | 4 ++++ .github/workflows/nightly.yml | 4 ++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20747229..d92e1cd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,10 @@ on: branches: - master +env: + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_DEV_DEBUG: 0 + jobs: rustfmt: runs-on: ${{ matrix.os }} @@ -242,7 +246,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --all-targets --verbose --target=${{ matrix.triple.target }} --features "battery" + args: --all-targets --verbose --target=${{ matrix.triple.target }} --features "battery" --locked use-cross: ${{ matrix.triple.cross }} # Check without the battery feature enabled on x86-64 for supported operating systems @@ -304,7 +308,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: check - args: --all-targets --verbose --target=${{ matrix.triple.target }} --no-default-features + args: --all-targets --verbose --target=${{ matrix.triple.target }} --no-default-features --locked use-cross: ${{ matrix.triple.cross }} # Run tests x86-64 for supported operating systems @@ -361,9 +365,16 @@ jobs: with: key: ${{ matrix.triple.target }} - - name: Run tests + - name: Build tests if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - run: cargo test --no-fail-fast + run: cargo test --no-run --locked + env: + CARGO_HUSKY_DONT_INSTALL_HOOKS: true + RUST_BACKTRACE: full + + - name: Run tests + if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + run: cargo test --no-fail-fast -- --nocapture --quiet env: CARGO_HUSKY_DONT_INSTALL_HOOKS: true RUST_BACKTRACE: full diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c74f6078..bf94ed74 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,6 +9,9 @@ on: branches: - master +env: + CARGO_INCREMENTAL: 0 + jobs: pre_job: runs-on: ubuntu-latest diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index e5fceca8..e96be4de 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -14,6 +14,10 @@ on: tags: - "[0-9]+.[0-9]+.[0-9]+" +env: + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_DEV_DEBUG: 0 + jobs: initialize-release-job: name: initialize-release-job diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 69c75235..c35cd00c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -13,6 +13,10 @@ on: default: "mock" required: false +env: + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_DEV_DEBUG: 0 + jobs: initialize-job: name: initialize-job