Skip to content

Commit

Permalink
fix(ci): Replace actions-rs/toolchain with dtolnay/rust-toolchain
Browse files Browse the repository at this point in the history
Because node version is going to be deprecated

Signed-off-by: Alexander Gil <[email protected]>
  • Loading branch information
pando85 committed Aug 24, 2023
1 parent 2117012 commit 9d33529
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v3

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

- run: rustup override set ${{steps.toolchain.outputs.name}}

- uses: Swatinem/rust-cache@v2

Expand All @@ -40,10 +40,10 @@ jobs:
- uses: actions/checkout@v3

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

- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Build image
run: make images
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- uses: actions/checkout@v3

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

- run: rustup override set ${{steps.toolchain.outputs.name}}
- run: rustup component add rustfmt

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ jobs:
uses: actions/checkout@v3

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

- name: Run cargo fmt
run: cargo fmt --all -- --check
Expand All @@ -34,11 +33,10 @@ jobs:
uses: actions/checkout@v3

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

- uses: actions-rs/clippy-check@v1
with:
Expand All @@ -58,12 +56,10 @@ jobs:
echo "MIN_SUPPORTED_RUST_VERSION=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
default: true
components: clippy
profile: minimal

- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -115,11 +111,10 @@ jobs:
key: ${{ matrix.job.target }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
targets: ${{ matrix.job.target }}

- name: Run tests
uses: actions-rs/cargo@v1
Expand Down

0 comments on commit 9d33529

Please sign in to comment.