diff options
| author | Aiden Grossman <aidengrossman@google.com> | 2025-11-18 09:31:55 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-18 09:31:55 -0800 |
| commit | b53371210fcf1f23d1f87e5727fdf1e9aefa674f (patch) | |
| tree | 448f1e8611e0594537d5dfea457d76b38890e35d | |
| parent | 58cffea94a31e52d6492ce7103e04c6b073dee16 (diff) | |
[CI] Only run normal check targets if requested (#168412)
When building just the runtimes (eg a patch only touches compiler-rt),
we do not actually run any normal check targets. This ends up causing an
empty ninja invocation, which builds more targets than necessary. Gate
the ninja build for normal check-* targets under an if statement to fix
this.
| -rwxr-xr-x | .ci/monolithic-linux.sh | 8 | ||||
| -rwxr-xr-x | .ci/monolithic-windows.sh | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 4a8418d7baa8..ca619aa7e98a 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -64,9 +64,11 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ start-group "ninja" -# Targets are not escaped as they are passed as separate arguments. -ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log -cp ${BUILD_DIR}/.ninja_log ninja.ninja_log +if [[ "${targets}" != "" ]]; then + # Targets are not escaped as they are passed as separate arguments. + ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log + cp ${BUILD_DIR}/.ninja_log ninja.ninja_log +fi if [[ "${runtime_targets}" != "" ]]; then start-group "ninja Runtimes" diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh index 7b926b87f362..99e7758ce8d7 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -51,9 +51,11 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ start-group "ninja" -# Targets are not escaped as they are passed as separate arguments. -ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log -cp ${BUILD_DIR}/.ninja_log ninja.ninja_log +if [[ "${targets}" != "" ]]; then + # Targets are not escaped as they are passed as separate arguments. + ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log + cp ${BUILD_DIR}/.ninja_log ninja.ninja_log +fi if [[ "${runtimes_targets}" != "" ]]; then start-group "ninja runtimes" |
