Skip to content

Commit 5d0a3ab

Browse files
authored
Rollup merge of #142211 - Kobzol:try-fast-submodule-checkout, r=Mark-Simulacrum
Do not checkout GCC submodule for the tidy job This is not a fully general solution, but the GCC submodule checkout is so slow that I think it's worth it to special-case it. This brings down the time required to checkout submodules from ~1.5 minute to ~0.5 minute.
2 parents 9e25120 + cb99801 commit 5d0a3ab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/ci/github-actions/jobs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ pr:
129129
- name: mingw-check-tidy
130130
continue_on_error: true
131131
free_disk: false
132+
env:
133+
# This submodule is expensive to checkout, and it should not be needed for
134+
# tidy. This speeds up the PR CI job by ~1 minute.
135+
SKIP_SUBMODULES: src/gcc
132136
<<: *job-linux-4c
133137
- name: x86_64-gnu-llvm-19
134138
env:

src/ci/scripts/checkout-submodules.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ for i in ${!modules[@]}; do
5555
bg_pids[${i}]=$!
5656
continue
5757
else
58+
# Submodule paths contained in SKIP_SUBMODULES (comma-separated list) will not be
59+
# checked out.
60+
if [ -z "${SKIP_SUBMODULES:-}" ] || [[ ! ",$SKIP_SUBMODULES," = *",$module,"* ]]; then
5861
use_git="$use_git $module"
62+
fi
5963
fi
6064
done
6165
retry sh -c "git submodule deinit -f $use_git && \

0 commit comments

Comments
 (0)