Skip to content

Commit 95f99a2

Browse files
committed
specify Rust toolchain version in CI with rust-toolchain.toml
1 parent 0ddc470 commit 95f99a2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/pytest.yml

+6
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ jobs:
6868
./examples/mobc/tools/.crates2.json
6969
key: ${{ matrix.c2a_user }}-${{ runner.os }}-tools-${{ hashFiles('${{ matrix.c2a_user }}/tools/install.sh', '${{ matrix.c2a_user }}/tools/package.json') }}
7070

71+
- name: Get Rust toolchain
72+
id: toolchain
73+
run: |
74+
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain.toml >> "$GITHUB_OUTPUT"
75+
7176
- uses: dtolnay/rust-toolchain@stable
7277
with:
78+
toolchain: ${{ steps.toolchain.outputs.toolchain }}
7379
targets: i686-unknown-linux-gnu
7480
components: clippy, rustfmt
7581

.github/workflows/rust.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ jobs:
2424
sudo apt-get update -y
2525
sudo apt-get install -y gcc-multilib g++-multilib
2626
27+
- name: Get Rust toolchain
28+
id: toolchain
29+
run: |
30+
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain.toml >> "$GITHUB_OUTPUT"
31+
2732
- uses: dtolnay/rust-toolchain@v1
2833
with:
29-
toolchain: stable
34+
toolchain: ${{ steps.toolchain.outputs.toolchain }}
3035
targets: i686-unknown-linux-gnu
3136
components: clippy, rustfmt
3237

0 commit comments

Comments
 (0)