CI: remove use of actions-rs/toolchain

actions-rs is currently inactive and has an issue like actions-rs/toolchain#219
This commit is contained in:
Miles Liu 2022-11-02 11:09:01 +08:00
parent f4c6d55b9d
commit f52eaa92e4
No known key found for this signature in database
GPG Key ID: 4DB9B32F9B24A7A9
1 changed files with 14 additions and 18 deletions

View File

@ -21,12 +21,11 @@ jobs:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install rust toolchain - name: Install rust toolchain
uses: actions-rs/toolchain@v1 run: |
with: rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
toolchain: stable rustup set profile minimal
default: true rustup toolchain install stable -c "clippy,rustfmt"
profile: minimal # minimal component installation (ie, no documentation) rustup default stable
components: clippy, rustfmt
- name: Ensure `cargo fmt` has been run - name: Ensure `cargo fmt` has been run
run: cargo fmt --check run: cargo fmt --check
- name: Ensure MSRV is set in `clippy.toml` - name: Ensure MSRV is set in `clippy.toml`
@ -42,12 +41,10 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }}) - name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
uses: actions-rs/toolchain@v1 run: |
with: rustup set profile minimal
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }} rustup toolchain install ${{ env.MIN_SUPPORTED_RUST_VERSION }} -c clippy
default: true rustup default ${{ env.MIN_SUPPORTED_RUST_VERSION }}
components: clippy
profile: minimal
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
run: cargo clippy --locked --all-targets --all-features run: cargo clippy --locked --all-targets --all-features
- name: Run tests - name: Run tests
@ -93,12 +90,11 @@ jobs:
echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV
- name: Install Rust toolchain - name: Install Rust toolchain
uses: actions-rs/toolchain@v1 run: |
with: rustup set profile minimal
toolchain: stable rustup toolchain install stable
target: ${{ matrix.job.target }} rustup override set stable
override: true rustup target add ${{ matrix.job.target }}
profile: minimal # minimal component installation (ie, no documentation)
- name: Show version information (Rust, cargo, GCC) - name: Show version information (Rust, cargo, GCC)
shell: bash shell: bash