From 701ee93358b3fce75e26489b530e807a76254166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20F=C3=A9ron?= Date: Thu, 17 Oct 2024 20:19:51 +0200 Subject: [PATCH] Fix CI running wrong cargo version (#333) --- .github/workflows/ci.yaml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aa3fb096c..02dfc445c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,32 +47,24 @@ jobs: sudo apt-get update sudo apt-get install -y libprotobuf-dev libprotobuf-c-dev protobuf-compiler protobuf-c-compiler - - uses: dtolnay/rust-toolchain@stable + - id: rustc + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - name: Configure CI cache uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo +${{ steps.rustc.outputs.name }} build --all-targets + - name: Run tests - uses: actions-rs/cargo@v1 if: matrix.toolchain != 'nightly' - with: - command: test - args: --all-targets --no-fail-fast - - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --all-targets + run: cargo +${{ steps.rustc.outputs.name }} test --all-targets --no-fail-fast - name: Run tests with code coverage - uses: actions-rs/cargo@v1 if: matrix.toolchain == 'nightly' - with: - command: test - args: --all-targets --no-fail-fast + run: cargo +${{ steps.rustc.outputs.name }} test --all-targets --no-fail-fast env: CARGO_INCREMENTAL: '0' RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'