ci: Use same nightly toolchain for docs that's used for other jobs

This commit is contained in:
Jonas Platte 2023-07-31 10:51:40 +02:00
parent 511ba3d86e
commit 3bd58e3c89
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C
3 changed files with 6 additions and 5 deletions

View File

@ -6,15 +6,13 @@ use std::path::PathBuf;
use clap::{Args, Subcommand};
use xshell::pushd;
use crate::{cmd, Metadata, Result};
use crate::{cmd, Metadata, Result, NIGHTLY};
mod spec_links;
use spec_links::check_spec_links;
const MSRV: &str = "1.65";
// Keep in sync with version in `rust-toolchain.toml` and `.github/workflows/ci.yml`
const NIGHTLY: &str = "nightly-2023-07-03";
#[derive(Args)]
pub struct CiArgs {

View File

@ -1,6 +1,6 @@
use clap::Args;
use crate::{cmd, Result};
use crate::{cmd, Result, NIGHTLY};
#[derive(Args)]
pub struct DocTask {
@ -20,7 +20,7 @@ impl DocTask {
rustdocflags += " -Dwarnings";
}
let mut cmd = cmd!("rustup run nightly cargo doc --all-features --no-deps")
let mut cmd = cmd!("rustup run {NIGHTLY} cargo doc --all-features --no-deps")
.env("RUSTDOCFLAGS", rustdocflags);
if self.open {

View File

@ -14,6 +14,9 @@ use clap::{Parser, Subcommand};
use serde::Deserialize;
use serde_json::from_str as from_json_str;
// Keep in sync with version in `rust-toolchain.toml` and `.github/workflows/ci.yml`
const NIGHTLY: &str = "nightly-2023-07-03";
#[cfg(feature = "default")]
mod cargo;
mod ci;