From 870e49cd46e94e1fc775f7145a87f7cc7a7be2c0 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 22 Sep 2025 16:00:04 +0000 Subject: [PATCH 1/3] [CI] Download lit timing files This patch downloads the lit timing files from our GCS bucket into the local directory so that lit can execute them in a smarter order (biggest first to take advantage of parallelism). --- .github/workflows/premerge.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml index 63ab4a8356971..ec96ccb86a86c 100644 --- a/.github/workflows/premerge.yaml +++ b/.github/workflows/premerge.yaml @@ -68,6 +68,7 @@ jobs: mkdir artifacts SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server + python .ci/cache_lit_timing_files.py download ./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}" "${enable_cir}" - name: Upload Artifacts # In some cases, Github will fail to upload the artifact. We want to @@ -122,7 +123,7 @@ jobs: call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64 # See the comments above in the Linux job for why we define each of # these environment variables. - bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\" \"${{ steps.vars.outputs.windows-runtimes }}\" \"${{ steps.vars.outputs.windows-runtimes-check-targets }}\"" + bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; python .ci/cache_lit_timing_files.py download; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\" \"${{ steps.vars.outputs.windows-runtimes }}\" \"${{ steps.vars.outputs.windows-runtimes-check-targets }}\"" - name: Upload Artifacts # In some cases, Github will fail to upload the artifact. We want to # continue anyways as a failed artifact upload is an infra failure, not From fde19797322352153463e9a01e76735d4c97788c Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 22 Sep 2025 16:11:02 +0000 Subject: [PATCH 2/3] fix --- .ci/utils.sh | 4 ++++ .github/workflows/premerge.yaml | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/utils.sh b/.ci/utils.sh index 2a3d2426b630a..c2dde4768ca19 100644 --- a/.ci/utils.sh +++ b/.ci/utils.sh @@ -52,3 +52,7 @@ function start-group { echo "Starting $groupname" fi } + +if [[ "$GITHUB_ACTIONS" != "" ]]; then + python .ci/cache_lit_timing_files.py download +fi diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml index ec96ccb86a86c..63ab4a8356971 100644 --- a/.github/workflows/premerge.yaml +++ b/.github/workflows/premerge.yaml @@ -68,7 +68,6 @@ jobs: mkdir artifacts SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server - python .ci/cache_lit_timing_files.py download ./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}" "${enable_cir}" - name: Upload Artifacts # In some cases, Github will fail to upload the artifact. We want to @@ -123,7 +122,7 @@ jobs: call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64 # See the comments above in the Linux job for why we define each of # these environment variables. - bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; python .ci/cache_lit_timing_files.py download; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\" \"${{ steps.vars.outputs.windows-runtimes }}\" \"${{ steps.vars.outputs.windows-runtimes-check-targets }}\"" + bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\" \"${{ steps.vars.outputs.windows-runtimes }}\" \"${{ steps.vars.outputs.windows-runtimes-check-targets }}\"" - name: Upload Artifacts # In some cases, Github will fail to upload the artifact. We want to # continue anyways as a failed artifact upload is an infra failure, not From d4b7636abcca139f8a5fc4ac8a1da1489e19b378 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 22 Sep 2025 16:14:49 +0000 Subject: [PATCH 3/3] fix --- .ci/monolithic-linux.sh | 2 -- .ci/utils.sh | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 5abb8d72df028..c8f331204bd49 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -32,8 +32,6 @@ enable_cir="${6}" lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" start-group "CMake" -export PIP_BREAK_SYSTEM_PACKAGES=1 -pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt # Set the system llvm-symbolizer as preferred. export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer` diff --git a/.ci/utils.sh b/.ci/utils.sh index c2dde4768ca19..87afbbd6cdd31 100644 --- a/.ci/utils.sh +++ b/.ci/utils.sh @@ -53,6 +53,9 @@ function start-group { fi } +export PIP_BREAK_SYSTEM_PACKAGES=1 +pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt + if [[ "$GITHUB_ACTIONS" != "" ]]; then python .ci/cache_lit_timing_files.py download fi