From a5831c897a5707aaabcae8f08c6bfc887a8f6c04 Mon Sep 17 00:00:00 2001 From: Daniel Noland Date: Sat, 9 Nov 2024 15:17:07 -0700 Subject: [PATCH] Remove rust nightly It is churning our disc and cache too much relative to its actual utility. --- builds.template.yml | 9 --------- builds.yml | 9 --------- default.nix | 9 +-------- nix/versions.nix | 14 +++++++------- nix/versions.nix.template | 14 +++++++------- scripts/bump.sh | 7 +------ 6 files changed, 16 insertions(+), 46 deletions(-) diff --git a/builds.template.yml b/builds.template.yml index c6cfbed..d70ad34 100644 --- a/builds.template.yml +++ b/builds.template.yml @@ -5,10 +5,8 @@ env: rust_pins: stable: &rust_stable "${RUST_STABLE_PIN}" - nightly: &nightly_pin "${RUST_NIGHTLY_PIN}" llvm_for_rust_pins: stable: &llvm_stable "${RUST_STABLE_PIN_LLVM}" - nightly: &llvm_nightly "${RUST_NIGHTLY_PIN_LLVM}" nixpkgs: unstable: &nixpkgs_unstable "${NIXPKGS_COMMIT}" just: @@ -31,12 +29,5 @@ matrix: - "x86_64-unknown-linux-gnu" - "x86_64-unknown-linux-musl" just: *just_version - - # pinned nightly - <<: *default - key: "nightly" - llvm: *llvm_nightly - rust: - channel: "nightly" - version: *nightly_pin nixpkgs: - *nixpkgs_unstable diff --git a/builds.yml b/builds.yml index e457efc..baaf70d 100644 --- a/builds.yml +++ b/builds.yml @@ -5,10 +5,8 @@ env: rust_pins: stable: &rust_stable "1.82.0" - nightly: &nightly_pin "2024-11-07" llvm_for_rust_pins: stable: &llvm_stable "19" - nightly: &llvm_nightly "19" nixpkgs: unstable: &nixpkgs_unstable "85f7e662eda4fa3a995556527c87b2524b691933" just: @@ -31,12 +29,5 @@ matrix: - "x86_64-unknown-linux-gnu" - "x86_64-unknown-linux-musl" just: *just_version - - # pinned nightly - <<: *default - key: "nightly" - llvm: *llvm_nightly - rust: - channel: "nightly" - version: *nightly_pin nixpkgs: - *nixpkgs_unstable diff --git a/default.nix b/default.nix index d3696c0..2e451fc 100644 --- a/default.nix +++ b/default.nix @@ -212,14 +212,7 @@ rust-toolchain = with rust-version; (toolchainPkgs.rust-bin.${channel}.${version}.${profile}.override { - extensions = [ - "cargo" - "clippy" - "rust-src" - "rust-std" - "rustfmt" - ]; - targets = targets; + inherit targets extensions; }); # Don't add in a shell here or it may override the shell in the diff --git a/nix/versions.nix b/nix/versions.nix index 92b9791..4df28f7 100644 --- a/nix/versions.nix +++ b/nix/versions.nix @@ -37,13 +37,13 @@ llvm = "19"; profile = "default"; targets = ["x86_64-unknown-linux-gnu" "x86_64-unknown-linux-musl"]; - }; - nightly = { - channel = "nightly"; - version = "2024-11-07"; - llvm = "19"; - profile = "default"; - targets = ["x86_64-unknown-linux-gnu" "x86_64-unknown-linux-musl"]; + extensions = [ + "cargo" + "clippy" + "rust-src" + "rust-std" + "rustfmt" + ]; }; }; } diff --git a/nix/versions.nix.template b/nix/versions.nix.template index 9c2d250..cb54137 100644 --- a/nix/versions.nix.template +++ b/nix/versions.nix.template @@ -37,13 +37,13 @@ llvm = "$RUST_STABLE_PIN_LLVM"; profile = "default"; targets = ["x86_64-unknown-linux-gnu" "x86_64-unknown-linux-musl"]; - }; - nightly = { - channel = "nightly"; - version = "$RUST_NIGHTLY_PIN"; - llvm = "$RUST_NIGHTLY_PIN_LLVM"; - profile = "default"; - targets = ["x86_64-unknown-linux-gnu" "x86_64-unknown-linux-musl"]; + extensions = [ + "cargo" + "clippy" + "rust-src" + "rust-std" + "rustfmt" + ]; }; }; } diff --git a/scripts/bump.sh b/scripts/bump.sh index 3437a94..493b7de 100755 --- a/scripts/bump.sh +++ b/scripts/bump.sh @@ -99,18 +99,13 @@ pushd "${project_dir}" rustup update rustup toolchain install "stable" -rustup toolchain install "nightly" rustup update -declare RUST_STABLE_PIN RUST_NIGHTLY_PIN RUST_STABLE_PIN_LLVM RUST_NIGHTLY_PIN_LLVM +declare RUST_STABLE_PIN RUST_STABLE_PIN_LLVM RUST_STABLE_PIN="$(rustc "+stable" -vV | grep 'release:' | awk '{print $NF}')" -RUST_NIGHTLY_PIN="$(rustc "+nightly" -vV | grep 'commit-date:' | awk '{print $NF}')" RUST_STABLE_PIN_LLVM="$(rustc "+stable" -vV | grep 'LLVM version:' | awk '{print $NF}' | sed 's/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/')" -RUST_NIGHTLY_PIN_LLVM="$(rustc "+nightly" -vV | grep 'LLVM version:' | awk '{print $NF}' | sed 's/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/')" declare -rx RUST_STABLE_PIN -declare -rx RUST_NIGHTLY_PIN declare -rx RUST_STABLE_PIN_LLVM -declare -rx RUST_NIGHTLY_PIN_LLVM declare JUST_STABLE_PIN JUST_STABLE_PIN="$(just --version | grep '^just ' | awk '{print $NF}')"