From 5980dfe063cea6135400046ce252a276ba8362bc Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:15:33 +0100 Subject: [PATCH] ci: remove duplicate task definition --- .../host-x86_64/i686-gnu-nopt/Dockerfile | 4 ++- src/ci/docker/host-x86_64/i686-gnu/Dockerfile | 4 ++- .../host-x86_64/x86_64-gnu-llvm-18/Dockerfile | 15 +++++---- .../host-x86_64/x86_64-gnu-llvm-19/Dockerfile | 15 +++++---- src/ci/docker/scripts/stage_2_test_set1.sh | 9 +++++ ...6_64-gnu-llvm1.sh => stage_2_test_set2.sh} | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 2 -- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 6 +--- src/ci/github-actions/jobs.yml | 33 ++++--------------- 9 files changed, 41 insertions(+), 49 deletions(-) create mode 100755 src/ci/docker/scripts/stage_2_test_set1.sh rename src/ci/docker/scripts/{x86_64-gnu-llvm1.sh => stage_2_test_set2.sh} (67%) diff --git a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile index e273672060732..241199d3bafb9 100644 --- a/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile @@ -28,4 +28,6 @@ RUN echo "optimize = false" >> /config/nopt-std-config.toml ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests ARG SCRIPT_ARG -ENV SCRIPT=${SCRIPT_ARG} +COPY scripts/stage_2_test_set1.sh /scripts/ +COPY scripts/stage_2_test_set2.sh /scripts/ +ENV SCRIPT ${SCRIPT_ARG} diff --git a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile index dec25461bb4e8..a715f7182d2a6 100644 --- a/src/ci/docker/host-x86_64/i686-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile @@ -25,4 +25,6 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu ARG SCRIPT_ARG -ENV SCRIPT=${SCRIPT_ARG} +COPY scripts/stage_2_test_set1.sh /scripts/ +COPY scripts/stage_2_test_set2.sh /scripts/ +ENV SCRIPT /scripts/${SCRIPT_ARG} diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile index 42df58517caf4..e157debfd09a8 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile @@ -60,9 +60,12 @@ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts ARG SCRIPT_ARG -COPY scripts/add_dummy_commit.sh /tmp/add_dummy_commit.sh -COPY scripts/x86_64-gnu-llvm.sh /tmp/x86_64-gnu-llvm.sh -COPY scripts/x86_64-gnu-llvm1.sh /tmp/x86_64-gnu-llvm1.sh -COPY scripts/x86_64-gnu-llvm2.sh /tmp/x86_64-gnu-llvm2.sh -COPY scripts/x86_64-gnu-llvm3.sh /tmp/x86_64-gnu-llvm3.sh -ENV SCRIPT /tmp/${SCRIPT_ARG} + +COPY scripts/add_dummy_commit.sh /tmp/ +COPY scripts/x86_64-gnu-llvm.sh /tmp/ +COPY scripts/x86_64-gnu-llvm2.sh /tmp/ +COPY scripts/x86_64-gnu-llvm3.sh /tmp/ +COPY scripts/stage_2_test_set1.sh /tmp/ +COPY scripts/stage_2_test_set2.sh /tmp/ + +ENV SCRIPT "/tmp/add_dummy_commit.sh && /tmp/${SCRIPT_ARG}" diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile index f2aadbe87cfec..e7016e7d3c0d6 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile @@ -60,9 +60,12 @@ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts ARG SCRIPT_ARG -COPY scripts/add_dummy_commit.sh /tmp/add_dummy_commit.sh -COPY scripts/x86_64-gnu-llvm.sh /tmp/x86_64-gnu-llvm.sh -COPY scripts/x86_64-gnu-llvm1.sh /tmp/x86_64-gnu-llvm1.sh -COPY scripts/x86_64-gnu-llvm2.sh /tmp/x86_64-gnu-llvm2.sh -COPY scripts/x86_64-gnu-llvm3.sh /tmp/x86_64-gnu-llvm3.sh -ENV SCRIPT /tmp/${SCRIPT_ARG} + +COPY scripts/add_dummy_commit.sh /tmp/ +COPY scripts/x86_64-gnu-llvm.sh /tmp/ +COPY scripts/x86_64-gnu-llvm2.sh /tmp/ +COPY scripts/x86_64-gnu-llvm3.sh /tmp/ +COPY scripts/stage_2_test_set1.sh /tmp/ +COPY scripts/stage_2_test_set2.sh /tmp/ + +ENV SCRIPT "/tmp/add_dummy_commit.sh && /tmp/${SCRIPT_ARG}" diff --git a/src/ci/docker/scripts/stage_2_test_set1.sh b/src/ci/docker/scripts/stage_2_test_set1.sh new file mode 100755 index 0000000000000..3baff4b52215a --- /dev/null +++ b/src/ci/docker/scripts/stage_2_test_set1.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -ex + +# Run a subset of tests. Used to run tests in parallel in multiple jobs. + +../x.py --stage 2 test \ + --skip compiler \ + --skip src diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh b/src/ci/docker/scripts/stage_2_test_set2.sh similarity index 67% rename from src/ci/docker/scripts/x86_64-gnu-llvm1.sh rename to src/ci/docker/scripts/stage_2_test_set2.sh index 56ef39aae1556..872d758dce381 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ b/src/ci/docker/scripts/stage_2_test_set2.sh @@ -2,7 +2,7 @@ set -ex -/tmp/add_dummy_commit.sh +# Run a subset of tests. Used to run tests in parallel in multiple jobs. ../x.py --stage 2 test \ --skip tests \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index e7dcc1ddff449..e0435a3ff5c17 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -2,8 +2,6 @@ set -ex -/tmp/add_dummy_commit.sh - # NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux. ../x.py --stage 2 test --skip src/tools/tidy diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh index c9f6b98f01f4f..fe5382aaa48cc 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -2,13 +2,9 @@ set -ex -/tmp/add_dummy_commit.sh - ##### Test stage 2 ##### -../x.py --stage 2 test \ - --skip compiler \ - --skip src +/tmp/stage_2_test_set1.sh # Run the `mir-opt` tests again but this time for a 32-bit target. # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index fe0fdde39d0ff..9819c26cba8b9 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -58,22 +58,6 @@ envs: NO_DEBUG_ASSERTIONS: 1 NO_OVERFLOW_CHECKS: 1 - # Different set of tests to run tests in parallel in multiple jobs. - stage_2_test_set1: &stage_2_test_set1 - DOCKER_SCRIPT: >- - python3 ../x.py --stage 2 test - --skip compiler - --skip src - - stage_2_test_set2: &stage_2_test_set2 - DOCKER_SCRIPT: >- - python3 ../x.py --stage 2 test - --skip tests - --skip coverage-map - --skip coverage-run - --skip library - --skip tidyselftest - production: &production DEPLOY_BUCKET: rust-lang-ci2 @@ -234,14 +218,14 @@ auto: - image: i686-gnu-1 env: IMAGE: i686-gnu - <<: *stage_2_test_set1 + DOCKER_SCRIPT: stage_2_test_set1.sh <<: *job-linux-4c # Skip tests that run in i686-gnu-1 - image: i686-gnu-2 env: IMAGE: i686-gnu - <<: *stage_2_test_set2 + DOCKER_SCRIPT: stage_2_test_set2.sh <<: *job-linux-4c # The i686-gnu-nopt job is split into multiple jobs to run tests in parallel. @@ -249,7 +233,7 @@ auto: - image: i686-gnu-nopt-1 env: IMAGE: i686-gnu-nopt - <<: *stage_2_test_set1 + DOCKER_SCRIPT: /scripts/stage_2_test_set1.sh <<: *job-linux-4c # Skip tests that run in i686-gnu-nopt-1 @@ -258,12 +242,7 @@ auto: IMAGE: i686-gnu-nopt DOCKER_SCRIPT: >- python3 ../x.py test --stage 0 --config /config/nopt-std-config.toml library/std && - python3 ../x.py --stage 2 test - --skip tests - --skip coverage-map - --skip coverage-run - --skip library - --skip tidyselftest + /scripts/stage_2_test_set2.sh <<: *job-linux-4c - image: mingw-check @@ -319,7 +298,7 @@ auto: env: RUST_BACKTRACE: 1 IMAGE: x86_64-gnu-llvm-19 - DOCKER_SCRIPT: x86_64-gnu-llvm1.sh + DOCKER_SCRIPT: stage_2_test_set1.sh <<: *job-linux-4c # Skip tests that run in x86_64-gnu-llvm-19-{1,3} @@ -345,7 +324,7 @@ auto: RUST_BACKTRACE: 1 READ_ONLY_SRC: "0" IMAGE: x86_64-gnu-llvm-18 - DOCKER_SCRIPT: x86_64-gnu-llvm1.sh + DOCKER_SCRIPT: stage_2_test_set1.sh <<: *job-linux-4c # Skip tests that run in x86_64-gnu-llvm-18-{1,3}