Skip to content

Commit 3e10cba

Browse files
committedApr 1, 2022
ci: use stable toolchain for compiling xtask
The nightly rust compiler is currently unable to compile the version of fatfs we are using in xtask. Rust bug: rust-lang/rust#95538. But we don't need to use nightly to compile xtask. In the CI, install both stable and nightly toolchains. The stable toolchain will be used by default, and xtask already knows to insert `+nightly` when building uefi-rs, so there's no need to set `override: true` for the nightly toolchain anymore. Fixes #397
1 parent 20d98ad commit 3e10cba

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed
 

‎.github/workflows/rust.yml

+35-6
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ jobs:
2727
cp /usr/share/AAVMF/AAVMF_CODE.fd uefi-test-runner/QEMU_EFI-pflash.raw
2828
cp /usr/share/AAVMF/AAVMF_VARS.fd uefi-test-runner/vars-template-pflash.raw
2929
30+
- name: Install stable
31+
uses: actions-rs/toolchain@v1
32+
with:
33+
toolchain: stable
34+
3035
- name: Install latest nightly
3136
uses: actions-rs/toolchain@v1
3237
with:
3338
toolchain: nightly
34-
override: true
3539
components: rust-src
3640
# TODO: cache Rust binaries
3741

@@ -54,11 +58,15 @@ jobs:
5458
sudo apt-get update
5559
sudo apt-get install qemu-system-x86 ovmf -y
5660
61+
- name: Install stable
62+
uses: actions-rs/toolchain@v1
63+
with:
64+
toolchain: stable
65+
5766
- name: Install latest nightly
5867
uses: actions-rs/toolchain@v1
5968
with:
6069
toolchain: nightly
61-
override: true
6270
components: rust-src
6371
# TODO: cache Rust binaries
6472

@@ -97,11 +105,15 @@ jobs:
97105
curl -o uefi-test-runner/OVMF32_CODE.fd https://raw.githubusercontent.com/retrage/edk2-nightly/${EDK2_NIGHTLY_COMMIT}/bin/RELEASEIa32_OVMF_CODE.fd
98106
curl -o uefi-test-runner/OVMF32_VARS.fd https://raw.githubusercontent.com/retrage/edk2-nightly/${EDK2_NIGHTLY_COMMIT}/bin/RELEASEIa32_OVMF_VARS.fd
99107
108+
- name: Install stable
109+
uses: actions-rs/toolchain@v1
110+
with:
111+
toolchain: stable
112+
100113
- name: Install latest nightly
101114
uses: actions-rs/toolchain@v1
102115
with:
103116
toolchain: nightly
104-
override: true
105117
components: rust-src
106118
# TODO: cache Rust binaries
107119

@@ -119,13 +131,17 @@ jobs:
119131
- name: Checkout sources
120132
uses: actions/checkout@v2
121133

134+
- name: Install stable
135+
uses: actions-rs/toolchain@v1
136+
with:
137+
toolchain: stable
138+
122139
- name: Install latest nightly
123140
uses: actions-rs/toolchain@v1
124141
with:
125142
profile: minimal
126143
toolchain: nightly
127144
components: rust-src
128-
override: true
129145

130146
- name: Run cargo test
131147
run: cargo xtask test
@@ -137,13 +153,17 @@ jobs:
137153
- name: Checkout sources
138154
uses: actions/checkout@v2
139155

156+
- name: Install stable
157+
uses: actions-rs/toolchain@v1
158+
with:
159+
toolchain: stable
160+
140161
- name: Install latest nightly
141162
uses: actions-rs/toolchain@v1
142163
with:
143164
profile: minimal
144165
toolchain: nightly
145166
components: rustfmt, clippy, rust-src
146-
override: true
147167

148168
- name: Run cargo fmt
149169
uses: actions-rs/cargo@v1
@@ -164,6 +184,11 @@ jobs:
164184
- name: Checkout sources
165185
uses: actions/checkout@v2
166186

187+
- name: Install stable
188+
uses: actions-rs/toolchain@v1
189+
with:
190+
toolchain: stable
191+
167192
- name: Install latest nightly toolchain that includes Miri
168193
uses: actions-rs/toolchain@v1
169194
with:
@@ -188,11 +213,15 @@ jobs:
188213
- name: Checkout sources
189214
uses: actions/checkout@v2
190215

216+
- name: Install stable
217+
uses: actions-rs/toolchain@v1
218+
with:
219+
toolchain: stable
220+
191221
- name: Install latest nightly
192222
uses: actions-rs/toolchain@v1
193223
with:
194224
toolchain: nightly
195-
override: true
196225
components: rust-src
197226

198227
- name: Build

0 commit comments

Comments
 (0)
Please sign in to comment.