Skip to content

Commit

Permalink
Use dtolnay/rust-toolchain instead of actions-rs/toolchain (#1020)
Browse files Browse the repository at this point in the history
* Use dtolnay/rust-toolchain instead of actions-rs/toolchain

* Change setup-rust

* Fix

* Fix input name
  • Loading branch information
thibault-martinez authored Aug 16, 2023
1 parent 28e54fa commit 5d2122f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 27 deletions.
10 changes: 4 additions & 6 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ inputs:
description: Type of toolchain to install.
required: false
default: stable
target:
description: Target triple of the toolchain.
targets:
description: Targets triple of the toolchain.
required: false
components:
description: Additional components to install.
Expand Down Expand Up @@ -35,12 +35,10 @@ runs:

- id: install
name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ inputs.toolchain }}
target: ${{ inputs.target }}
override: true
profile: minimal
targets: ${{ inputs.targets }}
components: ${{ inputs.components }}

- name: Cache dependencies
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/bindings-nodejs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ jobs:
python-version: "3.10"

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/bindings-wallet-covector-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ jobs:
python-version: "3.10"

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/bindings-wasm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ jobs:
- uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
target: "wasm32-unknown-unknown"

# Download a pre-compiled wasm-bindgen binary.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bindings-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
target: wasm32-unknown-unknown
targets: wasm32-unknown-unknown
cache-root: bindings/wasm

# Download a pre-compiled wasm-bindgen binary.
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
uses: dtolnay/rust-toolchain@stable

- name: Install required packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
target: riscv64gc-unknown-none-elf
targets: riscv64gc-unknown-none-elf

- name: Check
uses: actions-rs/cargo@v1
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/private-tangle-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

- name: Install required packages
run: |
Expand Down

0 comments on commit 5d2122f

Please sign in to comment.