Skip to content

Commit

Permalink
Switch away from setup-rust-toolchain@v1 (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
neysofu authored Aug 1, 2023
1 parent 9d7b3d2 commit baf2687
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name: Rust
# - Always install and select the desired Rust toolchain *before* running
# `Swatinem/rust-cache`. This is because the active Rust toolchain is used as
# a cache key.
# - You can use `rustup show` to install and select the right Rust toolchain if
# you have a `rust-toolchain.toml` file:
# https://github.com/rust-lang/rustup/issues/1397.
# - When caching Rust compilation artifacts, keep in mind that different `cargo`
# commands will use different profiles
# (https://doc.rust-lang.org/cargo/reference/profiles.html). Learn what you
Expand Down Expand Up @@ -64,7 +67,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-check
Expand All @@ -91,7 +95,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
Expand All @@ -111,7 +116,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
# `cargo-nextest` is much faster than standard `cargo test`.
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
Expand All @@ -135,7 +141,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-build
Expand Down Expand Up @@ -199,7 +206,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/nightly' }}
Expand All @@ -225,7 +233,8 @@ jobs:
with:
submodules: true
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
- name: add llvm component
run: rustup component add llvm-tools-preview
- name: cargo install cargo-llvm-cov
Expand Down Expand Up @@ -264,7 +273,8 @@ jobs:
# `check` job does and their caches are shared, so it's best to keep
# things as similar as possible.
- uses: rui314/setup-mold@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust
run: rustup show
- uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-check
Expand Down

0 comments on commit baf2687

Please sign in to comment.