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.
This commit is contained in:
Matthias Krüger 2025-06-09 10:20:53 +02:00 committed by GitHub
commit 5d0a3abaf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -129,6 +129,10 @@ pr:
- name: mingw-check-tidy
continue_on_error: true
free_disk: false
env:
# This submodule is expensive to checkout, and it should not be needed for
# tidy. This speeds up the PR CI job by ~1 minute.
SKIP_SUBMODULES: src/gcc
<<: *job-linux-4c
- name: x86_64-gnu-llvm-19
env:

View file

@ -55,7 +55,11 @@ for i in ${!modules[@]}; do
bg_pids[${i}]=$!
continue
else
# Submodule paths contained in SKIP_SUBMODULES (comma-separated list) will not be
# checked out.
if [ -z "${SKIP_SUBMODULES:-}" ] || [[ ! ",$SKIP_SUBMODULES," = *",$module,"* ]]; then
use_git="$use_git $module"
fi
fi
done
retry sh -c "git submodule deinit -f $use_git && \