From 5fb71c677f2fc7922147764f928bbb104e0ebe87 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Mon, 7 Oct 2024 23:32:05 +0200 Subject: CI: rfl: move job forward to Linux v6.12-rc2 Signed-off-by: Miguel Ojeda --- src/ci/docker/scripts/rfl-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh index 8011e07e92e..27dbfc6040c 100755 --- a/src/ci/docker/scripts/rfl-build.sh +++ b/src/ci/docker/scripts/rfl-build.sh @@ -2,7 +2,7 @@ set -euo pipefail -LINUX_VERSION=4c7864e81d8bbd51036dacf92fb0a400e13aaeee +LINUX_VERSION=v6.12-rc2 # Build rustc, rustdoc, cargo, clippy-driver and rustfmt ../x.py build --stage 2 library rustdoc clippy rustfmt -- cgit 1.4.1-3-g733a5 From 2c38ecfc9077000db7de14bf501fa5294eeecedd Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Thu, 10 Oct 2024 23:53:29 -0700 Subject: emscripten: Use the latest emsdk 3.1.68 This should fix our precompiled std being unsound in `std::fs` code. --- src/ci/docker/scripts/emscripten.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/emscripten.sh b/src/ci/docker/scripts/emscripten.sh index 3f5e2c6ff1d..8b2b39ee162 100644 --- a/src/ci/docker/scripts/emscripten.sh +++ b/src/ci/docker/scripts/emscripten.sh @@ -20,5 +20,5 @@ exit 1 git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable cd /emsdk-portable -hide_output ./emsdk install 2.0.5 -./emsdk activate 2.0.5 +hide_output ./emsdk install 3.1.68 +./emsdk activate 3.1.68 -- cgit 1.4.1-3-g733a5 From b72dbd56caa4b5919bb1fc92fd915c9e9b4e952c Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Fri, 11 Oct 2024 09:39:06 +0300 Subject: move dummy commit logic into x86_64-gnu-llvm-18 Signed-off-by: onur-ozkan --- src/ci/docker/host-x86_64/mingw-check/Dockerfile | 12 ------------ src/ci/docker/scripts/x86_64-gnu-llvm.sh | 16 ++++++++++++++++ src/ci/github-actions/jobs.yml | 8 +++----- 3 files changed, 19 insertions(+), 17 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/host-x86_64/mingw-check/Dockerfile b/src/ci/docker/host-x86_64/mingw-check/Dockerfile index 467ca1dac67..0f8ebb987c3 100644 --- a/src/ci/docker/host-x86_64/mingw-check/Dockerfile +++ b/src/ci/docker/host-x86_64/mingw-check/Dockerfile @@ -47,18 +47,6 @@ ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1 # We disable optimized compiler built-ins because that requires a C toolchain for the target. # We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs. ENV SCRIPT \ - # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test covers the `rust.download-rustc=if-unchanged` logic. - # Here we are adding a dummy commit on compiler and running that test to ensure when there is a change on the compiler, - # we never download ci rustc with `rust.download-rustc=if-unchanged` option. - 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 python3 ../x.py test bootstrap -- core::builder::tests::ci_rustc_if_unchanged_logic && \ - # Revert the dummy commit - git reset --hard HEAD~1 && \ - python3 ../x.py check --stage 0 --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \ /scripts/check-default-config-profiles.sh && \ python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \ diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh index 98290f5a72c..dea38b6fd2a 100755 --- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh +++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh @@ -2,6 +2,22 @@ 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 src/tools/tidy diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 4bbebbc4697..8f49f623afa 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -85,9 +85,6 @@ envs: # it in each job definition. pr: - image: mingw-check - env: - # We are adding (temporarily) a dummy commit on the compiler - READ_ONLY_SRC: "0" <<: *job-linux-4c - image: mingw-check-tidy continue_on_error: true @@ -95,6 +92,8 @@ pr: - image: x86_64-gnu-llvm-18 env: ENABLE_GCC_CODEGEN: "1" + # We are adding (temporarily) a dummy commit on the compiler + READ_ONLY_SRC: "0" <<: *job-linux-16c - image: x86_64-gnu-tools <<: *job-linux-16c @@ -210,8 +209,6 @@ auto: <<: *job-linux-8c - image: mingw-check - env: - READ_ONLY_SRC: 0 <<: *job-linux-4c - image: test-various @@ -264,6 +261,7 @@ auto: - image: x86_64-gnu-llvm-18 env: RUST_BACKTRACE: 1 + READ_ONLY_SRC: "0" <<: *job-linux-8c - image: x86_64-gnu-nopt -- cgit 1.4.1-3-g733a5 From 5d178e1d4da25110e72b297caaef6489e920f04f Mon Sep 17 00:00:00 2001 From: c6c7 Date: Mon, 14 Oct 2024 12:38:49 -0400 Subject: Make fuchsia-test-runner.py compatible with new JSON output from llvm-readelf [A recent commit in LLVM](https://github.com/llvm/llvm-project/commit/ab930ee7cad8b8bf7968bb8d0c0d72524e2313c4) modified the JSON output of LLVM. The LLVM change renamed "Notes" to "NoteSections" and inserted a new "Notes" key nested under each "NoteSection". This change shores up exceptions around reading the JSON output of llvm-readelf and reads from "NoteSections" instead of the non-existent "Notes". --- src/ci/docker/scripts/fuchsia-test-runner.py | 42 ++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 11 deletions(-) (limited to 'src/ci/docker/scripts') diff --git a/src/ci/docker/scripts/fuchsia-test-runner.py b/src/ci/docker/scripts/fuchsia-test-runner.py index a5458b8645d..1aa9a4a1794 100755 --- a/src/ci/docker/scripts/fuchsia-test-runner.py +++ b/src/ci/docker/scripts/fuchsia-test-runner.py @@ -193,18 +193,38 @@ class TestEnvironment: stderr=subprocess.STDOUT, ) if process.returncode: - self.env_logger.error( - f"llvm-readelf failed for binary {binary} with output {process.stdout}" + e = f"llvm-readelf failed for binary {binary} with output {process.stdout}" + self.env_logger.error(e) + raise Exception(e) + + try: + elf_output = json.loads(process.stdout) + except Exception as e: + e.add_note(f"Failed to read JSON from llvm-readelf for binary {binary}") + e.add_note(f"stdout: {process.stdout}") + raise + + try: + note_sections = elf_output[0]["NoteSections"] + except Exception as e: + e.add_note( + f'Failed to read "NoteSections" from llvm-readelf for binary {binary}' ) - raise Exception(f"Unreadable build-id for binary {binary}") - data = json.loads(process.stdout) - if len(data) != 1: - raise Exception(f"Unreadable output from llvm-readelf for binary {binary}") - notes = data[0]["Notes"] - for note in notes: - note_section = note["NoteSection"] - if note_section["Name"] == ".note.gnu.build-id": - return note_section["Note"]["Build ID"] + e.add_note(f"elf_output: {elf_output}") + raise + + for entry in note_sections: + try: + note_section = entry["NoteSection"] + if note_section["Name"] == ".note.gnu.build-id": + return note_section["Notes"][0]["Build ID"] + except Exception as e: + e.add_note( + f'Failed to read ".note.gnu.build-id" from NoteSections \ + entry in llvm-readelf for binary {binary}' + ) + e.add_note(f"NoteSections: {note_sections}") + raise raise Exception(f"Build ID not found for binary {binary}") def generate_buildid_dir( -- cgit 1.4.1-3-g733a5