From 577b5f387f03fbcfc44103f5ecd6470fc9d6395a Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:14:44 +0100 Subject: CI: use free runners for x86_64-gnu-llvm jobs --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index dea38b6fd2a..22ab93c3764 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -39,9 +39,6 @@ if [[ -z "${PR_CI_JOB}" ]]; then library/std library/alloc library/core fi -# 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 - # 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 # both 32-bit and 64-bit outputs updated by the PR author, before -- cgit 1.4.1-3-g733a5 From 4f0e7816cd1a1132bd2de72d03a800eeb27bd15d Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:29:59 +0100 Subject: split better --- .../host-x86_64/x86_64-gnu-llvm-18/Dockerfile | 4 +- .../host-x86_64/x86_64-gnu-llvm-19/Dockerfile | 4 +- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 36 +++++++++++++ src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 60 ++++++++++++++++++++++ src/ci/github-actions/jobs.yml | 10 ++-- 5 files changed, 105 insertions(+), 9 deletions(-) create mode 100755 src/ci/docker/scripts/x86_64-gnu-llvm1.sh create mode 100755 src/ci/docker/scripts/x86_64-gnu-llvm2.sh (limited to 'src/ci/docker/scripts') 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 7df32f18fdb..3fe79c819fe 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 @@ -59,6 +59,6 @@ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts -COPY scripts/x86_64-gnu-llvm.sh /tmp/script.sh ARG SCRIPT_ARG -ENV SCRIPT="/tmp/script.sh && ${SCRIPT_ARG}" +COPY scripts/{SCRIPT_ARG} /tmp/script.sh +ENV SCRIPT="/tmp/script.sh" 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 e6e6f3e779b..d52adc89cab 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 @@ -59,6 +59,6 @@ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts -COPY scripts/x86_64-gnu-llvm.sh /tmp/script.sh ARG SCRIPT_ARG -ENV SCRIPT="/tmp/script.sh && ${SCRIPT_ARG}" +COPY scripts/{SCRIPT_ARG} /tmp/script.sh +ENV SCRIPT="/tmp/script.sh" diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh new file mode 100755 index 00000000000..7336b4ce37b --- /dev/null +++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -ex + +if [ "$READ_ONLY_SRC" = "0" ]; then + # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that + # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on + # compiler and/or library. Here we are adding a dummy commit on compiler and running + # that test to make sure we never download CI rustc with a change on the compiler tree. + echo "" >> ../compiler/rustc/src/main.rs + git config --global user.email "dummy@dummy.com" + git config --global user.name "dummy" + git add ../compiler/rustc/src/main.rs + git commit -m "test commit for rust.download-rustc=if-unchanged logic" + DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ + -- core::builder::tests::ci_rustc_if_unchanged_logic + # Revert the dummy commit + git reset --hard HEAD~1 +fi + +# Only run the stage 1 tests on merges, not on PR CI jobs. +if [[ -z "${PR_CI_JOB}" ]]; then + ../x.py --stage 1 test + --skip tests + --skip coverage-map + --skip coverage-run + --skip library + --skip tidyselftest +fi + +../x.py --stage 2 test + --skip tests + --skip coverage-map + --skip coverage-run + --skip library + --skip tidyselftest diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh new file mode 100755 index 00000000000..a0d31d8d7ae --- /dev/null +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +set -ex + +if [ "$READ_ONLY_SRC" = "0" ]; then + # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that + # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on + # compiler and/or library. Here we are adding a dummy commit on compiler and running + # that test to make sure we never download CI rustc with a change on the compiler tree. + echo "" >> ../compiler/rustc/src/main.rs + git config --global user.email "dummy@dummy.com" + git config --global user.name "dummy" + git add ../compiler/rustc/src/main.rs + git commit -m "test commit for rust.download-rustc=if-unchanged logic" + DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ + -- core::builder::tests::ci_rustc_if_unchanged_logic + # Revert the dummy commit + git reset --hard HEAD~1 +fi + +# Only run the stage 1 tests on merges, not on PR CI jobs. +if [[ -z "${PR_CI_JOB}" ]]; then + ../x.py --stage 1 test + --skip compiler + --skip src + + # 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 + # both 32-bit and 64-bit outputs updated by the PR author, before + # the PR is approved and tested for merging. + # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, + # despite having different output on 32-bit vs 64-bit targets. + ../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu + + # Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0 + # compiler, and is sensitive to the addition of new flags. + ../x.py --stage 1 test tests/ui-fulldeps + + # Rebuild the stdlib with the size optimizations enabled and run tests again. + RUSTFLAGS_NOT_BOOTSTRAP="--cfg feature=\"optimize_for_size\"" ../x.py --stage 1 test \ + library/std library/alloc library/core +fi + +../x.py --stage 2 test + --skip compiler + --skip src + +# 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 +# both 32-bit and 64-bit outputs updated by the PR author, before +# the PR is approved and tested for merging. +# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, +# despite having different output on 32-bit vs 64-bit targets. +../x --stage 2 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu + +# Run the UI test suite again, but in `--pass=check` mode +# +# This is intended to make sure that both `--pass=check` continues to +# work. +../x.ps1 --stage 2 test tests/ui --pass=check --host='' --target=i686-unknown-linux-gnu diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 4ce2c6872e7..aafc13d2dff 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -117,7 +117,7 @@ pr: ENABLE_GCC_CODEGEN: "1" # We are adding (temporarily) a dummy commit on the compiler READ_ONLY_SRC: "0" - DOCKER_SCRIPT: python3 ../x.py --stage 2 test --skip src/tools/tidy + DOCKER_SCRIPT: x86_64-gnu-llvm.sh <<: *job-linux-16c - image: x86_64-gnu-tools <<: *job-linux-16c @@ -319,7 +319,7 @@ auto: env: RUST_BACKTRACE: 1 IMAGE: x86_64-gnu-llvm-19 - <<: *stage_2_test_set1 + DOCKER_SCRIPT: x86_64-gnu-llvm1.sh <<: *job-linux-4c # Skip tests that run in x86_64-gnu-llvm-19-2 @@ -327,7 +327,7 @@ auto: env: RUST_BACKTRACE: 1 IMAGE: x86_64-gnu-llvm-19 - <<: *stage_2_test_set2 + DOCKER_SCRIPT: x86_64-gnu-llvm2.sh <<: *job-linux-4c # The x86_64-gnu-llvm-18 job is split into multiple jobs to run tests in parallel. @@ -337,7 +337,7 @@ auto: RUST_BACKTRACE: 1 READ_ONLY_SRC: "0" IMAGE: x86_64-gnu-llvm-18 - <<: *stage_2_test_set1 + DOCKER_SCRIPT: x86_64-gnu-llvm1.sh <<: *job-linux-4c # Skip tests that run in x86_64-gnu-llvm-18-2 @@ -346,7 +346,7 @@ auto: RUST_BACKTRACE: 1 READ_ONLY_SRC: "0" IMAGE: x86_64-gnu-llvm-18 - <<: *stage_2_test_set2 + DOCKER_SCRIPT: x86_64-gnu-llvm2.sh <<: *job-linux-4c - image: x86_64-gnu-nopt -- cgit 1.4.1-3-g733a5 From abd8352de7c36fec2ee11ff856bae96ab408b06c Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:29:18 +0100 Subject: restore command --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 22ab93c3764..dea38b6fd2a 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -39,6 +39,9 @@ if [[ -z "${PR_CI_JOB}" ]]; then library/std library/alloc library/core fi +# 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 + # 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 # both 32-bit and 64-bit outputs updated by the PR author, before -- cgit 1.4.1-3-g733a5 From 1f38572e57518fad3892dad7c0d0433ae71d6675 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:43:12 +0100 Subject: fix --- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 20 ++++++++++---------- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh index 7336b4ce37b..45759ce6a66 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh @@ -20,17 +20,17 @@ fi # Only run the stage 1 tests on merges, not on PR CI jobs. if [[ -z "${PR_CI_JOB}" ]]; then - ../x.py --stage 1 test - --skip tests - --skip coverage-map - --skip coverage-run - --skip library + ../x.py --stage 1 test \ + --skip tests \ + --skip coverage-map \ + --skip coverage-run \ + --skip library \ --skip tidyselftest fi -../x.py --stage 2 test - --skip tests - --skip coverage-map - --skip coverage-run - --skip library +../x.py --stage 2 test \ + --skip tests \ + --skip coverage-map \ + --skip coverage-run \ + --skip library \ --skip tidyselftest diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh index a0d31d8d7ae..3902b8559f6 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -20,8 +20,8 @@ fi # Only run the stage 1 tests on merges, not on PR CI jobs. if [[ -z "${PR_CI_JOB}" ]]; then - ../x.py --stage 1 test - --skip compiler + ../x.py --stage 1 test \ + --skip compiler \ --skip src # Run the `mir-opt` tests again but this time for a 32-bit target. @@ -41,8 +41,8 @@ if [[ -z "${PR_CI_JOB}" ]]; then library/std library/alloc library/core fi -../x.py --stage 2 test - --skip compiler +../x.py --stage 2 test \ + --skip compiler \ --skip src # Run the `mir-opt` tests again but this time for a 32-bit target. -- cgit 1.4.1-3-g733a5 From 7ce2944ef976289aa7126f4a46db500e4b9b47c6 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:59:30 +0100 Subject: test stage 1 in separate job --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 21 ----------------- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 10 -------- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 23 ------------------ src/ci/docker/scripts/x86_64-gnu-llvm3.sh | 39 +++++++++++++++++++++++++++++++ src/ci/github-actions/jobs.yml | 25 ++++++++++++++++---- 5 files changed, 60 insertions(+), 58 deletions(-) create mode 100755 src/ci/docker/scripts/x86_64-gnu-llvm3.sh (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index dea38b6fd2a..9e9c2095304 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -18,27 +18,6 @@ if [ "$READ_ONLY_SRC" = "0" ]; then git reset --hard HEAD~1 fi -# Only run the stage 1 tests on merges, not on PR CI jobs. -if [[ -z "${PR_CI_JOB}" ]]; then - ../x.py --stage 1 test --skip src/tools/tidy - - # 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 - # both 32-bit and 64-bit outputs updated by the PR author, before - # the PR is approved and tested for merging. - # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, - # despite having different output on 32-bit vs 64-bit targets. - ../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu - - # Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0 - # compiler, and is sensitive to the addition of new flags. - ../x.py --stage 1 test tests/ui-fulldeps - - # Rebuild the stdlib with the size optimizations enabled and run tests again. - RUSTFLAGS_NOT_BOOTSTRAP="--cfg feature=\"optimize_for_size\"" ../x.py --stage 1 test \ - library/std library/alloc library/core -fi - # 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-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh index 45759ce6a66..aab8fcc1f5e 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh @@ -18,16 +18,6 @@ if [ "$READ_ONLY_SRC" = "0" ]; then git reset --hard HEAD~1 fi -# Only run the stage 1 tests on merges, not on PR CI jobs. -if [[ -z "${PR_CI_JOB}" ]]; then - ../x.py --stage 1 test \ - --skip tests \ - --skip coverage-map \ - --skip coverage-run \ - --skip library \ - --skip tidyselftest -fi - ../x.py --stage 2 test \ --skip tests \ --skip coverage-map \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh index 3902b8559f6..678b2096777 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -18,29 +18,6 @@ if [ "$READ_ONLY_SRC" = "0" ]; then git reset --hard HEAD~1 fi -# Only run the stage 1 tests on merges, not on PR CI jobs. -if [[ -z "${PR_CI_JOB}" ]]; then - ../x.py --stage 1 test \ - --skip compiler \ - --skip src - - # 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 - # both 32-bit and 64-bit outputs updated by the PR author, before - # the PR is approved and tested for merging. - # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, - # despite having different output on 32-bit vs 64-bit targets. - ../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu - - # Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0 - # compiler, and is sensitive to the addition of new flags. - ../x.py --stage 1 test tests/ui-fulldeps - - # Rebuild the stdlib with the size optimizations enabled and run tests again. - RUSTFLAGS_NOT_BOOTSTRAP="--cfg feature=\"optimize_for_size\"" ../x.py --stage 1 test \ - library/std library/alloc library/core -fi - ../x.py --stage 2 test \ --skip compiler \ --skip src diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh new file mode 100755 index 00000000000..5a9ad7b7412 --- /dev/null +++ b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -ex + +if [ "$READ_ONLY_SRC" = "0" ]; then + # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that + # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on + # compiler and/or library. Here we are adding a dummy commit on compiler and running + # that test to make sure we never download CI rustc with a change on the compiler tree. + echo "" >> ../compiler/rustc/src/main.rs + git config --global user.email "dummy@dummy.com" + git config --global user.name "dummy" + git add ../compiler/rustc/src/main.rs + git commit -m "test commit for rust.download-rustc=if-unchanged logic" + DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ + -- core::builder::tests::ci_rustc_if_unchanged_logic + # Revert the dummy commit + git reset --hard HEAD~1 +fi + +##### Test stage 1 ##### + +../x.py --stage 1 test --skip src/tools/tidy + +# 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 +# both 32-bit and 64-bit outputs updated by the PR author, before +# the PR is approved and tested for merging. +# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`, +# despite having different output on 32-bit vs 64-bit targets. +../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu + +# Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0 +# compiler, and is sensitive to the addition of new flags. +../x.py --stage 1 test tests/ui-fulldeps + +# Rebuild the stdlib with the size optimizations enabled and run tests again. +RUSTFLAGS_NOT_BOOTSTRAP="--cfg feature=\"optimize_for_size\"" ../x.py --stage 1 test \ + library/std library/alloc library/core diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index aafc13d2dff..5732a428f67 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -314,7 +314,7 @@ auto: <<: *job-linux-8c # The x86_64-gnu-llvm-19 job is split into multiple jobs to run tests in parallel. - # x86_64-gnu-llvm-19-1 skips tests that run in x86_64-gnu-llvm-19-2. + # x86_64-gnu-llvm-19-1 skips tests that run in x86_64-gnu-llvm-19-{2,3}. - image: x86_64-gnu-llvm-19-1 env: RUST_BACKTRACE: 1 @@ -322,7 +322,7 @@ auto: DOCKER_SCRIPT: x86_64-gnu-llvm1.sh <<: *job-linux-4c - # Skip tests that run in x86_64-gnu-llvm-19-2 + # Skip tests that run in x86_64-gnu-llvm-19-{1,3} - image: x86_64-gnu-llvm-19-2 env: RUST_BACKTRACE: 1 @@ -330,8 +330,16 @@ auto: DOCKER_SCRIPT: x86_64-gnu-llvm2.sh <<: *job-linux-4c + # Skip tests that run in x86_64-gnu-llvm-19-{1,2} + - image: x86_64-gnu-llvm-19-3 + env: + RUST_BACKTRACE: 1 + IMAGE: x86_64-gnu-llvm-19 + DOCKER_SCRIPT: x86_64-gnu-llvm3.sh + <<: *job-linux-4c + # The x86_64-gnu-llvm-18 job is split into multiple jobs to run tests in parallel. - # x86_64-gnu-llvm-18-1 skips tests that run in x86_64-gnu-llvm-18-2. + # x86_64-gnu-llvm-18-1 skips tests that run in x86_64-gnu-llvm-18-{2,3}. - image: x86_64-gnu-llvm-18-1 env: RUST_BACKTRACE: 1 @@ -340,7 +348,7 @@ auto: DOCKER_SCRIPT: x86_64-gnu-llvm1.sh <<: *job-linux-4c - # Skip tests that run in x86_64-gnu-llvm-18-2 + # Skip tests that run in x86_64-gnu-llvm-18-{1,3} - image: x86_64-gnu-llvm-18-2 env: RUST_BACKTRACE: 1 @@ -349,6 +357,15 @@ auto: DOCKER_SCRIPT: x86_64-gnu-llvm2.sh <<: *job-linux-4c + # Skip tests that run in x86_64-gnu-llvm-18-{1,2} + - image: x86_64-gnu-llvm-18-3 + env: + RUST_BACKTRACE: 1 + READ_ONLY_SRC: "0" + IMAGE: x86_64-gnu-llvm-18 + DOCKER_SCRIPT: x86_64-gnu-llvm3.sh + <<: *job-linux-4c + - image: x86_64-gnu-nopt <<: *job-linux-4c -- cgit 1.4.1-3-g733a5 From 2bf1cec41b457bae459d7f18168e147fb467d898 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:07:47 +0100 Subject: refactor --- src/ci/docker/scripts/add_dummy_commit.sh | 19 +++++++++++++++++++ src/ci/docker/scripts/x86_64-gnu-llvm.sh | 16 +--------------- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 16 +--------------- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 18 +++--------------- src/ci/docker/scripts/x86_64-gnu-llvm3.sh | 16 +--------------- 5 files changed, 25 insertions(+), 60 deletions(-) create mode 100755 src/ci/docker/scripts/add_dummy_commit.sh (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/add_dummy_commit.sh b/src/ci/docker/scripts/add_dummy_commit.sh new file mode 100755 index 00000000000..029e4ae141f --- /dev/null +++ b/src/ci/docker/scripts/add_dummy_commit.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -ex + +if [ "$READ_ONLY_SRC" = "0" ]; then + # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that + # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on + # compiler and/or library. Here we are adding a dummy commit on compiler and running + # that test to make sure we never download CI rustc with a change on the compiler tree. + echo "" >> ../compiler/rustc/src/main.rs + git config --global user.email "dummy@dummy.com" + git config --global user.name "dummy" + git add ../compiler/rustc/src/main.rs + git commit -m "test commit for rust.download-rustc=if-unchanged logic" + DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ + -- core::builder::tests::ci_rustc_if_unchanged_logic + # Revert the dummy commit + git reset --hard HEAD~1 +fi diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 9e9c2095304..fcf3b77d321 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -2,21 +2,7 @@ set -ex -if [ "$READ_ONLY_SRC" = "0" ]; then - # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that - # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on - # compiler and/or library. Here we are adding a dummy commit on compiler and running - # that test to make sure we never download CI rustc with a change on the compiler tree. - echo "" >> ../compiler/rustc/src/main.rs - git config --global user.email "dummy@dummy.com" - git config --global user.name "dummy" - git add ../compiler/rustc/src/main.rs - git commit -m "test commit for rust.download-rustc=if-unchanged logic" - DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ - -- core::builder::tests::ci_rustc_if_unchanged_logic - # Revert the dummy commit - git reset --hard HEAD~1 -fi +./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-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh index aab8fcc1f5e..7e451a8578d 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh @@ -2,21 +2,7 @@ set -ex -if [ "$READ_ONLY_SRC" = "0" ]; then - # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that - # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on - # compiler and/or library. Here we are adding a dummy commit on compiler and running - # that test to make sure we never download CI rustc with a change on the compiler tree. - echo "" >> ../compiler/rustc/src/main.rs - git config --global user.email "dummy@dummy.com" - git config --global user.name "dummy" - git add ../compiler/rustc/src/main.rs - git commit -m "test commit for rust.download-rustc=if-unchanged logic" - DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ - -- core::builder::tests::ci_rustc_if_unchanged_logic - # Revert the dummy commit - git reset --hard HEAD~1 -fi +./add_dummy_commit.sh ../x.py --stage 2 test \ --skip tests \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh index 678b2096777..4fc1e99b5f7 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -2,21 +2,9 @@ set -ex -if [ "$READ_ONLY_SRC" = "0" ]; then - # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that - # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on - # compiler and/or library. Here we are adding a dummy commit on compiler and running - # that test to make sure we never download CI rustc with a change on the compiler tree. - echo "" >> ../compiler/rustc/src/main.rs - git config --global user.email "dummy@dummy.com" - git config --global user.name "dummy" - git add ../compiler/rustc/src/main.rs - git commit -m "test commit for rust.download-rustc=if-unchanged logic" - DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ - -- core::builder::tests::ci_rustc_if_unchanged_logic - # Revert the dummy commit - git reset --hard HEAD~1 -fi +./add_dummy_commit.sh + +##### Test stage 2 ##### ../x.py --stage 2 test \ --skip compiler \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh index 5a9ad7b7412..cf4b5a198dd 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh @@ -2,21 +2,7 @@ set -ex -if [ "$READ_ONLY_SRC" = "0" ]; then - # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that - # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on - # compiler and/or library. Here we are adding a dummy commit on compiler and running - # that test to make sure we never download CI rustc with a change on the compiler tree. - echo "" >> ../compiler/rustc/src/main.rs - git config --global user.email "dummy@dummy.com" - git config --global user.name "dummy" - git add ../compiler/rustc/src/main.rs - git commit -m "test commit for rust.download-rustc=if-unchanged logic" - DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \ - -- core::builder::tests::ci_rustc_if_unchanged_logic - # Revert the dummy commit - git reset --hard HEAD~1 -fi +./add_dummy_commit.sh ##### Test stage 1 ##### -- cgit 1.4.1-3-g733a5 From 4fa9078b172a7013291b8a5cd3e61881873cae66 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:19:04 +0100 Subject: fix path --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm3.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index fcf3b77d321..0c7cbcb6e6f 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -2,7 +2,7 @@ set -ex -./add_dummy_commit.sh +${PWD}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-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh index 7e451a8578d..a6df891205f 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh @@ -2,7 +2,7 @@ set -ex -./add_dummy_commit.sh +${PWD}add_dummy_commit.sh ../x.py --stage 2 test \ --skip tests \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh index 4fc1e99b5f7..6f16808e8c5 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -2,7 +2,7 @@ set -ex -./add_dummy_commit.sh +${PWD}add_dummy_commit.sh ##### Test stage 2 ##### diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh index cf4b5a198dd..6f237b09c3f 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh @@ -2,7 +2,7 @@ set -ex -./add_dummy_commit.sh +${PWD}add_dummy_commit.sh ##### Test stage 1 ##### -- cgit 1.4.1-3-g733a5 From ac078a4cccf1ef4294960eecf6bc8b14149d2aa9 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:34:45 +0100 Subject: fix path --- src/ci/docker/scripts/x86_64-gnu-llvm.sh | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 2 +- src/ci/docker/scripts/x86_64-gnu-llvm3.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 0c7cbcb6e6f..e7dcc1ddff4 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -2,7 +2,7 @@ set -ex -${PWD}add_dummy_commit.sh +/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-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh index a6df891205f..56ef39aae15 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh @@ -2,7 +2,7 @@ set -ex -${PWD}add_dummy_commit.sh +/tmp/add_dummy_commit.sh ../x.py --stage 2 test \ --skip tests \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh index 6f16808e8c5..c9f6b98f01f 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh @@ -2,7 +2,7 @@ set -ex -${PWD}add_dummy_commit.sh +/tmp/add_dummy_commit.sh ##### Test stage 2 ##### diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh index 6f237b09c3f..d1bf2dab1e2 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh @@ -2,7 +2,7 @@ set -ex -${PWD}add_dummy_commit.sh +/tmp/add_dummy_commit.sh ##### Test stage 1 ##### -- cgit 1.4.1-3-g733a5