From 6768a13d9544b9960231a33bfd422d4dc2398b79 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Fri, 21 Feb 2025 00:21:19 +0800 Subject: [PATCH] build: Bump MSRV to 1.82.0 We are having complains from Rust 1.86.0-beta.1 (f0cb41030 2025-02-17)' clippy, which suggests us to replace `repeat().take()` with `repeat_n()`. While `repeat_n()` is stablized in Rust 1.82.0. Update image to 20250307-2 because MSRV in Dockerfile is updated. Signed-off-by: Rob Bradford Signed-off-by: Ruoqing He --- .github/workflows/build.yaml | 2 +- .github/workflows/docker-image.yaml | 2 +- .github/workflows/preview-riscv64.yaml | 2 +- .github/workflows/release.yaml | 2 +- Cargo.toml | 2 +- resources/Dockerfile | 2 +- scripts/dev_cli.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9b3bcf783..6a73dc77e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: - stable - beta - nightly - - "1.77.0" + - "1.82.0" target: - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index ec8ef6dd4..bec35c941 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -41,7 +41,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # generate Docker tags based on the following events/attributes tags: | - type=raw,value=20250228-0 + type=raw,value=20250307-2 type=sha - name: Build and push diff --git a/.github/workflows/preview-riscv64.yaml b/.github/workflows/preview-riscv64.yaml index 781e14f8d..7f61d26ac 100644 --- a/.github/workflows/preview-riscv64.yaml +++ b/.github/workflows/preview-riscv64.yaml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - name: Install Rust toolchain - run: /opt/scripts/exec-in-qemu.sh rustup default 1.77.0 + run: /opt/scripts/exec-in-qemu.sh rustup default 1.82.0 - name: Build ${{ matrix.module }} Module (kvm) run: /opt/scripts/exec-in-qemu.sh cargo rustc --locked -p ${{ matrix.module }} --no-default-features --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bc197f9ab..64247287a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,7 +45,7 @@ jobs: target: ${{ matrix.platform.target }} args: ${{ matrix.platform.args }} strip: true - toolchain: "1.77.0" + toolchain: "1.82.0" - name: Copy Release Binaries if: github.event_name == 'create' && github.event.ref_type == 'tag' shell: bash diff --git a/Cargo.toml b/Cargo.toml index f30fff5ef..5041c8a22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ version = "44.0.0" # a.) A dependency requires it, # b.) If we want to use a new feature and that MSRV is at least 6 months old, # c.) There is a security issue that is addressed by the toolchain update. -rust-version = "1.77.0" +rust-version = "1.82.0" [profile.release] codegen-units = 1 diff --git a/resources/Dockerfile b/resources/Dockerfile index b9906602c..07aca7d55 100644 --- a/resources/Dockerfile +++ b/resources/Dockerfile @@ -8,7 +8,7 @@ FROM ubuntu:24.04 AS dev ARG TARGETARCH -ARG RUST_TOOLCHAIN="1.77.0" +ARG RUST_TOOLCHAIN="1.82.0" ARG CLH_SRC_DIR="/cloud-hypervisor" ARG CLH_BUILD_DIR="$CLH_SRC_DIR/build" ARG CARGO_REGISTRY_DIR="$CLH_BUILD_DIR/cargo_registry" diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 373b4a8e1..69b2ef65e 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -9,7 +9,7 @@ CLI_NAME="Cloud Hypervisor" CTR_IMAGE_TAG="ghcr.io/cloud-hypervisor/cloud-hypervisor" # Needs to match explicit version in docker-image.yaml workflow -CTR_IMAGE_VERSION="20250228-0" +CTR_IMAGE_VERSION="20250307-2" : "${CTR_IMAGE:=${CTR_IMAGE_TAG}:${CTR_IMAGE_VERSION}}" DOCKER_RUNTIME="docker"