From 6e1de0759fc74a1c164b3f1bc1f09a90dcd211b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Tue, 2 Jun 2026 16:36:10 +0200 Subject: [PATCH] add pre-stabilization testing CI job - Moves the existing new solver stdlib testing to that job. Bootstrapping will also be need to be tested in the near future. - Also tests the polonius alpha, by running the UI tests under the polonius compare-mode --- .../x86_64-gnu-pre-stabilization/Dockerfile | 29 +++++++++++++++++++ src/ci/docker/scripts/x86_64-gnu-llvm.sh | 5 ---- .../scripts/x86_64-gnu-pre-stabilization.sh | 23 +++++++++++++++ src/ci/github-actions/jobs.yml | 8 +++++ 4 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 src/ci/docker/host-x86_64/x86_64-gnu-pre-stabilization/Dockerfile create mode 100755 src/ci/docker/scripts/x86_64-gnu-pre-stabilization.sh diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-pre-stabilization/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-pre-stabilization/Dockerfile new file mode 100644 index 0000000000000..8b61470aeb5f1 --- /dev/null +++ b/src/ci/docker/host-x86_64/x86_64-gnu-pre-stabilization/Dockerfile @@ -0,0 +1,29 @@ +FROM ubuntu:22.04 + +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python3 \ + git \ + cmake \ + sudo \ + gdb \ + libssl-dev \ + pkg-config \ + xz-utils \ + mingw-w64 \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu" + +COPY scripts/x86_64-gnu-pre-stabilization.sh /scripts/ +ENV SCRIPT="/scripts/x86_64-gnu-pre-stabilization.sh" diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 79177b96a4afc..21e2146609213 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -15,8 +15,3 @@ set -ex # Run the UI test suite in `--pass=check` mode, to ensure it continues to work. ../x.ps1 --stage 2 test tests/ui --pass=check --host='' --target=i686-unknown-linux-gnu - -# Rebuild the stdlib using the new trait solver, to ensure it doesn't regress -# until stabilization. -RUSTFLAGS_NOT_BOOTSTRAP="-Znext-solver=globally" ../x --stage 1 build library \ - --host='' --target=i686-unknown-linux-gnu diff --git a/src/ci/docker/scripts/x86_64-gnu-pre-stabilization.sh b/src/ci/docker/scripts/x86_64-gnu-pre-stabilization.sh new file mode 100755 index 0000000000000..81c1c4356c342 --- /dev/null +++ b/src/ci/docker/scripts/x86_64-gnu-pre-stabilization.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -ex + +# This script tests features intended to be stabilized in 2026. We want to +# ensure they don't regress until then. + +# 1. For the new trait solver, we want to: +# - ensure it can build the standard library +# +# FIXME: we also need to ensure it actually bootstraps. + +RUSTFLAGS_NOT_BOOTSTRAP="-Znext-solver=globally" ../x build library --stage 1 + +# 2. For the polonius alpha, we run the UI tests under the polonius +# compare-mode. +# +# Note that we keep the same rustflags to avoid needing to rebuild any stage 1 +# artifacts from the previous command. It also tests both features at the same +# time. + +RUSTFLAGS_NOT_BOOTSTRAP="-Znext-solver=globally" ../x test tests/ui \ + --compare-mode polonius --stage 1 diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 2bdf83a9c006b..31e923f639f8a 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -152,6 +152,14 @@ pr: env: CODEGEN_BACKENDS: gcc <<: *job-linux-4c + + # This job tests features we want to stabilize soon, to ensure they don't + # regress. + - name: x86_64-gnu-pre-stabilization + doc_url: https://rustc-dev-guide.rust-lang.org/tests/pre-stabilization-ci-job.html + env: + CODEGEN_BACKENDS: llvm + <<: *job-linux-4c # Jobs that run when you perform a try build (@bors try) # These jobs automatically inherit envs.try, to avoid repeating