Skip to content

Commit

Permalink
Switch CI toolchain action to dtolnay/rust-toolchain
Browse files Browse the repository at this point in the history
There were recently a lot of hiccups with installing rustup for Windows
in CI and the previously used actions from actions-rs seem to be no
longer maintained. Following the discussion in
rust-lang/rustup#3409, this is one way to go.
  • Loading branch information
sirhcel authored and eldruin committed May 13, 2024
1 parent f47c1ed commit 18f3876
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,19 @@ jobs:
uses: actions/checkout@v2

- name: Build | install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
target: ${{ inputs.target }}
toolchain: ${{ inputs.toolchain }}
default: true

- name: Build | rust-cache
uses: Swatinem/rust-cache@v1

- name: Build | build library (default features)
uses: actions-rs/cargo@v1
with:
command: build
args: --target=${{ inputs.target }}
run: cargo build --target=${{ inputs.target }}

- name: Build | build library (all features)
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features --target=${{ inputs.target }}
run: cargo build --all-features --target=${{ inputs.target }}

- name: Build | build examples (default features)
if: ${{ inputs.disable_extra_builds == false }}
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,19 @@ jobs:
uses: actions/checkout@v2

- name: Lint | install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
default: true
components: clippy, rustfmt

- name: Lint | rust-cache
uses: Swatinem/rust-cache@v1

- name: Lint | check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt -- --check

- name: Lint | clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features
run: cargo clippy --all-targets --all-features

# --------------------------------------------------------------------------
# MSRV
Expand Down

0 comments on commit 18f3876

Please sign in to comment.