Skip to content

Commit

Permalink
ci(check): install rust using rust toolchain file
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Dec 28, 2024
1 parent 5f64714 commit 42d7a75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt

Expand All @@ -43,9 +43,8 @@ jobs:
- uses: actions/checkout@v4

- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: clippy

- name: cargo clippy
Expand All @@ -60,16 +59,17 @@ jobs:
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Setup | Rust nightly
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
uses: dtolnay/rust-toolchain@nightly

- name: Setup | cargo-docs-rs
uses: dtolnay/install@cargo-docs-rs

- name: Run | Cargo doc
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
- name: cargo docs-rs
run: cargo docs-rs

build:
name: Build binaries
Expand All @@ -95,10 +95,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup | Rust
uses: dtolnay/rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
targets: ${{matrix.target}}
target: ${{matrix.target}}

- name: Setup | Install cross [Linux]
if: matrix.os == 'ubuntu-latest'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ jobs:
uses: actions/checkout@v4

- name: Setup | Rust
uses: dtolnay/rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
targets: ${{matrix.target}}

- name: Setup | Install cross [Linux]
Expand Down Expand Up @@ -102,7 +101,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Setup | Nix
uses: cachix/install-nix-action@V27
Expand Down

0 comments on commit 42d7a75

Please sign in to comment.