From 6671d9b92a0bfd70b42e6332c06cd3eeecb52b32 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 2 Jul 2025 08:43:10 +0000 Subject: Rename mingw-check-tidy to tidy --- .github/workflows/ghcr.yml | 4 +- src/ci/citool/tests/jobs.rs | 2 +- src/ci/citool/tests/test-jobs.yml | 2 +- src/ci/docker/host-x86_64/pr-check-tidy/Dockerfile | 48 ---------------------- .../host-x86_64/pr-check-tidy/eslint.version | 1 - src/ci/docker/host-x86_64/tidy/Dockerfile | 48 ++++++++++++++++++++++ src/ci/docker/host-x86_64/tidy/eslint.version | 1 + src/ci/github-actions/jobs.yml | 4 +- src/doc/rustc-dev-guide/src/tests/ci.md | 2 +- src/tools/tidy/src/rustdoc_js.rs | 2 +- 10 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 src/ci/docker/host-x86_64/pr-check-tidy/Dockerfile delete mode 100644 src/ci/docker/host-x86_64/pr-check-tidy/eslint.version create mode 100644 src/ci/docker/host-x86_64/tidy/Dockerfile create mode 100644 src/ci/docker/host-x86_64/tidy/eslint.version diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index ffe8ae427aa..6d050d98cb2 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -53,9 +53,9 @@ jobs: run: | # List of DockerHub images to mirror to ghcr.io images=( - # Mirrored because used by pr-check-tidy, which doesn't cache Docker images + # Mirrored because used by the tidy job, which doesn't cache Docker images "ubuntu:22.04" - # Mirrored because used by all linux CI jobs, including pr-check-tidy + # Mirrored because used by all linux CI jobs, including tidy "moby/buildkit:buildx-stable-1" # Mirrored because used when CI is running inside a Docker container "alpine:3.4" diff --git a/src/ci/citool/tests/jobs.rs b/src/ci/citool/tests/jobs.rs index 3166ef287ea..dbaf13d4f42 100644 --- a/src/ci/citool/tests/jobs.rs +++ b/src/ci/citool/tests/jobs.rs @@ -40,7 +40,7 @@ try-job: dist-i686-msvc"#, fn pr_jobs() { let stdout = get_matrix("pull_request", "commit", "refs/heads/pr/1234"); insta::assert_snapshot!(stdout, @r#" - jobs=[{"name":"pr-check-1","full_name":"PR - pr-check-1","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"pr-check-2","full_name":"PR - pr-check-2","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"pr-check-tidy","full_name":"PR - pr-check-tidy","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"continue_on_error":true,"free_disk":true,"doc_url":"https://foo.bar"}] + jobs=[{"name":"pr-check-1","full_name":"PR - pr-check-1","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"pr-check-2","full_name":"PR - pr-check-2","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"free_disk":true},{"name":"tidy","full_name":"PR - tidy","os":"ubuntu-24.04","env":{"PR_CI_JOB":1},"continue_on_error":true,"free_disk":true,"doc_url":"https://foo.bar"}] run_type=pr "#); } diff --git a/src/ci/citool/tests/test-jobs.yml b/src/ci/citool/tests/test-jobs.yml index 59042dcec74..b44c47c5c0d 100644 --- a/src/ci/citool/tests/test-jobs.yml +++ b/src/ci/citool/tests/test-jobs.yml @@ -68,7 +68,7 @@ pr: <<: *job-linux-4c - name: pr-check-2 <<: *job-linux-4c - - name: pr-check-tidy + - name: tidy continue_on_error: true doc_url: https://foo.bar <<: *job-linux-4c diff --git a/src/ci/docker/host-x86_64/pr-check-tidy/Dockerfile b/src/ci/docker/host-x86_64/pr-check-tidy/Dockerfile deleted file mode 100644 index 207c91eb7fe..00000000000 --- a/src/ci/docker/host-x86_64/pr-check-tidy/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -# We use the ghcr base image because ghcr doesn't have a rate limit -# and the pr-check-tidy job doesn't cache docker images in CI. -FROM ghcr.io/rust-lang/ubuntu:22.04 - -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python2.7 \ - python3 \ - python3-pip \ - python3-pkg-resources \ - git \ - cmake \ - sudo \ - gdb \ - xz-utils \ - libssl-dev \ - pkg-config \ - mingw-w64 \ - && rm -rf /var/lib/apt/lists/* - -COPY scripts/nodejs.sh /scripts/ -RUN sh /scripts/nodejs.sh /node -ENV PATH="/node/bin:${PATH}" - -# Install eslint -COPY host-x86_64/pr-check-tidy/eslint.version /tmp/ - -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh - -COPY host-x86_64/pr-check-1/reuse-requirements.txt /tmp/ -RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \ - && pip3 install virtualenv - -COPY host-x86_64/pr-check-1/validate-toolstate.sh /scripts/ - -RUN bash -c 'npm install -g eslint@$(cat /tmp/eslint.version)' - -# NOTE: intentionally uses python2 for x.py so we can test it still works. -# validate-toolstate only runs in our CI, so it's ok for it to only support python3. -ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 \ - src/tools/tidy tidyselftest --extra-checks=py,cpp diff --git a/src/ci/docker/host-x86_64/pr-check-tidy/eslint.version b/src/ci/docker/host-x86_64/pr-check-tidy/eslint.version deleted file mode 100644 index 1acea15afd6..00000000000 --- a/src/ci/docker/host-x86_64/pr-check-tidy/eslint.version +++ /dev/null @@ -1 +0,0 @@ -8.6.0 \ No newline at end of file diff --git a/src/ci/docker/host-x86_64/tidy/Dockerfile b/src/ci/docker/host-x86_64/tidy/Dockerfile new file mode 100644 index 00000000000..dbb950cbe0c --- /dev/null +++ b/src/ci/docker/host-x86_64/tidy/Dockerfile @@ -0,0 +1,48 @@ +# We use the ghcr base image because ghcr doesn't have a rate limit +# and the tidy job doesn't cache docker images in CI. +FROM ghcr.io/rust-lang/ubuntu:22.04 + +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++ \ + make \ + ninja-build \ + file \ + curl \ + ca-certificates \ + python2.7 \ + python3 \ + python3-pip \ + python3-pkg-resources \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + libssl-dev \ + pkg-config \ + mingw-w64 \ + && rm -rf /var/lib/apt/lists/* + +COPY scripts/nodejs.sh /scripts/ +RUN sh /scripts/nodejs.sh /node +ENV PATH="/node/bin:${PATH}" + +# Install eslint +COPY host-x86_64/tidy/eslint.version /tmp/ + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +COPY host-x86_64/pr-check-1/reuse-requirements.txt /tmp/ +RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \ + && pip3 install virtualenv + +COPY host-x86_64/pr-check-1/validate-toolstate.sh /scripts/ + +RUN bash -c 'npm install -g eslint@$(cat /tmp/eslint.version)' + +# NOTE: intentionally uses python2 for x.py so we can test it still works. +# validate-toolstate only runs in our CI, so it's ok for it to only support python3. +ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 \ + src/tools/tidy tidyselftest --extra-checks=py,cpp diff --git a/src/ci/docker/host-x86_64/tidy/eslint.version b/src/ci/docker/host-x86_64/tidy/eslint.version new file mode 100644 index 00000000000..1acea15afd6 --- /dev/null +++ b/src/ci/docker/host-x86_64/tidy/eslint.version @@ -0,0 +1 @@ +8.6.0 \ No newline at end of file diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 96b835f6b9b..8b78ffd2db9 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -126,7 +126,7 @@ pr: <<: *job-linux-4c - name: pr-check-2 <<: *job-linux-4c - - name: pr-check-tidy + - name: tidy continue_on_error: true free_disk: false env: @@ -318,7 +318,7 @@ auto: - name: pr-check-2 <<: *job-linux-4c - - name: pr-check-tidy + - name: tidy free_disk: false <<: *job-linux-4c diff --git a/src/doc/rustc-dev-guide/src/tests/ci.md b/src/doc/rustc-dev-guide/src/tests/ci.md index 1ed790ba0c8..eba101a1398 100644 --- a/src/doc/rustc-dev-guide/src/tests/ci.md +++ b/src/doc/rustc-dev-guide/src/tests/ci.md @@ -67,7 +67,7 @@ kinds of builds (sets of jobs). After each push to a pull request, a set of `pr` jobs are executed. Currently, these execute the `x86_64-gnu-llvm-X`, `x86_64-gnu-tools`, `pr-check-1`, `pr-check-2` -and `pr-check-tidy` jobs, all running on Linux. These execute a relatively short +and `tidy` jobs, all running on Linux. These execute a relatively short (~40 minutes) and lightweight test suite that should catch common issues. More specifically, they run a set of lints, they try to perform a cross-compile check build to Windows mingw (without producing any artifacts) and they test the diff --git a/src/tools/tidy/src/rustdoc_js.rs b/src/tools/tidy/src/rustdoc_js.rs index e3907416431..5e924544f0d 100644 --- a/src/tools/tidy/src/rustdoc_js.rs +++ b/src/tools/tidy/src/rustdoc_js.rs @@ -52,7 +52,7 @@ fn get_eslint_version() -> Option { } pub fn check(librustdoc_path: &Path, tools_path: &Path, src_path: &Path, bad: &mut bool) { - let eslint_version_path = src_path.join("ci/docker/host-x86_64/pr-check-tidy/eslint.version"); + let eslint_version_path = src_path.join("ci/docker/host-x86_64/tidy/eslint.version"); let eslint_version = match std::fs::read_to_string(&eslint_version_path) { Ok(version) => version.trim().to_string(), Err(error) => { -- cgit 1.4.1-3-g733a5