Skip to content

Commit

Permalink
Auto merge of #134427 - MarcoIeni:ci-remove-code-duplication, r=<try>
Browse files Browse the repository at this point in the history
ci: remove duplicate task definition

try-job: x86_64-gnu-llvm-19-1
try-job: x86_64-gnu-llvm-19-2
try-job: x86_64-gnu-llvm-19-3
try-job: x86_64-gnu-llvm-18-1
try-job: x86_64-gnu-llvm-18-2
try-job: x86_64-gnu-llvm-18-3
try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: i686-gnu-nopt-1
try-job: i686-gnu-nopt-2
  • Loading branch information
bors committed Dec 17, 2024
2 parents f23a80a + 5980dfe commit 1fc0b2b
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 49 deletions.
4 changes: 3 additions & 1 deletion src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
4 changes: 3 additions & 1 deletion src/ci/docker/host-x86_64/i686-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
15 changes: 9 additions & 6 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
15 changes: 9 additions & 6 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
9 changes: 9 additions & 0 deletions src/ci/docker/scripts/stage_2_test_set1.sh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 0 additions & 2 deletions src/ci/docker/scripts/x86_64-gnu-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions src/ci/docker/scripts/x86_64-gnu-llvm2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 6 additions & 27 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -234,22 +218,22 @@ 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.
# i686-gnu-nopt-1 skips tests that run in i686-gnu-nopt-2
- 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
Expand All @@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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}
Expand Down

0 comments on commit 1fc0b2b

Please sign in to comment.