Skip to content

Commit 6372f6e

Browse files
committed
ci/cd: handle toolchain via actions-rs/toolchain
1 parent f7fcc9a commit 6372f6e

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ env:
88
preview: ${{ github.event_name == 'release' && contains(github.event.release.tag_name, 'preview') }}
99
on_schedule: "false"
1010
# RUSTC_WRAPPER: sccache
11+
#
12+
RUST_TOOLCHAIN: nightly
13+
RUST_TOOLCHAIN_PROFILE: default
14+
RUST_TOOLCHAIN_OVERRIDE: true
15+
#
1116
RUSTC_WRAPPER: sccache
1217
CACHE_VERSION: v1
1318
SCCACHE_VERSION: 0.10.0
@@ -68,10 +73,16 @@ jobs:
6873
- name: "Install gcc"
6974
if: matrix.gcc != ''
7075
run: sudo apt update && sudo apt install -yq ${{ matrix.gcc }}
71-
# - name: "Install cargo-binstall"
72-
# uses: cargo-bins/cargo-binstall@main
73-
- name: "Setup Rust toolchain"
74-
run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update
76+
# - name: "Install cargo-binstall"
77+
# uses: cargo-bins/cargo-binstall@main
78+
- name: "Setup Rust toolchain via actions-rs"
79+
uses: actions-rs/toolchain@v1
80+
with:
81+
toolchain: ${{ env.RUST_TOOLCHAIN }}
82+
profile: ${{ env.RUST_TOOLCHAIN_PROFILE }}
83+
override: ${{ env.RUST_TOOLCHAIN_OVERRIDE }}
84+
# - name: "Setup Rust toolchain"
85+
# run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update
7586
- name: "Ensure nightly rustfmt installed"
7687
run: rustup component add rustfmt --toolchain nightly
7788
- name: "Run Cargo fmt"
@@ -132,8 +143,14 @@ jobs:
132143
uses: cargo-bins/cargo-binstall@main
133144
- name: "Install sccache via cargo-binstall"
134145
run: cargo binstall -y sccache@${{ env.SCCACHE_VERSION }}
135-
- name: "Setup Rust toolchain"
136-
run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update
146+
- name: "Setup Rust toolchain via actions-rs"
147+
uses: actions-rs/toolchain@v1
148+
with:
149+
toolchain: ${{ env.RUST_TOOLCHAIN }}
150+
profile: ${{ env.RUST_TOOLCHAIN_PROFILE }}
151+
override: ${{ env.RUST_TOOLCHAIN_OVERRIDE }}
152+
# - name: "Setup Rust toolchain"
153+
# run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update
137154
- name: "Ensure nightly rustfmt installed"
138155
run: rustup component add rustfmt --toolchain nightly
139156
- name: "Run Cargo fmt"

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Doc-check & Generation"
1+
name: "Docs - Check & Generation"
22
on:
33
push:
44
branches:

0 commit comments

Comments
 (0)