Skip to content

Commit b2284b9

Browse files
authored
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
Run the tools builder on all PRs Previously, it would only run on changes to subtrees, submodules, or select directories. That made it so that changes to the compiler that broke tools would only be detected on a full bors merge. This makes it so the tools builder runs by default, making it easier to catch breaking changes to clippy (which was the most affected). r? ``@Mark-Simulacrum`` cc ``@pietroalbini`` ``@flip1995`` ``@m-ou-se``
2 parents 4b859c3 + 9dfec5d commit b2284b9

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ jobs:
6060
env: {}
6161
- name: x86_64-gnu-tools
6262
tidy: false
63-
env:
64-
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
6563
os: ubuntu-20.04-xl
64+
env: {}
6665
timeout-minutes: 600
6766
runs-on: "${{ matrix.os }}"
6867
steps:

src/ci/github-actions/ci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ jobs:
307307
- name: x86_64-gnu-tools
308308
<<: *job-linux-xl
309309
tidy: false
310-
env:
311-
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
312310

313311
auto:
314312
permissions:

src/ci/scripts/should-skip-this.sh

+1-36
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,11 @@
11
#!/bin/bash
2-
# Set the SKIP_JOB environment variable if this job is supposed to only run
3-
# when submodules are updated and they were not. The following time consuming
4-
# tasks will be skipped when the environment variable is present.
2+
# Set the SKIP_JOB environment variable if this job is not supposed to run on the current builder.
53

64
set -euo pipefail
75
IFS=$'\n\t'
86

97
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
108

11-
if [[ -n "${CI_ONLY_WHEN_SUBMODULES_CHANGED-}" ]]; then
12-
git fetch "https://github.com/$GITHUB_REPOSITORY" "$GITHUB_BASE_REF"
13-
BASE_COMMIT="$(git merge-base FETCH_HEAD HEAD)"
14-
15-
echo "Searching for toolstate changes between $BASE_COMMIT and $(git rev-parse HEAD)"
16-
17-
if git diff "$BASE_COMMIT" | grep --quiet "^index .* 160000"; then
18-
# Submodules pseudo-files inside git have the 160000 permissions, so when
19-
# those files are present in the diff a submodule was updated.
20-
echo "Submodules were updated"
21-
elif ! (git diff --quiet "$BASE_COMMIT" -- \
22-
src/tools/clippy src/tools/rustfmt src/tools/miri \
23-
library/std/src/sys); then
24-
# There is not an easy blanket search for subtrees. For now, manually list
25-
# the subtrees.
26-
# Also run this when the platform-specific parts of std change, in case
27-
# that breaks Miri.
28-
echo "Tool subtrees were updated"
29-
elif ! (git diff --quiet "$BASE_COMMIT" -- \
30-
tests/rustdoc-gui \
31-
src/librustdoc \
32-
src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile \
33-
src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version \
34-
src/tools/rustdoc-gui); then
35-
# There was a change in either rustdoc or in its GUI tests.
36-
echo "Rustdoc was updated"
37-
else
38-
echo "Not executing this job since no submodules nor subtrees were updated"
39-
ciCommandSetEnv SKIP_JOB 1
40-
exit 0
41-
fi
42-
fi
43-
449
if [[ -n "${CI_ONLY_WHEN_CHANNEL-}" ]]; then
4510
if [[ "${CI_ONLY_WHEN_CHANNEL}" = "$(cat src/ci/channel)" ]]; then
4611
echo "The channel is the expected one"

0 commit comments

Comments
 (0)