Skip to content

Commit

Permalink
CI: remove use of actions-rs/toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
miles170 committed Nov 19, 2022
1 parent 1046287 commit 6b5f5bd
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 92 deletions.
109 changes: 40 additions & 69 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ jobs:
## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option
## * ... ref: <https://github.com/est31/cargo-udeps/issues/73>
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal
run: |
rustup toolchain install nightly --profile minimal
rustup default nightly
- uses: Swatinem/rust-cache@v2
- name: Install `cargo-udeps`
uses: actions-rs/[email protected]
Expand Down Expand Up @@ -121,12 +119,10 @@ jobs:
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
outputs CARGO_FEATURES_OPTION
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: rustfmt
run: |
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install stable -c rustfmt --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`cargo fmt` testing"
shell: bash
Expand Down Expand Up @@ -182,12 +178,9 @@ jobs:
macos-latest) brew install coreutils ;; # needed for show-utils.sh
esac
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: clippy
run: |
rustup toolchain install stable -c clippy --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`cargo clippy` lint testing"
shell: bash
Expand Down Expand Up @@ -286,12 +279,9 @@ jobs:
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
outputs CARGO_UTILITY_LIST_OPTIONS
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: clippy
run: |
rustup toolchain install stable -c clippy --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`cargo doc` with warnings"
shell: bash
Expand Down Expand Up @@ -320,11 +310,9 @@ jobs:
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
outputs CARGO_FEATURES_OPTION
- name: Install `rust` toolchain (v${{ env.RUST_MIN_SRV }})
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_MIN_SRV }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install ${{ env.RUST_MIN_SRV }} --profile minimal
rustup default ${{ env.RUST_MIN_SRV }}
- uses: Swatinem/rust-cache@v2
- name: Confirm MinSRV compatible 'Cargo.lock'
shell: bash
Expand Down Expand Up @@ -375,11 +363,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`cargo update` testing"
shell: bash
Expand All @@ -400,11 +386,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`make build`"
shell: bash
Expand All @@ -431,11 +415,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
Expand All @@ -455,11 +437,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install nightly --profile minimal
rustup default nightly
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
Expand All @@ -482,11 +462,9 @@ jobs:
sudo apt-get update
sudo apt-get install jq
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`make install`"
shell: bash
Expand Down Expand Up @@ -670,12 +648,9 @@ jobs:
;;
esac
- name: rust toolchain ~ install
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_MIN_SRV }}
target: ${{ matrix.job.target }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install ${{ env.RUST_MIN_SRV }} -t ${{ matrix.job.target }} --profile minimal
rustup default ${{ env.RUST_MIN_SRV }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
Expand Down Expand Up @@ -794,11 +769,9 @@ jobs:
## Install/setup prerequisites
make prepare-busytest
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "Run BusyBox test suite"
shell: bash
Expand Down Expand Up @@ -1003,11 +976,9 @@ jobs:
;;
esac
- name: rust toolchain ~ install
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ steps.vars.outputs.TOOLCHAIN }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install ${{ steps.vars.outputs.TOOLCHAIN }} --profile minimal
rustup default ${{ steps.vars.outputs.TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- name: Initialize toolchain-dependent workflow variables
id: dep_vars
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/FixPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ jobs:
RUST_MIN_SRV=$(grep -P "^\s+RUST_MIN_SRV:" .github/workflows/CICD.yml | grep -Po "(?<=\x22)\d+[.]\d+(?:[.]\d+)?(?=\x22)" )
outputs RUST_MIN_SRV
- name: Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }})
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ steps.vars.outputs.RUST_MIN_SRV }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
run: |
rustup toolchain install ${{ steps.vars.outputs.RUST_MIN_SRV }} --profile minimal
rustup default ${{ steps.vars.outputs.RUST_MIN_SRV }}
- uses: Swatinem/rust-cache@v2
- name: Ensure updated 'Cargo.lock'
shell: bash
Expand Down Expand Up @@ -103,12 +101,10 @@ jobs:
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
outputs CARGO_FEATURES_OPTION
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: rustfmt
run: |
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install stable -c rustfmt --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "`cargo fmt`"
shell: bash
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/GnuTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ jobs:
workflow_conclusion: completed ## continually recalibrates to last commit of default branch with a successful GnuTests (ie, "self-heals" from GnuTest regressions, but needs more supervision for/of regressions)
path: "${{ steps.vars.outputs.path_reference }}"
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: rustfmt
run: |
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install stable -c rustfmt --profile minimal
rustup default stable
- name: Install dependencies
shell: bash
run: |
Expand Down Expand Up @@ -281,12 +279,10 @@ jobs:
ref: 'v9.1'
submodules: recursive
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: rustfmt
run: |
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install nightly -c rustfmt --profile minimal
rustup default nightly
- name: Install dependencies
run: |
sudo apt update
Expand Down

0 comments on commit 6b5f5bd

Please sign in to comment.