Replace ATiltedTree/setup-rust with rust-toolchain

- https://github.com/ATiltedTree/setup-rust has not been committed to since May
  2022, I am uncertain about how widely used it is.
- It appears to have a bug with restoring its internal cache whenever there
  comes a new stable version (immediate guess would be the cache-key does not
  resolve `stable` to a specific version, which somehow breaks rustup, but I have not investigated)
- https://github.com/dtolnay/rust-toolchain is a more sensible take of https://github.com/actions-rs/toolchain,
  where the original repo appears to be unmaintained.
  It is implemented in one file of yaml/bash
  https://github.com/dtolnay/rust-toolchain/blob/master/action.yml, we could
  easily fork it if it becomes unmainted, unlike the other actions which uses
  unnecessary javascript
This commit is contained in:
Henrik Hørlück Berg 2023-08-24 16:37:15 +02:00 committed by David Adam
parent 9d0d16686e
commit 5734630966
2 changed files with 10 additions and 28 deletions

View file

@ -16,10 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: SetupRust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: 1.67
- uses: dtolnay/rust-toolchain@1.67
- name: Install deps
run: |
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
@ -46,11 +43,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: SetupRust
uses: ATiltedTree/setup-rust@v1
- uses: dtolnay/rust-toolchain@1.67
with:
rust-version: 1.67
targets: "i686-unknown-linux-gnu" # setup-rust wants this space-separated
targets: "i686-unknown-linux-gnu" # rust-toolchain wants this comma-separated
- name: Install deps
run: |
sudo apt update
@ -84,12 +79,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: SetupRust
uses: ATiltedTree/setup-rust@v1
# All -Z options require running nightly
- uses: dtolnay/rust-toolchain@nightly
with:
# All -Z options require running nightly
rust-version: nightly
# ASAN uses `cargo build -Zbuild-std` which requires the rust-src component
# this is comma-separated
components: rust-src
- name: Install deps
run: |
@ -135,10 +129,7 @@ jobs:
#
# steps:
# - uses: actions/checkout@v3
# - name: SetupRust
# uses: ATiltedTree/setup-rust@v1
# with:
# rust-version: 1.67
# - uses: dtolnay/rust-toolchain@1.67
# - name: Install deps
# run: |
# sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
@ -165,10 +156,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: SetupRust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: 1.67
- uses: dtolnay/rust-toolchain@1.67
- name: Install deps
run: |
sudo pip3 install pexpect

View file

@ -11,10 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: SetupRust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- uses: dtolnay/rust-toolchain@stable
- name: cargo fmt
run: cargo fmt --check --all
@ -23,10 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: SetupRust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- uses: dtolnay/rust-toolchain@stable
- name: Install deps
run: |
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux