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 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: ci: remove duplicate task definition --- src/ci/docker/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 ++++++ src/ci/docker/scripts/stage_2_test_set2.sh | 12 ++++++++ src/ci/docker/scripts/x86_64-gnu-llvm.sh | 2 -- src/ci/docker/scripts/x86_64-gnu-llvm1.sh | 12 -------- src/ci/docker/scripts/x86_64-gnu-llvm2.sh | 6 +--- src/ci/github-actions/jobs.yml | 33 ++++------------------ 10 files changed, 52 insertions(+), 60 deletions(-) create mode 100755 src/ci/docker/scripts/stage_2_test_set1.sh create mode 100755 src/ci/docker/scripts/stage_2_test_set2.sh delete mode 100755 src/ci/docker/scripts/x86_64-gnu-llvm1.sh (limited to 'src/ci/docker/scripts') 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 e2736720607..241199d3baf 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 dec25461bb4..a715f7182d2 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 42df58517ca..e157debfd09 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 f2aadbe87cf..e7016e7d3c0 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 00000000000..3baff4b5221 --- /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/stage_2_test_set2.sh b/src/ci/docker/scripts/stage_2_test_set2.sh new file mode 100755 index 00000000000..872d758dce3 --- /dev/null +++ b/src/ci/docker/scripts/stage_2_test_set2.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -ex + +# Run a subset of tests. Used to run tests in parallel in multiple jobs. + +../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-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index e7dcc1ddff4..e0435a3ff5c 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-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh deleted file mode 100755 index 56ef39aae15..00000000000 --- a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -ex - -/tmp/add_dummy_commit.sh - -../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 c9f6b98f01f..fe5382aaa48 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 fe0fdde39d0..9819c26cba8 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} -- cgit 1.4.1-3-g733a5 From 3afda7e798220ce1f0764a53a3490b6614855c1c Mon Sep 17 00:00:00 2001 From: Kajetan Puchalski Date: Mon, 16 Dec 2024 15:11:37 +0000 Subject: ci: Organise shared helper scripts Move shared helper scripts used by Docker builds under docker/scripts. --- .../host-aarch64/dist-aarch64-linux/Dockerfile | 11 ++-- .../host-aarch64/dist-aarch64-linux/build-clang.sh | 46 ----------------- .../host-aarch64/dist-aarch64-linux/build-gcc.sh | 51 ------------------- .../host-aarch64/dist-aarch64-linux/build-zstd.sh | 29 ----------- .../host-aarch64/dist-aarch64-linux/shared.sh | 16 ------ .../docker/host-x86_64/dist-i686-linux/Dockerfile | 8 +-- .../host-x86_64/dist-powerpc64le-linux/Dockerfile | 2 +- .../host-x86_64/dist-powerpc64le-linux/shared.sh | 16 ------ .../host-x86_64/dist-x86_64-linux/Dockerfile | 9 ++-- .../host-x86_64/dist-x86_64-linux/build-clang.sh | 48 ------------------ .../host-x86_64/dist-x86_64-linux/build-gcc.sh | 56 --------------------- .../host-x86_64/dist-x86_64-linux/build-gccjit.sh | 37 -------------- .../host-x86_64/dist-x86_64-linux/build-zstd.sh | 29 ----------- .../docker/host-x86_64/dist-x86_64-linux/shared.sh | 16 ------ .../host-x86_64/x86_64-gnu-llvm-18/Dockerfile | 4 +- .../host-x86_64/x86_64-gnu-llvm-19/Dockerfile | 4 +- .../docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 4 +- src/ci/docker/scripts/build-clang.sh | 48 ++++++++++++++++++ src/ci/docker/scripts/build-gcc.sh | 58 ++++++++++++++++++++++ src/ci/docker/scripts/build-gccjit.sh | 37 ++++++++++++++ src/ci/docker/scripts/build-zstd.sh | 29 +++++++++++ 21 files changed, 195 insertions(+), 363 deletions(-) delete mode 100755 src/ci/docker/host-aarch64/dist-aarch64-linux/build-clang.sh delete mode 100755 src/ci/docker/host-aarch64/dist-aarch64-linux/build-gcc.sh delete mode 100755 src/ci/docker/host-aarch64/dist-aarch64-linux/build-zstd.sh delete mode 100644 src/ci/docker/host-aarch64/dist-aarch64-linux/shared.sh delete mode 100644 src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh delete mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh delete mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh delete mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh delete mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh delete mode 100644 src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh create mode 100755 src/ci/docker/scripts/build-clang.sh create mode 100755 src/ci/docker/scripts/build-gcc.sh create mode 100755 src/ci/docker/scripts/build-gccjit.sh create mode 100755 src/ci/docker/scripts/build-zstd.sh (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile index c7778dbf6bb..4f4caa5fa50 100644 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile @@ -43,10 +43,10 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp RUN mkdir /home/user -COPY host-aarch64/dist-aarch64-linux/shared.sh /tmp/ +COPY scripts/shared.sh /tmp/ # Need at least GCC 5.1 to compile LLVM -COPY host-aarch64/dist-aarch64-linux/build-gcc.sh /tmp/ +COPY scripts/build-gcc.sh /tmp/ RUN ./build-gcc.sh && yum remove -y gcc gcc-c++ ENV CC=gcc CXX=g++ @@ -56,12 +56,13 @@ COPY scripts/cmake.sh /tmp/ RUN ./cmake.sh # Build LLVM+Clang -COPY host-aarch64/dist-aarch64-linux/build-clang.sh /tmp/ +COPY scripts/build-clang.sh /tmp/ +ENV LLVM_BUILD_TARGETS=AArch64 RUN ./build-clang.sh ENV CC=clang CXX=clang++ # Build zstd to enable `llvm.libzstd`. -COPY host-aarch64/dist-aarch64-linux/build-zstd.sh /tmp/ +COPY scripts/build-zstd.sh /tmp/ RUN ./build-zstd.sh COPY scripts/sccache.sh /scripts/ @@ -82,7 +83,7 @@ ENV RUST_CONFIGURE_ARGS \ --set target.aarch64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \ --set target.aarch64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ --set llvm.link-shared=true \ - --set llvm.thin-lto=false \ + --set llvm.thin-lto=true \ --set llvm.libzstd=true \ --set llvm.ninja=false \ --set rust.debug-assertions=false \ diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/build-clang.sh b/src/ci/docker/host-aarch64/dist-aarch64-linux/build-clang.sh deleted file mode 100755 index fb5f4d8c4f7..00000000000 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/build-clang.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -source shared.sh - -# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh -LLVM=llvmorg-19.1.5 - -mkdir llvm-project -cd llvm-project - -curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \ - tar xzf - --strip-components=1 - -mkdir clang-build -cd clang-build - -# For whatever reason the default set of include paths for clang is different -# than that of gcc. As a result we need to manually include our sysroot's -# include path, /rustroot/include, to clang's default include path. -INC="/rustroot/include:/usr/include" - -# We need compiler-rt for the profile runtime (used later to PGO the LLVM build) -# but sanitizers aren't currently building. Since we don't need those, just -# disable them. BOLT is used for optimizing LLVM. -hide_output \ - cmake ../llvm \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/rustroot \ - -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ - -DCOMPILER_RT_BUILD_XRAY=OFF \ - -DCOMPILER_RT_BUILD_MEMPROF=OFF \ - -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ - -DLLVM_TARGETS_TO_BUILD=AArch64 \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \ - -DC_INCLUDE_DIRS="$INC" - -hide_output make -j$(nproc) -hide_output make install - -cd ../.. -rm -rf llvm-project diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/build-gcc.sh b/src/ci/docker/host-aarch64/dist-aarch64-linux/build-gcc.sh deleted file mode 100755 index ad33b21b9b5..00000000000 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/build-gcc.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -set -ex - -source shared.sh - -# Note: in the future when bumping to version 10.1.0, also take care of the sed block below. -GCC=9.5.0 - -curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.xz | xzcat | tar xf - -cd gcc-$GCC - -# FIXME(#49246): Remove the `sed` below. -# -# On 2018 March 21st, two Travis builders' cache for Docker are suddenly invalidated. Normally this -# is fine, because we just need to rebuild the Docker image. However, it reveals a network issue: -# downloading from `ftp://gcc.gnu.org/` from Travis (using passive mode) often leads to "Connection -# timed out" error, and even when the download completed, the file is usually corrupted. This causes -# nothing to be landed that day. -# -# We observed that the `gcc-4.8.5.tar.bz2` above can be downloaded successfully, so as a stability -# improvement we try to download from the HTTPS mirror instead. Turns out this uncovered the third -# bug: the host `gcc.gnu.org` and `cygwin.com` share the same IP, and the TLS certificate of the -# latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server -# instead here. -# -# Note: in version 10.1.0, the URL used in `download_prerequisites` has changed from using FTP to -# using HTTP. When bumping to that gcc version, we can likely remove the sed replacement below, or -# the expression will need to be updated. That new URL is available at: -# https://github.com/gcc-mirror/gcc/blob/6e6e3f144a33ae504149dc992453b4f6dea12fdb/contrib/download_prerequisites#L35 -# -sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prerequisites - -./contrib/download_prerequisites -mkdir ../gcc-build -cd ../gcc-build - -# '-fno-reorder-blocks-and-partition' is required to -# enable BOLT optimization of the C++ standard library, -# which is included in librustc_driver.so -hide_output ../gcc-$GCC/configure \ - --prefix=/rustroot \ - --enable-languages=c,c++ \ - --disable-gnu-unique-object \ - --enable-cxx-flags='-fno-reorder-blocks-and-partition' -hide_output make -j$(nproc) -hide_output make install -ln -s gcc /rustroot/bin/cc - -cd .. -rm -rf gcc-build -rm -rf gcc-$GCC diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/build-zstd.sh b/src/ci/docker/host-aarch64/dist-aarch64-linux/build-zstd.sh deleted file mode 100755 index a3d37ccc311..00000000000 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/build-zstd.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -ex - -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/zstd_build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/zstd_build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/zstd_build.log - set -x -} - -ZSTD=1.5.6 -curl -L https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz | tar xzf - - -cd zstd-$ZSTD -CFLAGS=-fPIC hide_output make -j$(nproc) VERBOSE=1 -hide_output make install - -cd .. -rm -rf zstd-$ZSTD diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/shared.sh b/src/ci/docker/host-aarch64/dist-aarch64-linux/shared.sh deleted file mode 100644 index dc86dddd464..00000000000 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/shared.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x -} diff --git a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile index 414bcc52484..7cf1c80dfbc 100644 --- a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile @@ -46,10 +46,11 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp RUN mkdir /home/user -COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ +COPY scripts/shared.sh /tmp/ # Need at least GCC 5.1 to compile LLVM nowadays -COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ +COPY scripts/build-gcc.sh /tmp/ +ENV GCC_BUILD_TARGET=i686 RUN ./build-gcc.sh && yum remove -y gcc gcc-c++ COPY scripts/cmake.sh /tmp/ @@ -57,7 +58,8 @@ RUN ./cmake.sh # Now build LLVM+Clang, afterwards configuring further compilations to use the # clang/clang++ compilers. -COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/ +COPY scripts/build-clang.sh /tmp/ +ENV LLVM_BUILD_TARGETS=X86 RUN ./build-clang.sh ENV CC=clang CXX=clang++ diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile index 9ef39189249..9d3be51d037 100644 --- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile @@ -18,7 +18,7 @@ RUN /scripts/crosstool-ng-build.sh WORKDIR /build RUN apt-get install -y --no-install-recommends rpm2cpio cpio -COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/ +COPY scripts/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/ RUN ./build-powerpc64le-toolchain.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh deleted file mode 100644 index dc86dddd464..00000000000 --- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x -} diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index e857f38e68a..c13c340871c 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -46,10 +46,10 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp RUN mkdir /home/user -COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ +COPY scripts/shared.sh /tmp/ # Need at least GCC 5.1 to compile LLVM nowadays -COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ +COPY scripts/build-gcc.sh /tmp/ RUN ./build-gcc.sh && yum remove -y gcc gcc-c++ # LLVM 17 needs cmake 3.20 or higher. @@ -58,12 +58,13 @@ RUN ./cmake.sh # Now build LLVM+Clang, afterwards configuring further compilations to use the # clang/clang++ compilers. -COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/ +COPY scripts/build-clang.sh /tmp/ +ENV LLVM_BUILD_TARGETS=X86 RUN ./build-clang.sh ENV CC=clang CXX=clang++ # Build zstd to enable `llvm.libzstd`. -COPY host-x86_64/dist-x86_64-linux/build-zstd.sh /tmp/ +COPY scripts/build-zstd.sh /tmp/ RUN ./build-zstd.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh deleted file mode 100755 index 2e08c87f278..00000000000 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -source shared.sh - -# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh -LLVM=llvmorg-19.1.0-rc3 - -mkdir llvm-project -cd llvm-project - -curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \ - tar xzf - --strip-components=1 - -mkdir clang-build -cd clang-build - -# For whatever reason the default set of include paths for clang is different -# than that of gcc. As a result we need to manually include our sysroot's -# include path, /rustroot/include, to clang's default include path. -INC="/rustroot/include:/usr/include" - -# We need compiler-rt for the profile runtime (used later to PGO the LLVM build) -# but sanitizers aren't currently building. Since we don't need those, just -# disable them. BOLT is used for optimizing LLVM. -hide_output \ - cmake ../llvm \ - -DCMAKE_C_COMPILER=/rustroot/bin/gcc \ - -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/rustroot \ - -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ - -DCOMPILER_RT_BUILD_XRAY=OFF \ - -DCOMPILER_RT_BUILD_MEMPROF=OFF \ - -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ - -DLLVM_TARGETS_TO_BUILD=X86 \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \ - -DC_INCLUDE_DIRS="$INC" - -hide_output make -j$(nproc) -hide_output make install - -cd ../.. -rm -rf llvm-project diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh deleted file mode 100755 index e939a5d7eac..00000000000 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -set -ex - -source shared.sh - -# Note: in the future when bumping to version 10.1.0, also take care of the sed block below. -GCC=9.5.0 - -curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.xz | xzcat | tar xf - -cd gcc-$GCC - -# FIXME(#49246): Remove the `sed` below. -# -# On 2018 March 21st, two Travis builders' cache for Docker are suddenly invalidated. Normally this -# is fine, because we just need to rebuild the Docker image. However, it reveals a network issue: -# downloading from `ftp://gcc.gnu.org/` from Travis (using passive mode) often leads to "Connection -# timed out" error, and even when the download completed, the file is usually corrupted. This causes -# nothing to be landed that day. -# -# We observed that the `gcc-4.8.5.tar.bz2` above can be downloaded successfully, so as a stability -# improvement we try to download from the HTTPS mirror instead. Turns out this uncovered the third -# bug: the host `gcc.gnu.org` and `cygwin.com` share the same IP, and the TLS certificate of the -# latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server -# instead here. -# -# Note: in version 10.1.0, the URL used in `download_prerequisites` has changed from using FTP to -# using HTTP. When bumping to that gcc version, we can likely remove the sed replacement below, or -# the expression will need to be updated. That new URL is available at: -# https://github.com/gcc-mirror/gcc/blob/6e6e3f144a33ae504149dc992453b4f6dea12fdb/contrib/download_prerequisites#L35 -# -sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prerequisites - -./contrib/download_prerequisites -mkdir ../gcc-build -cd ../gcc-build - -# '-fno-reorder-blocks-and-partition' is required to -# enable BOLT optimization of the C++ standard library, -# which is included in librustc_driver.so -hide_output ../gcc-$GCC/configure \ - --prefix=/rustroot \ - --enable-languages=c,c++ \ - --disable-gnu-unique-object \ - --enable-cxx-flags='-fno-reorder-blocks-and-partition' -hide_output make -j$(nproc) -hide_output make install -ln -s gcc /rustroot/bin/cc - -cd .. -rm -rf gcc-build -rm -rf gcc-$GCC - -# FIXME: clang doesn't find 32-bit libraries in /rustroot/lib, -# but it does look all the way under /rustroot/lib/[...]/32, -# so we can link stuff there to help it out. -ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh deleted file mode 100755 index c565922dcd1..00000000000 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -GIT_REPO="https://github.com/rust-lang/gcc" - -# This commit hash needs to be updated to use a more recent gcc fork version. -GIT_COMMIT="e744a9459d33864067214741daf5c5bc2a7b88c6" - -set -ex - -cd $1 - -source shared.sh - -# Setting up folders for GCC -curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" | - tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/" - -mkdir gcc-build gcc-install -pushd gcc-build - -# Building GCC. -hide_output \ - ../gcc-src/configure \ - --enable-host-shared \ - --enable-languages=jit \ - --enable-checking=release \ - --disable-bootstrap \ - --disable-multilib \ - --prefix=$(pwd)/../gcc-install \ - -hide_output make -j$(nproc) -hide_output make install - -popd -rm -rf gcc-src gcc-build -ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so -ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0 diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh deleted file mode 100755 index a3d37ccc311..00000000000 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -ex - -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/zstd_build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/zstd_build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/zstd_build.log - set -x -} - -ZSTD=1.5.6 -curl -L https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz | tar xzf - - -cd zstd-$ZSTD -CFLAGS=-fPIC hide_output make -j$(nproc) VERBOSE=1 -hide_output make install - -cd .. -rm -rf zstd-$ZSTD diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh deleted file mode 100644 index dc86dddd464..00000000000 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - set -x -} 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 42df58517ca..1cfa2273443 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 @@ -54,8 +54,8 @@ ENV RUST_CONFIGURE_ARGS \ --set rust.randomize-layout=true \ --set rust.thin-lto-import-instr-limit=10 -COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ -COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ +COPY scripts/shared.sh /scripts/ +COPY scripts/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts 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 f2aadbe87cf..b33cb6478af 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 @@ -54,8 +54,8 @@ ENV RUST_CONFIGURE_ARGS \ --set rust.randomize-layout=true \ --set rust.thin-lto-import-instr-limit=10 -COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ -COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ +COPY scripts/shared.sh /scripts/ +COPY scripts/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index 2a09cd54b13..ab749b3fdd5 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -89,8 +89,8 @@ ENV HOST_TARGET x86_64-unknown-linux-gnu # assertions enabled! Therefore, we cannot force download CI rustc. #ENV FORCE_CI_RUSTC 1 -COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ -COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ +COPY scripts/shared.sh /scripts/ +COPY scripts/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts diff --git a/src/ci/docker/scripts/build-clang.sh b/src/ci/docker/scripts/build-clang.sh new file mode 100755 index 00000000000..47bfcfbecab --- /dev/null +++ b/src/ci/docker/scripts/build-clang.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -exu + +source shared.sh + +# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh +LLVM=llvmorg-19.1.0-rc3 + +mkdir llvm-project +cd llvm-project + +curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \ + tar xzf - --strip-components=1 + +mkdir clang-build +cd clang-build + +# For whatever reason the default set of include paths for clang is different +# than that of gcc. As a result we need to manually include our sysroot's +# include path, /rustroot/include, to clang's default include path. +INC="/rustroot/include:/usr/include" + +# We need compiler-rt for the profile runtime (used later to PGO the LLVM build) +# but sanitizers aren't currently building. Since we don't need those, just +# disable them. BOLT is used for optimizing LLVM. +hide_output \ + cmake ../llvm \ + -DCMAKE_C_COMPILER=/rustroot/bin/gcc \ + -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/rustroot \ + -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ + -DCOMPILER_RT_BUILD_XRAY=OFF \ + -DCOMPILER_RT_BUILD_MEMPROF=OFF \ + -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ + -DLLVM_TARGETS_TO_BUILD=$LLVM_BUILD_TARGETS \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \ + -DC_INCLUDE_DIRS="$INC" + +hide_output make -j$(nproc) +hide_output make install + +cd ../.. +rm -rf llvm-project diff --git a/src/ci/docker/scripts/build-gcc.sh b/src/ci/docker/scripts/build-gcc.sh new file mode 100755 index 00000000000..78a038215e4 --- /dev/null +++ b/src/ci/docker/scripts/build-gcc.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +set -ex + +source shared.sh + +# Note: in the future when bumping to version 10.1.0, also take care of the sed block below. +GCC=9.5.0 + +curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.xz | xzcat | tar xf - +cd gcc-$GCC + +# FIXME(#49246): Remove the `sed` below. +# +# On 2018 March 21st, two Travis builders' cache for Docker are suddenly invalidated. Normally this +# is fine, because we just need to rebuild the Docker image. However, it reveals a network issue: +# downloading from `ftp://gcc.gnu.org/` from Travis (using passive mode) often leads to "Connection +# timed out" error, and even when the download completed, the file is usually corrupted. This causes +# nothing to be landed that day. +# +# We observed that the `gcc-4.8.5.tar.bz2` above can be downloaded successfully, so as a stability +# improvement we try to download from the HTTPS mirror instead. Turns out this uncovered the third +# bug: the host `gcc.gnu.org` and `cygwin.com` share the same IP, and the TLS certificate of the +# latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server +# instead here. +# +# Note: in version 10.1.0, the URL used in `download_prerequisites` has changed from using FTP to +# using HTTP. When bumping to that gcc version, we can likely remove the sed replacement below, or +# the expression will need to be updated. That new URL is available at: +# https://github.com/gcc-mirror/gcc/blob/6e6e3f144a33ae504149dc992453b4f6dea12fdb/contrib/download_prerequisites#L35 +# +sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prerequisites + +./contrib/download_prerequisites +mkdir ../gcc-build +cd ../gcc-build + +# '-fno-reorder-blocks-and-partition' is required to +# enable BOLT optimization of the C++ standard library, +# which is included in librustc_driver.so +hide_output ../gcc-$GCC/configure \ + --prefix=/rustroot \ + --enable-languages=c,c++ \ + --disable-gnu-unique-object \ + --enable-cxx-flags='-fno-reorder-blocks-and-partition' +hide_output make -j$(nproc) +hide_output make install +ln -s gcc /rustroot/bin/cc + +cd .. +rm -rf gcc-build +rm -rf gcc-$GCC + +if [[ $GCC_BUILD_TARGET == "i686" ]]; then + # FIXME: clang doesn't find 32-bit libraries in /rustroot/lib, + # but it does look all the way under /rustroot/lib/[...]/32, + # so we can link stuff there to help it out. + ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/ +fi diff --git a/src/ci/docker/scripts/build-gccjit.sh b/src/ci/docker/scripts/build-gccjit.sh new file mode 100755 index 00000000000..c565922dcd1 --- /dev/null +++ b/src/ci/docker/scripts/build-gccjit.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +GIT_REPO="https://github.com/rust-lang/gcc" + +# This commit hash needs to be updated to use a more recent gcc fork version. +GIT_COMMIT="e744a9459d33864067214741daf5c5bc2a7b88c6" + +set -ex + +cd $1 + +source shared.sh + +# Setting up folders for GCC +curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" | + tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/" + +mkdir gcc-build gcc-install +pushd gcc-build + +# Building GCC. +hide_output \ + ../gcc-src/configure \ + --enable-host-shared \ + --enable-languages=jit \ + --enable-checking=release \ + --disable-bootstrap \ + --disable-multilib \ + --prefix=$(pwd)/../gcc-install \ + +hide_output make -j$(nproc) +hide_output make install + +popd +rm -rf gcc-src gcc-build +ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so +ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0 diff --git a/src/ci/docker/scripts/build-zstd.sh b/src/ci/docker/scripts/build-zstd.sh new file mode 100755 index 00000000000..a3d37ccc311 --- /dev/null +++ b/src/ci/docker/scripts/build-zstd.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -ex + +hide_output() { + set +x + on_err=" +echo ERROR: An error was encountered with the build. +cat /tmp/zstd_build.log +exit 1 +" + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/zstd_build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/zstd_build.log + set -x +} + +ZSTD=1.5.6 +curl -L https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz | tar xzf - + +cd zstd-$ZSTD +CFLAGS=-fPIC hide_output make -j$(nproc) VERBOSE=1 +hide_output make install + +cd .. +rm -rf zstd-$ZSTD -- cgit 1.4.1-3-g733a5 From a93c95b85b61c1d9afc5572c11d8bbe1845519f5 Mon Sep 17 00:00:00 2001 From: Steven Grady Date: Thu, 12 Dec 2024 17:49:24 +0000 Subject: Bump Fuchsia toolchain for testing This updates the Fuchsia SDK used to test rust on Fuchsia to 26.20241211.7.1, and clang to the development version 20 from 388d7f144880dcd85ff31f06793304405a9f44b6. --- src/ci/docker/scripts/build-fuchsia-toolchain.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/build-fuchsia-toolchain.sh b/src/ci/docker/scripts/build-fuchsia-toolchain.sh index 027d412d250..3c65a52ada7 100755 --- a/src/ci/docker/scripts/build-fuchsia-toolchain.sh +++ b/src/ci/docker/scripts/build-fuchsia-toolchain.sh @@ -4,13 +4,13 @@ set -ex source shared.sh FUCHSIA_SDK_URL=https://chrome-infra-packages.appspot.com/dl/fuchsia/sdk/core/linux-amd64 -FUCHSIA_SDK_ID=version:21.20240610.2.1 -FUCHSIA_SDK_SHA256=2d2d057fc3f0404197cced2200f88cbcdaaf5fbf6475955045091f8676791ce7 +FUCHSIA_SDK_ID=version:26.20241211.7.1 +FUCHSIA_SDK_SHA256=2cb7a9a0419f7413a46e0ccef7dad89f7c9979940d7c1ee87fac70ff499757d6 FUCHSIA_SDK_USR_DIR=/usr/local/core-linux-amd64-fuchsia-sdk CLANG_DOWNLOAD_URL=\ https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/linux-amd64 -CLANG_DOWNLOAD_ID=git_revision:3809e20afc68d7d03821f0ec59b928dcf9befbf4 -CLANG_DOWNLOAD_SHA256=3c2c442b61cd9e8f1b567738f6d53cffe11b3fc820e7dae87a82a0859be8f204 +CLANG_DOWNLOAD_ID=git_revision:388d7f144880dcd85ff31f06793304405a9f44b6 +CLANG_DOWNLOAD_SHA256=970d1f427b9c9a3049d8622c80c86830ff31b5334ad8da47a2f1e81143197e8b install_clang() { mkdir -p clang_download -- cgit 1.4.1-3-g733a5 From a5dce0e16d387cf13afce252fa42322d39a4cf97 Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Fri, 20 Dec 2024 16:04:39 +0100 Subject: Revert "Auto merge of #133809 - mrkajetanp:ci-aarch64-dist, r=Kobzol" This reverts commit 023521e6825edfa6df01e392520d7cb120eab158, reversing changes made to c434b4b4b6cd20560c5b32e80b2b22618a4da3dd. --- .../host-aarch64/dist-aarch64-linux/Dockerfile | 99 ---------------------- .../host-x86_64/dist-aarch64-linux/Dockerfile | 32 +++++++ .../dist-aarch64-linux/aarch64-linux-gnu.defconfig | 10 +++ .../docker/host-x86_64/dist-i686-linux/Dockerfile | 8 +- .../host-x86_64/dist-powerpc64le-linux/Dockerfile | 2 +- .../host-x86_64/dist-powerpc64le-linux/shared.sh | 16 ++++ .../host-x86_64/dist-x86_64-linux/Dockerfile | 9 +- .../host-x86_64/dist-x86_64-linux/build-clang.sh | 48 +++++++++++ .../host-x86_64/dist-x86_64-linux/build-gcc.sh | 56 ++++++++++++ .../host-x86_64/dist-x86_64-linux/build-gccjit.sh | 37 ++++++++ .../host-x86_64/dist-x86_64-linux/build-zstd.sh | 29 +++++++ .../docker/host-x86_64/dist-x86_64-linux/shared.sh | 16 ++++ .../host-x86_64/x86_64-gnu-llvm-18/Dockerfile | 4 +- .../host-x86_64/x86_64-gnu-llvm-19/Dockerfile | 4 +- .../docker/host-x86_64/x86_64-gnu-tools/Dockerfile | 4 +- src/ci/docker/scripts/build-clang.sh | 48 ----------- src/ci/docker/scripts/build-gcc.sh | 58 ------------- src/ci/docker/scripts/build-gccjit.sh | 37 -------- src/ci/docker/scripts/build-zstd.sh | 29 ------- src/ci/github-actions/jobs.yml | 10 +-- 20 files changed, 263 insertions(+), 293 deletions(-) delete mode 100644 src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile create mode 100644 src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile create mode 100644 src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig create mode 100644 src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh create mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh create mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh create mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh create mode 100755 src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh create mode 100644 src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh delete mode 100755 src/ci/docker/scripts/build-clang.sh delete mode 100755 src/ci/docker/scripts/build-gcc.sh delete mode 100755 src/ci/docker/scripts/build-gccjit.sh delete mode 100755 src/ci/docker/scripts/build-zstd.sh (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile deleted file mode 100644 index 4f4caa5fa50..00000000000 --- a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile +++ /dev/null @@ -1,99 +0,0 @@ -# We document platform support for minimum glibc 2.17 and kernel 3.2. -# CentOS 7 has headers for kernel 3.10, but that's fine as long as we don't -# actually use newer APIs in rustc or std without a fallback. It's more -# important that we match glibc for ELF symbol versioning. -FROM centos:7 - -WORKDIR /build - -# CentOS 7 EOL is June 30, 2024, but the repos remain in the vault. -RUN sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \ - -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!' -RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf - -RUN yum upgrade -y && \ - yum install -y \ - automake \ - bzip2 \ - file \ - gcc \ - gcc-c++ \ - git \ - glibc-devel \ - libedit-devel \ - libstdc++-devel \ - make \ - ncurses-devel \ - openssl-devel \ - patch \ - perl \ - perl-core \ - pkgconfig \ - python3 \ - unzip \ - wget \ - xz \ - zlib-devel \ - && yum clean all - -RUN mkdir -p /rustroot/bin - -ENV PATH=/rustroot/bin:$PATH -ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib -ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig -WORKDIR /tmp -RUN mkdir /home/user -COPY scripts/shared.sh /tmp/ - -# Need at least GCC 5.1 to compile LLVM -COPY scripts/build-gcc.sh /tmp/ -RUN ./build-gcc.sh && yum remove -y gcc gcc-c++ - -ENV CC=gcc CXX=g++ - -# LLVM 17 needs cmake 3.20 or higher. -COPY scripts/cmake.sh /tmp/ -RUN ./cmake.sh - -# Build LLVM+Clang -COPY scripts/build-clang.sh /tmp/ -ENV LLVM_BUILD_TARGETS=AArch64 -RUN ./build-clang.sh -ENV CC=clang CXX=clang++ - -# Build zstd to enable `llvm.libzstd`. -COPY scripts/build-zstd.sh /tmp/ -RUN ./build-zstd.sh - -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh - -ENV PGO_HOST=aarch64-unknown-linux-gnu -ENV HOSTS=aarch64-unknown-linux-gnu - -ENV CPATH=/usr/include/aarch64-linux-gnu/:$CPATH - -ENV RUST_CONFIGURE_ARGS \ - --build=aarch64-unknown-linux-gnu \ - --enable-full-tools \ - --enable-profiler \ - --enable-sanitizers \ - --enable-compiler-docs \ - --set target.aarch64-unknown-linux-gnu.linker=clang \ - --set target.aarch64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \ - --set target.aarch64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \ - --set llvm.link-shared=true \ - --set llvm.thin-lto=true \ - --set llvm.libzstd=true \ - --set llvm.ninja=false \ - --set rust.debug-assertions=false \ - --set rust.jemalloc \ - --set rust.use-lld=true \ - --set rust.codegen-units=1 - -ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS - -ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang -ENV DIST_SRC 1 -ENV LIBCURL_NO_PKG_CONFIG 1 -ENV DIST_REQUIRE_ALL_TOOLS 1 diff --git a/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile new file mode 100644 index 00000000000..18972387e34 --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:22.04 + +COPY scripts/cross-apt-packages.sh /scripts/ +RUN sh /scripts/cross-apt-packages.sh + +COPY scripts/crosstool-ng.sh /scripts/ +RUN sh /scripts/crosstool-ng.sh + +COPY scripts/rustbuild-setup.sh /scripts/ +RUN sh /scripts/rustbuild-setup.sh +WORKDIR /tmp + +COPY scripts/crosstool-ng-build.sh /scripts/ +COPY host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig /tmp/crosstool.defconfig +RUN /scripts/crosstool-ng-build.sh + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnu/bin + +ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnu-gcc \ + AR_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnu-ar \ + CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnu-g++ + +ENV HOSTS=aarch64-unknown-linux-gnu + +ENV RUST_CONFIGURE_ARGS \ + --enable-full-tools \ + --enable-profiler \ + --enable-sanitizers +ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig b/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig new file mode 100644 index 00000000000..520b1667c8b --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig @@ -0,0 +1,10 @@ +CT_CONFIG_VERSION="4" +CT_PREFIX_DIR="/x-tools/${CT_TARGET}" +CT_USE_MIRROR=y +CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc" +CT_ARCH_ARM=y +CT_ARCH_64=y +CT_KERNEL_LINUX=y +CT_LINUX_V_4_1=y +CT_GLIBC_V_2_17=y +CT_CC_LANG_CXX=y diff --git a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile index 7cf1c80dfbc..414bcc52484 100644 --- a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile @@ -46,11 +46,10 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp RUN mkdir /home/user -COPY scripts/shared.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ # Need at least GCC 5.1 to compile LLVM nowadays -COPY scripts/build-gcc.sh /tmp/ -ENV GCC_BUILD_TARGET=i686 +COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh && yum remove -y gcc gcc-c++ COPY scripts/cmake.sh /tmp/ @@ -58,8 +57,7 @@ RUN ./cmake.sh # Now build LLVM+Clang, afterwards configuring further compilations to use the # clang/clang++ compilers. -COPY scripts/build-clang.sh /tmp/ -ENV LLVM_BUILD_TARGETS=X86 +COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/ RUN ./build-clang.sh ENV CC=clang CXX=clang++ diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile index 9d3be51d037..9ef39189249 100644 --- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile @@ -18,7 +18,7 @@ RUN /scripts/crosstool-ng-build.sh WORKDIR /build RUN apt-get install -y --no-install-recommends rpm2cpio cpio -COPY scripts/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/ +COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/ RUN ./build-powerpc64le-toolchain.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh new file mode 100644 index 00000000000..dc86dddd464 --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh @@ -0,0 +1,16 @@ +#!/bin/sh +hide_output() { + set +x + on_err=" +echo ERROR: An error was encountered with the build. +cat /tmp/build.log +exit 1 +" + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x +} diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index c13c340871c..e857f38e68a 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -46,10 +46,10 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp RUN mkdir /home/user -COPY scripts/shared.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ # Need at least GCC 5.1 to compile LLVM nowadays -COPY scripts/build-gcc.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh && yum remove -y gcc gcc-c++ # LLVM 17 needs cmake 3.20 or higher. @@ -58,13 +58,12 @@ RUN ./cmake.sh # Now build LLVM+Clang, afterwards configuring further compilations to use the # clang/clang++ compilers. -COPY scripts/build-clang.sh /tmp/ -ENV LLVM_BUILD_TARGETS=X86 +COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/ RUN ./build-clang.sh ENV CC=clang CXX=clang++ # Build zstd to enable `llvm.libzstd`. -COPY scripts/build-zstd.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-zstd.sh /tmp/ RUN ./build-zstd.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh new file mode 100755 index 00000000000..2e08c87f278 --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -ex + +source shared.sh + +# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh +LLVM=llvmorg-19.1.0-rc3 + +mkdir llvm-project +cd llvm-project + +curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \ + tar xzf - --strip-components=1 + +mkdir clang-build +cd clang-build + +# For whatever reason the default set of include paths for clang is different +# than that of gcc. As a result we need to manually include our sysroot's +# include path, /rustroot/include, to clang's default include path. +INC="/rustroot/include:/usr/include" + +# We need compiler-rt for the profile runtime (used later to PGO the LLVM build) +# but sanitizers aren't currently building. Since we don't need those, just +# disable them. BOLT is used for optimizing LLVM. +hide_output \ + cmake ../llvm \ + -DCMAKE_C_COMPILER=/rustroot/bin/gcc \ + -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/rustroot \ + -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ + -DCOMPILER_RT_BUILD_XRAY=OFF \ + -DCOMPILER_RT_BUILD_MEMPROF=OFF \ + -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ + -DLLVM_TARGETS_TO_BUILD=X86 \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \ + -DC_INCLUDE_DIRS="$INC" + +hide_output make -j$(nproc) +hide_output make install + +cd ../.. +rm -rf llvm-project diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh new file mode 100755 index 00000000000..e939a5d7eac --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +set -ex + +source shared.sh + +# Note: in the future when bumping to version 10.1.0, also take care of the sed block below. +GCC=9.5.0 + +curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.xz | xzcat | tar xf - +cd gcc-$GCC + +# FIXME(#49246): Remove the `sed` below. +# +# On 2018 March 21st, two Travis builders' cache for Docker are suddenly invalidated. Normally this +# is fine, because we just need to rebuild the Docker image. However, it reveals a network issue: +# downloading from `ftp://gcc.gnu.org/` from Travis (using passive mode) often leads to "Connection +# timed out" error, and even when the download completed, the file is usually corrupted. This causes +# nothing to be landed that day. +# +# We observed that the `gcc-4.8.5.tar.bz2` above can be downloaded successfully, so as a stability +# improvement we try to download from the HTTPS mirror instead. Turns out this uncovered the third +# bug: the host `gcc.gnu.org` and `cygwin.com` share the same IP, and the TLS certificate of the +# latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server +# instead here. +# +# Note: in version 10.1.0, the URL used in `download_prerequisites` has changed from using FTP to +# using HTTP. When bumping to that gcc version, we can likely remove the sed replacement below, or +# the expression will need to be updated. That new URL is available at: +# https://github.com/gcc-mirror/gcc/blob/6e6e3f144a33ae504149dc992453b4f6dea12fdb/contrib/download_prerequisites#L35 +# +sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prerequisites + +./contrib/download_prerequisites +mkdir ../gcc-build +cd ../gcc-build + +# '-fno-reorder-blocks-and-partition' is required to +# enable BOLT optimization of the C++ standard library, +# which is included in librustc_driver.so +hide_output ../gcc-$GCC/configure \ + --prefix=/rustroot \ + --enable-languages=c,c++ \ + --disable-gnu-unique-object \ + --enable-cxx-flags='-fno-reorder-blocks-and-partition' +hide_output make -j$(nproc) +hide_output make install +ln -s gcc /rustroot/bin/cc + +cd .. +rm -rf gcc-build +rm -rf gcc-$GCC + +# FIXME: clang doesn't find 32-bit libraries in /rustroot/lib, +# but it does look all the way under /rustroot/lib/[...]/32, +# so we can link stuff there to help it out. +ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/ diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh new file mode 100755 index 00000000000..c565922dcd1 --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +GIT_REPO="https://github.com/rust-lang/gcc" + +# This commit hash needs to be updated to use a more recent gcc fork version. +GIT_COMMIT="e744a9459d33864067214741daf5c5bc2a7b88c6" + +set -ex + +cd $1 + +source shared.sh + +# Setting up folders for GCC +curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" | + tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/" + +mkdir gcc-build gcc-install +pushd gcc-build + +# Building GCC. +hide_output \ + ../gcc-src/configure \ + --enable-host-shared \ + --enable-languages=jit \ + --enable-checking=release \ + --disable-bootstrap \ + --disable-multilib \ + --prefix=$(pwd)/../gcc-install \ + +hide_output make -j$(nproc) +hide_output make install + +popd +rm -rf gcc-src gcc-build +ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so +ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0 diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh new file mode 100755 index 00000000000..a3d37ccc311 --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -ex + +hide_output() { + set +x + on_err=" +echo ERROR: An error was encountered with the build. +cat /tmp/zstd_build.log +exit 1 +" + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/zstd_build.log + trap - ERR + kill $PING_LOOP_PID + rm /tmp/zstd_build.log + set -x +} + +ZSTD=1.5.6 +curl -L https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz | tar xzf - + +cd zstd-$ZSTD +CFLAGS=-fPIC hide_output make -j$(nproc) VERBOSE=1 +hide_output make install + +cd .. +rm -rf zstd-$ZSTD diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh new file mode 100644 index 00000000000..dc86dddd464 --- /dev/null +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh @@ -0,0 +1,16 @@ +#!/bin/sh +hide_output() { + set +x + on_err=" +echo ERROR: An error was encountered with the build. +cat /tmp/build.log +exit 1 +" + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x +} 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 0a58f337d9d..e157debfd09 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 @@ -54,8 +54,8 @@ ENV RUST_CONFIGURE_ARGS \ --set rust.randomize-layout=true \ --set rust.thin-lto-import-instr-limit=10 -COPY scripts/shared.sh /scripts/ -COPY scripts/build-gccjit.sh /scripts/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ +COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts 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 092847cdfe0..e7016e7d3c0 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 @@ -54,8 +54,8 @@ ENV RUST_CONFIGURE_ARGS \ --set rust.randomize-layout=true \ --set rust.thin-lto-import-instr-limit=10 -COPY scripts/shared.sh /scripts/ -COPY scripts/build-gccjit.sh /scripts/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ +COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index ab749b3fdd5..2a09cd54b13 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -89,8 +89,8 @@ ENV HOST_TARGET x86_64-unknown-linux-gnu # assertions enabled! Therefore, we cannot force download CI rustc. #ENV FORCE_CI_RUSTC 1 -COPY scripts/shared.sh /scripts/ -COPY scripts/build-gccjit.sh /scripts/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/ +COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/ RUN /scripts/build-gccjit.sh /scripts diff --git a/src/ci/docker/scripts/build-clang.sh b/src/ci/docker/scripts/build-clang.sh deleted file mode 100755 index 47bfcfbecab..00000000000 --- a/src/ci/docker/scripts/build-clang.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -set -exu - -source shared.sh - -# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh -LLVM=llvmorg-19.1.0-rc3 - -mkdir llvm-project -cd llvm-project - -curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \ - tar xzf - --strip-components=1 - -mkdir clang-build -cd clang-build - -# For whatever reason the default set of include paths for clang is different -# than that of gcc. As a result we need to manually include our sysroot's -# include path, /rustroot/include, to clang's default include path. -INC="/rustroot/include:/usr/include" - -# We need compiler-rt for the profile runtime (used later to PGO the LLVM build) -# but sanitizers aren't currently building. Since we don't need those, just -# disable them. BOLT is used for optimizing LLVM. -hide_output \ - cmake ../llvm \ - -DCMAKE_C_COMPILER=/rustroot/bin/gcc \ - -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/rustroot \ - -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ - -DCOMPILER_RT_BUILD_XRAY=OFF \ - -DCOMPILER_RT_BUILD_MEMPROF=OFF \ - -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \ - -DLLVM_TARGETS_TO_BUILD=$LLVM_BUILD_TARGETS \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \ - -DC_INCLUDE_DIRS="$INC" - -hide_output make -j$(nproc) -hide_output make install - -cd ../.. -rm -rf llvm-project diff --git a/src/ci/docker/scripts/build-gcc.sh b/src/ci/docker/scripts/build-gcc.sh deleted file mode 100755 index 78a038215e4..00000000000 --- a/src/ci/docker/scripts/build-gcc.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -set -ex - -source shared.sh - -# Note: in the future when bumping to version 10.1.0, also take care of the sed block below. -GCC=9.5.0 - -curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.xz | xzcat | tar xf - -cd gcc-$GCC - -# FIXME(#49246): Remove the `sed` below. -# -# On 2018 March 21st, two Travis builders' cache for Docker are suddenly invalidated. Normally this -# is fine, because we just need to rebuild the Docker image. However, it reveals a network issue: -# downloading from `ftp://gcc.gnu.org/` from Travis (using passive mode) often leads to "Connection -# timed out" error, and even when the download completed, the file is usually corrupted. This causes -# nothing to be landed that day. -# -# We observed that the `gcc-4.8.5.tar.bz2` above can be downloaded successfully, so as a stability -# improvement we try to download from the HTTPS mirror instead. Turns out this uncovered the third -# bug: the host `gcc.gnu.org` and `cygwin.com` share the same IP, and the TLS certificate of the -# latter host is presented to `wget`! Therefore, we choose to download from the insecure HTTP server -# instead here. -# -# Note: in version 10.1.0, the URL used in `download_prerequisites` has changed from using FTP to -# using HTTP. When bumping to that gcc version, we can likely remove the sed replacement below, or -# the expression will need to be updated. That new URL is available at: -# https://github.com/gcc-mirror/gcc/blob/6e6e3f144a33ae504149dc992453b4f6dea12fdb/contrib/download_prerequisites#L35 -# -sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prerequisites - -./contrib/download_prerequisites -mkdir ../gcc-build -cd ../gcc-build - -# '-fno-reorder-blocks-and-partition' is required to -# enable BOLT optimization of the C++ standard library, -# which is included in librustc_driver.so -hide_output ../gcc-$GCC/configure \ - --prefix=/rustroot \ - --enable-languages=c,c++ \ - --disable-gnu-unique-object \ - --enable-cxx-flags='-fno-reorder-blocks-and-partition' -hide_output make -j$(nproc) -hide_output make install -ln -s gcc /rustroot/bin/cc - -cd .. -rm -rf gcc-build -rm -rf gcc-$GCC - -if [[ $GCC_BUILD_TARGET == "i686" ]]; then - # FIXME: clang doesn't find 32-bit libraries in /rustroot/lib, - # but it does look all the way under /rustroot/lib/[...]/32, - # so we can link stuff there to help it out. - ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/ -fi diff --git a/src/ci/docker/scripts/build-gccjit.sh b/src/ci/docker/scripts/build-gccjit.sh deleted file mode 100755 index c565922dcd1..00000000000 --- a/src/ci/docker/scripts/build-gccjit.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -GIT_REPO="https://github.com/rust-lang/gcc" - -# This commit hash needs to be updated to use a more recent gcc fork version. -GIT_COMMIT="e744a9459d33864067214741daf5c5bc2a7b88c6" - -set -ex - -cd $1 - -source shared.sh - -# Setting up folders for GCC -curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" | - tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/" - -mkdir gcc-build gcc-install -pushd gcc-build - -# Building GCC. -hide_output \ - ../gcc-src/configure \ - --enable-host-shared \ - --enable-languages=jit \ - --enable-checking=release \ - --disable-bootstrap \ - --disable-multilib \ - --prefix=$(pwd)/../gcc-install \ - -hide_output make -j$(nproc) -hide_output make install - -popd -rm -rf gcc-src gcc-build -ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so -ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0 diff --git a/src/ci/docker/scripts/build-zstd.sh b/src/ci/docker/scripts/build-zstd.sh deleted file mode 100755 index a3d37ccc311..00000000000 --- a/src/ci/docker/scripts/build-zstd.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -ex - -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/zstd_build.log -exit 1 -" - trap "$on_err" ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "$@" &> /tmp/zstd_build.log - trap - ERR - kill $PING_LOOP_PID - rm /tmp/zstd_build.log - set -x -} - -ZSTD=1.5.6 -curl -L https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz | tar xzf - - -cd zstd-$ZSTD -CFLAGS=-fPIC hide_output make -j$(nproc) VERBOSE=1 -hide_output make install - -cd .. -rm -rf zstd-$ZSTD diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 43ef47641ba..94033d79af9 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -129,17 +129,17 @@ auto: - image: aarch64-gnu-debug <<: *job-linux-8c-aarch64 - - image: dist-aarch64-linux - env: - CODEGEN_BACKENDS: llvm,cranelift - <<: *job-linux-8c-aarch64 - - image: arm-android <<: *job-linux-4c - image: armhf-gnu <<: *job-linux-4c + - image: dist-aarch64-linux + env: + CODEGEN_BACKENDS: llvm,cranelift + <<: *job-linux-4c + - image: dist-android <<: *job-linux-4c -- cgit 1.4.1-3-g733a5