diff --git a/.github/builder/common.sh b/.github/builder/common.sh index 776c4ad0..bd5d2fdd 100755 --- a/.github/builder/common.sh +++ b/.github/builder/common.sh @@ -5,6 +5,11 @@ set -e +if [ -z "${RUST_NIGHTLY_VERSION}" ]; then + echo "RUST_NIGHTLY_VERSION not set. It should be defined by ci.yml workflow." + exit 1 +fi + download_and_verify_llvm() { LLVM_PGP_KEY_URL="https://releases.llvm.org/5.0.2/tstellar-gpg-key.asc" LLD_URL="https://releases.llvm.org/5.0.2/lld-5.0.2.src.tar.xz" @@ -107,8 +112,8 @@ download_and_verify_make() { download_and_verify_rust() { RUST_GPG_KEY_URL="https://static.rust-lang.org/rust-key.gpg.ascii" - RUST_URL="https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.xz" - RUST_SIG_URL="https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.xz.asc" + RUST_URL="https://static.rust-lang.org/dist/${RUST_NIGHTLY_VERSION}/rust-nightly-x86_64-unknown-linux-gnu.tar.xz" + RUST_SIG_URL="https://static.rust-lang.org/dist/${RUST_NIGHTLY_VERSION}/rust-nightly-x86_64-unknown-linux-gnu.tar.xz.asc" if [ -z "${BUILDER_DIR}" ]; then echo "BUILDER_DIR not set. Exiting..." diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8939ca8..f00559e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ env: PUBLIC_SIMICS_ISPM_VERSION: "1.8.3" MINGW_URL: "https://github.com/brechtsanders/winlibs_mingw/releases/download/13.2.0-16.0.6-11.0.0-ucrt-r1/winlibs-x86_64-posix-seh-gcc-13.2.0-llvm-16.0.6-mingw-w64ucrt-11.0.0-r1.7z" MINGW_VERSION: "13.2.0-16.0.6-11.0.0-ucrt-r1" + RUST_NIGHTLY_VERSION: "2025-02-28" permissions: contents: read @@ -472,7 +473,7 @@ jobs: - uses: dtolnay/rust-toolchain@83bdede770b06329615974cf8c786f845d824dfb # nightly with: - toolchain: nightly + toolchain: nightly-${{ env.RUST_NIGHTLY_VERSION }} components: rustfmt,clippy,miri - name: Cache SIMICS Dependencies @@ -578,7 +579,7 @@ jobs: echo "Downloading Rustup" Invoke-WebRequest -URI https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe echo "Installing Rust" - C:\rustup-init.exe --default-toolchain nightly --default-host x86_64-pc-windows-gnu -y + C:\rustup-init.exe --default-toolchain nightly-${{ env.RUST_NIGHTLY_VERSION }} --default-host x86_64-pc-windows-gnu -y - name: Cache SIMICS id: cache-simics-packages-windows