From 90205064c5299383e4f035412a6a1e9f8354311c Mon Sep 17 00:00:00 2001 From: Willem Olding Date: Thu, 2 Nov 2023 12:08:27 +1100 Subject: [PATCH] add steps to it uses same rust version as repo --- .github/workflows/tests.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 985fed79..c927cc39 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,12 +29,18 @@ jobs: - name: Checkout LFS objects # used for structured reference strings for tests (.srs files) run: git lfs checkout - - name: Install latest nightly-2022-10-28 - uses: dtolnay/rust-toolchain@stable + - name: Read toolchain file + id: rust-toolchain + run: | + RUST_TOOLCHAIN=$(grep 'channel' rust-toolchain.toml | awk '{split($0,a," = "); print a[2]}' | tr -d '"') + echo "RUST_TOOLCHAIN=$RUST_TOOLCHAIN" >> $GITHUB_OUTPUT + shell: bash + + - name: Install toolchain + uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2022-10-28 - override: true - components: rustfmt + toolchain: ${{ steps.rust-toolchain.outputs.RUST_TOOLCHAIN }} + components: rustfmt - name: Install just uses: extractions/setup-just@v1