aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorMichael Davis2023-03-31 15:05:52 +0000
committerBlaž Hrastnik2023-04-03 01:54:57 +0000
commit6bfc3097412e54563f7bd6a6ff5fce5b4d9577e1 (patch)
treed649eddf765e221c05958c06f780fa1f68e6e202 /.github/workflows
parentfc5e515b306ed71369b7cd0f5420afeaef23b7c5 (diff)
Remove the rust-toolchain.toml file before building the release
The 'dtolnay/rust-toolchain' action ignores the rust-toolchain.toml file, but the installed 'cargo' respects it. This can create a version mismatch if the MSRV is different from the stable rust version. Any additional targets installed by rustup like aarch64-darwin might not be installed for the correct version. To fix this, we remove the rust-toolchain.toml file before calling 'cargo'.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 74ab8be0..b26daca8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -114,6 +114,12 @@ jobs:
mkdir -p runtime/grammars/sources
tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
+ # The rust-toolchain action ignores rust-toolchain.toml files.
+ # Removing this before building with cargo ensures that the rust-toolchain
+ # is considered the same between installation and usage.
+ - name: Remove the rust-toolchain.toml file
+ run: rm rust-toolchain.toml
+
- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with: