Skip to content

Commit d9b35e3

Browse files
authored
Merge pull request #108 from rust-osdev/fix-ci-matrix-rust
CI Fix: actually use different Rust versions
2 parents f962e73 + bc80a9b commit d9b35e3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/rust.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ jobs:
2020
- 1.52.1 # MSVR
2121
steps:
2222
- uses: actions/checkout@v2
23+
# Important preparation step: override the latest default Rust version in GitHub CI
24+
# with the current value of the iteration in the "strategy.matrix.rust"-array.
25+
- uses: actions-rs/toolchain@v1
26+
with:
27+
profile: default
28+
toolchain: ${{ matrix.rust }}
29+
override: true
30+
# helps to identify if the right cargo version is actually used
31+
- run: cargo version
2332
- name: Build
2433
run: cargo build --verbose
2534
- name: Run tests
@@ -35,6 +44,15 @@ jobs:
3544
- 1.52.1 # MSVR
3645
steps:
3746
- uses: actions/checkout@v2
47+
# Important preparation step: override the latest default Rust version in GitHub CI
48+
# with the current value of the iteration in the "strategy.matrix.rust"-array.
49+
- uses: actions-rs/toolchain@v1
50+
with:
51+
profile: default
52+
toolchain: ${{ matrix.rust }}
53+
override: true
54+
# helps to identify if the right cargo version is actually used
55+
- run: cargo version
3856
- name: "Rustup: install some no_std target"
3957
run: rustup target add thumbv7em-none-eabihf
4058
- name: Build (no_std)
@@ -50,6 +68,15 @@ jobs:
5068
- stable
5169
steps:
5270
- uses: actions/checkout@v2
71+
# Important preparation step: override the latest default Rust version in GitHub CI
72+
# with the current value of the iteration in the "strategy.matrix.rust"-array.
73+
- uses: actions-rs/toolchain@v1
74+
with:
75+
profile: default
76+
toolchain: ${{ matrix.rust }}
77+
override: true
78+
# helps to identify if the right cargo version is actually used
79+
- run: cargo version
5380
- name: Rustfmt
5481
run: cargo fmt -- --check
5582
- name: Clippy

0 commit comments

Comments
 (0)