From c96b595f42c80db47b44c6240d59de12bb1e537c Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 17 Sep 2022 04:37:43 -0400 Subject: [PATCH] Pin nightly used for fmt/clippy As per https://github.com/serai-dex/serai/issues/116. --- .github/nightly-version | 1 + .github/workflows/tests.yml | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .github/nightly-version diff --git a/.github/nightly-version b/.github/nightly-version new file mode 100644 index 00000000..6b066be9 --- /dev/null +++ b/.github/nightly-version @@ -0,0 +1 @@ +nightly-2022-09-01 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 32b8626d..ea97ff8a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,11 +14,15 @@ jobs: with: submodules: "recursive" + - name: Get nightly version to use + id: nightly + run: echo "::set-output name=version::$(cat .github/nightly-version)" + - name: Build Dependencies uses: ./.github/actions/build-dependencies with: - # Clippy requires nightly for some reason - rust-toolchain: nightly + # Clippy requires nightly due to serai-runtime requiring it + rust-toolchain: ${{ steps.nightly.outputs.version }} rust-components: clippy - name: Run Clippy @@ -42,13 +46,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Get nightly version to use + id: nightly + run: echo "::set-output name=version::$(cat .github/nightly-version)" + # Doesn't grab the cache as it's not needed - name: Install rustfmt uses: actions-rs/toolchain@v1 with: - toolchain: nightly + toolchain: ${{ steps.nightly.outputs.version }} profile: minimal components: rustfmt - name: Run rustfmt - run: cargo +nightly fmt -- --check + run: cargo fmt -- --check