Skip to content

Commit

Permalink
Pinning nightly version for code coverage
Browse files Browse the repository at this point in the history
Reported rust-lang/rust#93054

Technically this isn't affecting all of our projects, but it seemed
easier to just pin it here and unpin once fixed. Having it in this one
location will make it easier if nightly ever breaks again for any
raeason.
  • Loading branch information
ecton committed Jan 19, 2022
1 parent 37600ef commit 3c2fff7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions khonsu-universal-tools/src/code_coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ pub struct CodeCoverage<C: Config = DefaultConfig> {
_config: PhantomData<C>,
}

pub const NIGHTLY_TOOLCHAIN: &str = "nightly-2022-01-14";

pub trait Config {
/// The cargo command after `cargo`.
fn cargo_args() -> Vec<String> {
vec![
String::from("+nightly"),
format!("+{}", NIGHTLY_TOOLCHAIN),
String::from("test"),
String::from("--workspace"),
String::from("--all-features"),
Expand Down Expand Up @@ -41,14 +43,12 @@ impl<C: Config> CodeCoverage<C> {
pub fn execute(install_dependencies: bool) -> anyhow::Result<()> {
if install_dependencies {
println!("Installing rustup component `llvm-tools-preview` and nightly rust version");
run!("rustup", "install", "nightly")?;
run!(
"rustup",
"component",
"add",
"llvm-tools-preview",
"--toolchain",
"nightly"
"install",
NIGHTLY_TOOLCHAIN,
"--component",
"llvm-tools-preview"
)?;
println!("Downloading pre-built grcov");
run!("curl", "-L", "https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2", "-o", "grcov.tar.bz2")?;
Expand Down Expand Up @@ -81,7 +81,7 @@ impl<C: Config> CodeCoverage<C> {
} else {
"grcov"
});
cmd.env("RUSTUP_TOOLCHAIN", "nightly");
cmd.env("RUSTUP_TOOLCHAIN", NIGHTLY_TOOLCHAIN);
cmd.args(&[
".",
"--binary-path",
Expand Down

0 comments on commit 3c2fff7

Please sign in to comment.