ci: Allow running iwyu ci in worktree

This commit is contained in:
MarcoFalke 2026-01-29 11:22:45 +01:00
parent fab73e213d
commit fafdb8f635
No known key found for this signature in database

View File

@ -49,6 +49,19 @@ echo "=== BEGIN env ==="
env
echo "=== END env ==="
# The CI framework should be flexible where it is run from. For example, from
# a git-archive, a git-worktree, or a normal git repo.
# The iwyu task requires a working git repo, which may not always be
# available, so initialize one with force.
if [[ "${RUN_IWYU}" == true ]]; then
mv .git .git_ci_backup || true
git init
git add ./src # the git diff command used later for iwyu only cares about ./src
git config user.email "ci@ci"
git config user.name "CI"
git commit -m "dummy CI ./src init for IWYU"
fi
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/
if [ ! -d "$DIR_FUZZ_IN" ]; then