about summary refs log tree commit diff
diff options
context:
space:
mode:
authornils <48135649+Nilstrieb@users.noreply.github.com>2022-12-23 18:02:15 +0100
committerGitHub <noreply@github.com>2022-12-23 18:02:15 +0100
commit9192874b29b2f5738f254d8080f42b2632c920e5 (patch)
tree45686fc6ca0fdf6eec53fdb9d0c12db2ade6dd8d
parenta8000516a6fa1415c3831f06d17b8734a1aa9ed7 (diff)
parent4566db335902599083bc622c82254f88870c6488 (diff)
downloadrust-9192874b29b2f5738f254d8080f42b2632c920e5.tar.gz
rust-9192874b29b2f5738f254d8080f42b2632c920e5.zip
Rollup merge of #106048 - fee1-dead-contrib:tidy-ci-continuation, r=jyn514
Run `tidy` in its own job in PR CI

This duplicates mingw-check into two jobs where one job runs `tidy` only while the other job does not. The tidy job will not cancel other jobs on failure.
-rw-r--r--.github/workflows/ci.yml8
-rw-r--r--src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile36
-rw-r--r--src/ci/docker/host-x86_64/mingw-check/Dockerfile1
-rw-r--r--src/ci/github-actions/ci.yml10
4 files changed, 53 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2b6e96b467e..23d3e71424b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,16 +41,24 @@ jobs:
       TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
       CACHE_DOMAIN: ci-caches.rust-lang.org
     if: "github.event_name == 'pull_request'"
+    continue-on-error: "${{ matrix.tidy }}"
     strategy:
       matrix:
         include:
           - name: mingw-check
+            tidy: false
+            os: ubuntu-20.04-xl
+            env: {}
+          - name: mingw-check-tidy
+            tidy: true
             os: ubuntu-20.04-xl
             env: {}
           - name: x86_64-gnu-llvm-13
+            tidy: false
             os: ubuntu-20.04-xl
             env: {}
           - name: x86_64-gnu-tools
+            tidy: false
             env:
               CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
             os: ubuntu-20.04-xl
diff --git a/src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile b/src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile
new file mode 100644
index 00000000000..78fee152eb9
--- /dev/null
+++ b/src/ci/docker/host-x86_64/mingw-check-tidy/Dockerfile
@@ -0,0 +1,36 @@
+FROM ubuntu:18.04
+# FIXME: when bumping the version, remove the Python 3.6-specific changes in
+# the reuse-requirements.in file, regenerate reuse-requirements.txt and remove
+# this comment.
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+  g++ \
+  make \
+  ninja-build \
+  file \
+  curl \
+  ca-certificates \
+  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/sccache.sh /scripts/
+RUN sh /scripts/sccache.sh
+
+COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
+RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt
+
+COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
+COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
+
+ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
+ENV SCRIPT python3 ../x.py test --stage 0 src/tools/tidy
diff --git a/src/ci/docker/host-x86_64/mingw-check/Dockerfile b/src/ci/docker/host-x86_64/mingw-check/Dockerfile
index 9e2568af13f..adf6bb4b377 100644
--- a/src/ci/docker/host-x86_64/mingw-check/Dockerfile
+++ b/src/ci/docker/host-x86_64/mingw-check/Dockerfile
@@ -40,7 +40,6 @@ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
 
 ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
-           python3 ../x.py test --stage 0 src/tools/tidy && \
            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu --all-targets && \
            python3 ../x.py build --stage 0 src/tools/build-manifest && \
            python3 ../x.py test --stage 0 src/tools/compiletest && \
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index d1ba46ad30d..d33396dcc80 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -287,19 +287,27 @@ jobs:
     env:
       <<: [*shared-ci-variables, *public-variables]
     if: github.event_name == 'pull_request'
+    continue-on-error: ${{ matrix.tidy }}
     strategy:
       matrix:
         include:
           - name: mingw-check
             <<: *job-linux-xl
+            tidy: false
+
+          - name: mingw-check-tidy
+            <<: *job-linux-xl
+            tidy: true
 
           - name: x86_64-gnu-llvm-13
             <<: *job-linux-xl
+            tidy: false
 
           - name: x86_64-gnu-tools
+            <<: *job-linux-xl
+            tidy: false
             env:
               CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
-            <<: *job-linux-xl
 
   auto:
     permissions: