Skip to content

Commit

Permalink
Merge pull request #403 from arkedge/feature/lock-ci-rust-toolchain
Browse files Browse the repository at this point in the history
Specify Rust toolchain version in CI with rust-toolchain.toml
  • Loading branch information
sksat authored Jan 9, 2025
2 parents 0ddc470 + 95f99a2 commit 71a44a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,14 @@ jobs:
./examples/mobc/tools/.crates2.json
key: ${{ matrix.c2a_user }}-${{ runner.os }}-tools-${{ hashFiles('${{ matrix.c2a_user }}/tools/install.sh', '${{ matrix.c2a_user }}/tools/package.json') }}

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

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y gcc-multilib g++-multilib
- name: Get Rust toolchain
id: toolchain
run: |
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain.toml >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
toolchain: ${{ steps.toolchain.outputs.toolchain }}
targets: i686-unknown-linux-gnu
components: clippy, rustfmt

Expand Down

0 comments on commit 71a44a9

Please sign in to comment.