mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-06-08 17:17:36 +00:00
Change toolchain from nightly to stable
As of Rust 1.68, the uefi crates work on stable. Remove the `channel = "nightly"` setting from `rust-toolchain.toml` and `template/rust-toolchain.toml`. Related changes: * The CI job to compile with the MSRV has been changed from `nightly-2022-11-22` to `1.68`. So for now the MSRV job isn't checking anything that isn't already checked by other jobs, but once 1.69 comes out it will. * The CI job to test the latest crates.io release still needs the nightly toolchain until we do a new release. * Some of the uefi-macros compiler ui tests have been modified so that the error output matches the errors produced by stable compiler, which are currently slightly different in a few cases from the nightly compiler. In particular, the precise spans we output for errors in the guid macros don't work on stable, because proc-macro's Literal::subspan method is currently unstable.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
[toolchain]
|
||||
# Oldest nightly that currently works with `cargo xtask build`.
|
||||
channel = "nightly-2022-11-22"
|
||||
channel = "1.68"
|
||||
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]
|
||||
|
||||
@@ -108,6 +108,10 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# TODO: for now our latest release (0.19.1) requires nightly.
|
||||
- name: Set nightly toolchain
|
||||
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml
|
||||
|
||||
- name: Build
|
||||
run: cargo xtask test-latest-release
|
||||
|
||||
@@ -143,6 +147,8 @@ jobs:
|
||||
- name: Build
|
||||
run: cargo xtask build
|
||||
|
||||
# This job requires the nightly channel, but keep it as a separate job from
|
||||
# `nightly_channel` because it takes a while to run.
|
||||
build_feature_permutations:
|
||||
name: Check that the build works for all feature combinations
|
||||
runs-on: ubuntu-latest
|
||||
@@ -150,6 +156,9 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set nightly toolchain so that `unstable` can be included
|
||||
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml
|
||||
|
||||
- name: Build
|
||||
run: cargo xtask build --feature-permutations
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "nightly"
|
||||
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "nightly"
|
||||
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]
|
||||
|
||||
@@ -2,4 +2,4 @@ error: Entry method must have no ABI modifier
|
||||
--> tests/ui/entry_bad_abi.rs:8:1
|
||||
|
|
||||
8 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
|
||||
| ^^^^^^^^^^
|
||||
| ^^^^^^
|
||||
|
||||
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
|
||||
--> tests/ui/entry_bad_return_type.rs:8:1
|
||||
|
|
||||
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Status`, found `bool`
|
||||
|
|
||||
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> Status`
|
||||
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> bool`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: GUID component "Gaaa" is not a hexadecimal number
|
||||
--> tests/ui/guid_bad_hex_group2.rs:5:44
|
||||
--> tests/ui/guid_bad_hex_group2.rs:5:34
|
||||
|
|
||||
5 | const BadHexGroup2: Guid = guid!("aaaaaaaa-Gaaa-aaaa-aaaa-aaaaaaaaaaaa");
|
||||
| ^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: GUID component "aaaaaaaaaaaG" is not a hexadecimal number
|
||||
--> tests/ui/guid_bad_hex_group5.rs:5:59
|
||||
--> tests/ui/guid_bad_hex_group5.rs:5:34
|
||||
|
|
||||
5 | const BadHexGroup5: Guid = guid!("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaG");
|
||||
| ^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
+2
-3
@@ -50,7 +50,7 @@ fn build(opt: &BuildOpt) -> Result<()> {
|
||||
|
||||
let cargo = Cargo {
|
||||
action: CargoAction::Build,
|
||||
features: Feature::more_code(true, true),
|
||||
features: Feature::more_code(false, true),
|
||||
packages: Package::all_except_xtask(),
|
||||
release: opt.build_mode.release,
|
||||
target: Some(*opt.target),
|
||||
@@ -64,8 +64,7 @@ fn clippy(opt: &ClippyOpt) -> Result<()> {
|
||||
// Run clippy on all the UEFI packages.
|
||||
let cargo = Cargo {
|
||||
action: CargoAction::Clippy,
|
||||
// for all possible features
|
||||
features: Feature::more_code(true, true),
|
||||
features: Feature::more_code(false, true),
|
||||
packages: Package::all_except_xtask(),
|
||||
release: false,
|
||||
target: Some(*opt.target),
|
||||
|
||||
Reference in New Issue
Block a user