From 1ddd380f8ac7ea282856e4a66c224745489c0203 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 20 Dec 2023 15:56:20 -0700 Subject: [PATCH] Update Rust version to 1.74.1 We originally pinned to 1.63 because that was the last version before Rust dropped support for older versions of `glibc` [in Rust 1.64][blog]. However, the relevant operating systems we were maintaining support for at that time (CentOS/RHEL 6) have now been end-of-life for three full years, so it seems reasonable to update to a more current version. Since no other changes to the `glibc` support have happened in the interval, we can safely update to the most current version of Rust. As part of this, update the RHEL 7 Dockerfile setup for building on Rust 1.74, including using updated versions of gcc and binutils. [blog]: https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html Co-authored-by: Rob Jackson --- .github/workflows/api-docs.yml | 2 +- .github/workflows/release.yml | 6 +++--- .github/workflows/test.yml | 6 +++--- ci/build-linux.sh | 3 ++- ci/docker/Dockerfile | 15 ++++++--------- rust-toolchain.toml | 2 +- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index d53f17e53..ef983c104 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -17,7 +17,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Build docs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1f003152..10b508359 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Compile and package Volta @@ -63,7 +63,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 target: aarch64-apple-darwin - name: Cargo Cache uses: Swatinem/rust-cache@v2 @@ -84,7 +84,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Add cargo-wix subcommand diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a77f2ef0a..90d5d375f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 components: clippy - name: Cargo Cache uses: Swatinem/rust-cache@v2 @@ -50,7 +50,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Run tests @@ -77,7 +77,7 @@ jobs: - name: Set up cargo uses: dtolnay/rust-toolchain@master with: - toolchain: 1.63 + toolchain: 1.74 components: rustfmt - name: Cargo Cache uses: Swatinem/rust-cache@v2 diff --git a/ci/build-linux.sh b/ci/build-linux.sh index d773c1587..2c39aeb28 100755 --- a/ci/build-linux.sh +++ b/ci/build-linux.sh @@ -3,7 +3,8 @@ set -e # Activate the upgraded versions of GCC and binutils -source /opt/rh/devtoolset-2/enable +# See https://linux.web.cern.ch/centos7/docs/softwarecollections/#inst +source /opt/rh/devtoolset-8/enable echo "Building Volta" diff --git a/ci/docker/Dockerfile b/ci/docker/Dockerfile index aa9486ff5..5764763bc 100644 --- a/ci/docker/Dockerfile +++ b/ci/docker/Dockerfile @@ -1,19 +1,16 @@ -FROM cern/slc6-base +FROM cern/cc7-base # This repo file references a URL that is no longer valid. It also isn't used by the build # toolchain, so we can safely remove it entirely RUN rm /etc/yum.repos.d/epel.repo +# https://linux.web.cern.ch/centos7/docs/softwarecollections/#inst # Tools needed for the build and setup process RUN yum -y install wget tar # Fetch the repo information for the devtoolset repo -RUN wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo -# Install more recent GCC and binutils, to allow us to compile -RUN yum -y install devtoolset-2-gcc devtoolset-2-binutils +RUN yum install -y centos-release-scl +# Install more recent GCC and binutils, to allow us to compile +RUN yum install -y devtoolset-8 -# Install Rust toolchain (need to do this manually since current rustup requires a more recent -# glibc version than is available on RHEL/CentOS 6) -RUN curl https://static.rust-lang.org/rustup/archive/1.25.1/x86_64-unknown-linux-gnu/rustup-init -sSf -o ~/rustup-init -RUN chmod +x ~/rustup-init -RUN ~/rustup-init -y --default-toolchain 1.63 +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 214e0f56f..8a06cf8dc 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.63" +channel = "1.74" components = ["clippy", "rustfmt"] profile = "minimal"