Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV PARALLEL_FRONTEND_THREADS=4
ENV ITERATION_COUNT=2

ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs \
Comment on lines 32 to 34

@jieyouxu jieyouxu Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: oh, you could probably save some time (e.g. by not having to build rustdocs for this), though this doesn't really matter much compared to impact of RUST_TEST_THREADS I'd expect. So I'd just leave this in.

View changes since the review

--set llvm.libzstd=true
--set llvm.libzstd=true \
--set rust.parallel-frontend-threads=${PARALLEL_FRONTEND_THREADS}

# Build the toolchain with multiple parallel frontend threads and then run tests
# Tests are still compiled serially at the moment (intended to be changed in follow-ups).
ENV SCRIPT python3 ../x.py --stage 2 test --set rust.parallel-frontend-threads=4
# Running compiletest only tests for parallel frontend, then the rest without compiletest-only
# options (i.e. `--parallel-frontend-threads=4 --iteration-count=2`)
COPY ./scripts/optional-x86_64-gnu-parallel-frontend.sh /scripts/
ENV SCRIPT="Must specify DOCKER_SCRIPT for this image"
16 changes: 16 additions & 0 deletions src/ci/docker/scripts/optional-x86_64-gnu-parallel-frontend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -eux -o pipefail

if [ ! -v RUST_TEST_THREADS ]; then
RUST_TEST_THREADS_=$(python3 -c "print(max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS}))")
else
RUST_TEST_THREADS_=${RUST_TEST_THREADS}
fi

RUST_TEST_THREADS=${RUST_TEST_THREADS_} \
python3 ../x.py --stage 2 test \
tests/ui \
-- \
--parallel-frontend-threads="${PARALLEL_FRONTEND_THREADS}" \
--iteration-count="${ITERATION_COUNT}"
2 changes: 2 additions & 0 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ auto:
- name: optional-x86_64-gnu-parallel-frontend
# This test can be flaky, so do not cancel CI if it fails, for now.
continue_on_error: true
env:
DOCKER_SCRIPT: optional-x86_64-gnu-parallel-frontend.sh
<<: *job-linux-4c

# This job ensures commits landing on nightly still pass the full
Expand Down
Loading