Skip to content

Commit 579c553

Browse files
committed
Speed up submodule checkouts for the tidy job
1 parent fb644e6 commit 579c553

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/ci/github-actions/jobs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ pr:
128128
<<: *job-linux-4c
129129
- name: mingw-check-tidy
130130
continue_on_error: true
131+
env:
132+
# These submodules are expensive to checkout, and they should not be needed for
133+
# tidy. This speeds up the PR CI job by ~2 minutes.
134+
SKIP_SUBMODULES: src/llvm-project,src/gcc
131135
<<: *job-linux-4c
132136
- name: x86_64-gnu-llvm-19
133137
env:

src/ci/scripts/checkout-submodules.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function fetch_github_commit_archive {
3737
}
3838

3939
#included="src/llvm-project src/doc/book src/doc/rust-by-example"
40-
included=""
40+
included="src/llvm-project src/gcc"
4141
modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)"
4242
modules=($modules)
4343
use_git=""
@@ -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)