From bfff44fddb2b24886c8fcbc2b969c3ff54d6f295 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Tue, 22 Feb 2022 21:16:52 +0100 Subject: [PATCH] ci: deny warnings, useful env vars, do not cache deploy (#3629) * ci: deny warnings, useful env vars, do not cache deploy * fix: allow nightly warnings --- .github/workflows/deploy.yml | 14 +++++--------- .github/workflows/workflow.yml | 10 ++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ce59a537f..27899e30e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,11 @@ on: push: tags: - "v*" +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + RUST_BACKTRACE: short + RUSTUP_MAX_RETRIES: 10 jobs: # Build sources for every OS @@ -62,15 +67,6 @@ jobs: - name: Setup | Checkout uses: actions/checkout@v2.4.0 - # Cache files between builds - - name: Setup | Cache Cargo - uses: actions/cache@v2.1.7 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Setup | Rust uses: actions-rs/toolchain@v1.0.7 with: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 18b45d2b8..e896d1e00 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -9,6 +9,13 @@ on: - "docs/**" - "**.md" +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + RUST_BACKTRACE: short + RUSTFLAGS: "-D warnings" + RUSTUP_MAX_RETRIES: 10 + jobs: # Run the `rustfmt` code formatter rustfmt: @@ -156,3 +163,6 @@ jobs: # Run the ignored tests that expect the above setup - name: Build | Test run: cargo test --workspace --locked --all-features -- -Z unstable-options --include-ignored + env: + # Avoid -D warnings on nightly builds + RUSTFLAGS: ""