Skip to content

Commit

Permalink
ci: use stable toolchain for compiling xtask
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicholasbishop committed Apr 1, 2022
1 parent 20d98ad commit 3e10cba
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ jobs:
cp /usr/share/AAVMF/AAVMF_CODE.fd uefi-test-runner/QEMU_EFI-pflash.raw
cp /usr/share/AAVMF/AAVMF_VARS.fd uefi-test-runner/vars-template-pflash.raw
- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
# TODO: cache Rust binaries

Expand All @@ -54,11 +58,15 @@ jobs:
sudo apt-get update
sudo apt-get install qemu-system-x86 ovmf -y
- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
# TODO: cache Rust binaries

Expand Down Expand Up @@ -97,11 +105,15 @@ jobs:
curl -o uefi-test-runner/OVMF32_CODE.fd https://raw.githubusercontent.com/retrage/edk2-nightly/${EDK2_NIGHTLY_COMMIT}/bin/RELEASEIa32_OVMF_CODE.fd
curl -o uefi-test-runner/OVMF32_VARS.fd https://raw.githubusercontent.com/retrage/edk2-nightly/${EDK2_NIGHTLY_COMMIT}/bin/RELEASEIa32_OVMF_VARS.fd
- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
# TODO: cache Rust binaries

Expand All @@ -119,13 +131,17 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rust-src
override: true

- name: Run cargo test
run: cargo xtask test
Expand All @@ -137,13 +153,17 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy, rust-src
override: true

- name: Run cargo fmt
uses: actions-rs/cargo@v1
Expand All @@ -164,6 +184,11 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly toolchain that includes Miri
uses: actions-rs/toolchain@v1
with:
Expand All @@ -188,11 +213,15 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src

- name: Build
Expand Down

0 comments on commit 3e10cba

Please sign in to comment.