diff options
author | MacroFake <falke.marco@gmail.com> | 2022-04-29 15:07:11 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-04-30 09:23:56 +0200 |
commit | fa847ed2f698a8a999352aeed63baf60b094e662 (patch) | |
tree | 539158676ef818947159ae1add0ce6e42f1c055d /ci/test/04_install.sh | |
parent | 26296eba3dc34043b025bda167386c47693705b5 (diff) |
ci: Clone iwyu only if missing
Diffstat (limited to 'ci/test/04_install.sh')
-rwxr-xr-x | ci/test/04_install.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 227bdf3319..453a34ca78 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -112,10 +112,13 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then fi if [[ "${RUN_TIDY}" == "true" ]]; then - CI_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/iwyu/build/" - CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${BASE_SCRATCH_DIR}/iwyu/include-what-you-use" - CI_EXEC "cd ${BASE_SCRATCH_DIR}/iwyu/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use" - CI_EXEC "cd ${BASE_SCRATCH_DIR}/iwyu/build && make install $MAKEJOBS" + export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu" + if [ ! -d "${DIR_IWYU}" ]; then + CI_EXEC "mkdir -p ${DIR_IWYU}/build/" + CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${DIR_IWYU}/include-what-you-use" + CI_EXEC "cd ${DIR_IWYU}/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use" + CI_EXEC "cd ${DIR_IWYU}/build && make install $MAKEJOBS" + fi fi if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then |