From 64c9ab317af4878bad88e040f2d810093c41aff9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:12:44 +0000 Subject: [PATCH 1/7] Initial plan From b419d0a226e1af284675aa969a270356a79a1c90 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:16:21 +0000 Subject: [PATCH 2/7] Retry Bazelisk setup in macOS build_and_test --- .github/workflows/ci_macos.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 50c23e9b..4a156b9d 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -15,11 +15,27 @@ jobs: uses: actions/checkout@v6 # Install Bazelisk (recommended Bazel launcher) - - name: Setup Bazelisk + - name: Setup Bazelisk (attempt 1) + id: setup_bazelisk_1 + continue-on-error: true + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: "1.29.0" + + - name: Setup Bazelisk (attempt 2) + id: setup_bazelisk_2 + if: steps.setup_bazelisk_1.outcome == 'failure' + continue-on-error: true uses: bazel-contrib/setup-bazel@0.19.0 with: bazelisk-version: "1.29.0" + - name: Ensure Bazelisk setup succeeded + if: steps.setup_bazelisk_1.outcome == 'failure' && steps.setup_bazelisk_2.outcome == 'failure' + run: | + echo "Bazelisk setup failed after 2 attempts." + exit 1 + # Install Doxygen, to generate documentation - name: Install Doxygen run: brew install doxygen From 98c4e692cc1ebd1cb47e9cac803eac875b39390a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:19:30 +0000 Subject: [PATCH 3/7] Retry macOS Bazelisk setup in build_and_test --- .github/workflows/ci_macos.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 4a156b9d..9e94c131 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -24,17 +24,14 @@ jobs: - name: Setup Bazelisk (attempt 2) id: setup_bazelisk_2 - if: steps.setup_bazelisk_1.outcome == 'failure' - continue-on-error: true + if: steps.setup_bazelisk_1.outcome != 'success' + continue-on-error: false uses: bazel-contrib/setup-bazel@0.19.0 with: bazelisk-version: "1.29.0" - - name: Ensure Bazelisk setup succeeded - if: steps.setup_bazelisk_1.outcome == 'failure' && steps.setup_bazelisk_2.outcome == 'failure' - run: | - echo "Bazelisk setup failed after 2 attempts." - exit 1 + - name: Verify Bazelisk installation + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) # Install Doxygen, to generate documentation - name: Install Doxygen From f8d69805ef42a700a23de74d16704eddfb465dd7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:25:41 +0000 Subject: [PATCH 4/7] Apply Bazelisk setup retry to all CI jobs --- .github/workflows/ci_linux.yml | 45 +++++++++++++++++++++++++++++++--- .github/workflows/ci_macos.yml | 15 +++++++++++- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 65764b21..1ce729cf 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -27,11 +27,24 @@ jobs: swap-storage: false # 3️⃣ Install Bazelisk (recommended Bazel launcher) - - name: Setup Bazelisk + - name: Setup Bazelisk (attempt 1) + id: setup_bazelisk_1 + continue-on-error: true uses: bazel-contrib/setup-bazel@0.19.0 with: bazelisk-version: "1.29.0" + - name: Setup Bazelisk (attempt 2) + id: setup_bazelisk_2 + if: steps.setup_bazelisk_1.outcome != 'success' + continue-on-error: false + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: "1.29.0" + + - name: Verify Bazelisk installation + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + # 4️⃣ (Optional) Install Doxygen for documentation generation - name: Install Doxygen run: sudo apt-get update && sudo apt-get install -y doxygen @@ -86,11 +99,24 @@ jobs: large-packages: false swap-storage: false - - name: Setup Bazelisk + - name: Setup Bazelisk (attempt 1) + id: setup_bazelisk_1 + continue-on-error: true uses: bazel-contrib/setup-bazel@0.19.0 with: bazelisk-version: "1.29.0" + - name: Setup Bazelisk (attempt 2) + id: setup_bazelisk_2 + if: steps.setup_bazelisk_1.outcome != 'success' + continue-on-error: false + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: "1.29.0" + + - name: Verify Bazelisk installation + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Prefetch external repos run: | max=3 @@ -134,11 +160,24 @@ jobs: large-packages: false swap-storage: false - - name: Setup Bazelisk + - name: Setup Bazelisk (attempt 1) + id: setup_bazelisk_1 + continue-on-error: true uses: bazel-contrib/setup-bazel@0.19.0 with: bazelisk-version: "1.29.0" + - name: Setup Bazelisk (attempt 2) + id: setup_bazelisk_2 + if: steps.setup_bazelisk_1.outcome != 'success' + continue-on-error: false + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: "1.29.0" + + - name: Verify Bazelisk installation + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Prefetch external repos run: | max=3 diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 9e94c131..2781f2c3 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -77,11 +77,24 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - - name: Setup Bazelisk + - name: Setup Bazelisk (attempt 1) + id: setup_bazelisk_1 + continue-on-error: true + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: "1.29.0" + + - name: Setup Bazelisk (attempt 2) + id: setup_bazelisk_2 + if: steps.setup_bazelisk_1.outcome != 'success' + continue-on-error: false uses: bazel-contrib/setup-bazel@0.19.0 with: bazelisk-version: "1.29.0" + - name: Verify Bazelisk installation + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Prefetch external repos run: | max=3 From f1b55af5f9d17b793a45b46709561c44623d8f61 Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Fri, 24 Jul 2026 10:29:20 +0200 Subject: [PATCH 5/7] Extract shared Bazelisk setup into a composite action Deduplicate the retry-and-verify Bazelisk install across CI workflows so version and retry policy live in one place. Co-authored-by: Cursor --- .github/actions/setup-bazelisk/action.yml | 28 +++++++++++ .github/workflows/ci_linux.yml | 57 +++-------------------- .github/workflows/ci_macos.yml | 38 ++------------- .github/workflows/ci_wasm.yml | 4 +- .github/workflows/ci_windows.yml | 4 +- 5 files changed, 40 insertions(+), 91 deletions(-) create mode 100644 .github/actions/setup-bazelisk/action.yml diff --git a/.github/actions/setup-bazelisk/action.yml b/.github/actions/setup-bazelisk/action.yml new file mode 100644 index 00000000..ffc3f486 --- /dev/null +++ b/.github/actions/setup-bazelisk/action.yml @@ -0,0 +1,28 @@ +name: Setup Bazelisk +description: Install Bazelisk with one retry, then verify it is on PATH +inputs: + bazelisk-version: + description: Bazelisk version to install + required: false + default: "1.29.0" +runs: + using: composite + steps: + - name: Setup Bazelisk (attempt 1) + id: setup_bazelisk_1 + continue-on-error: true + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: ${{ inputs.bazelisk-version }} + + - name: Setup Bazelisk (attempt 2) + id: setup_bazelisk_2 + if: steps.setup_bazelisk_1.outcome != 'success' + continue-on-error: false + uses: bazel-contrib/setup-bazel@0.19.0 + with: + bazelisk-version: ${{ inputs.bazelisk-version }} + + - name: Verify Bazelisk installation + shell: bash + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 1ce729cf..2c01d16c 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -27,23 +27,8 @@ jobs: swap-storage: false # 3️⃣ Install Bazelisk (recommended Bazel launcher) - - name: Setup Bazelisk (attempt 1) - id: setup_bazelisk_1 - continue-on-error: true - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Setup Bazelisk (attempt 2) - id: setup_bazelisk_2 - if: steps.setup_bazelisk_1.outcome != 'success' - continue-on-error: false - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Verify Bazelisk installation - run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Setup Bazelisk + uses: ./.github/actions/setup-bazelisk # 4️⃣ (Optional) Install Doxygen for documentation generation - name: Install Doxygen @@ -99,23 +84,8 @@ jobs: large-packages: false swap-storage: false - - name: Setup Bazelisk (attempt 1) - id: setup_bazelisk_1 - continue-on-error: true - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Setup Bazelisk (attempt 2) - id: setup_bazelisk_2 - if: steps.setup_bazelisk_1.outcome != 'success' - continue-on-error: false - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Verify Bazelisk installation - run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Setup Bazelisk + uses: ./.github/actions/setup-bazelisk - name: Prefetch external repos run: | @@ -160,23 +130,8 @@ jobs: large-packages: false swap-storage: false - - name: Setup Bazelisk (attempt 1) - id: setup_bazelisk_1 - continue-on-error: true - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Setup Bazelisk (attempt 2) - id: setup_bazelisk_2 - if: steps.setup_bazelisk_1.outcome != 'success' - continue-on-error: false - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Verify Bazelisk installation - run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Setup Bazelisk + uses: ./.github/actions/setup-bazelisk - name: Prefetch external repos run: | diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 2781f2c3..e1499ed6 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -15,23 +15,8 @@ jobs: uses: actions/checkout@v6 # Install Bazelisk (recommended Bazel launcher) - - name: Setup Bazelisk (attempt 1) - id: setup_bazelisk_1 - continue-on-error: true - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Setup Bazelisk (attempt 2) - id: setup_bazelisk_2 - if: steps.setup_bazelisk_1.outcome != 'success' - continue-on-error: false - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Verify Bazelisk installation - run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Setup Bazelisk + uses: ./.github/actions/setup-bazelisk # Install Doxygen, to generate documentation - name: Install Doxygen @@ -77,23 +62,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - - name: Setup Bazelisk (attempt 1) - id: setup_bazelisk_1 - continue-on-error: true - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Setup Bazelisk (attempt 2) - id: setup_bazelisk_2 - if: steps.setup_bazelisk_1.outcome != 'success' - continue-on-error: false - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" - - - name: Verify Bazelisk installation - run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + - name: Setup Bazelisk + uses: ./.github/actions/setup-bazelisk - name: Prefetch external repos run: | diff --git a/.github/workflows/ci_wasm.yml b/.github/workflows/ci_wasm.yml index 6a2b8871..7d32e4f0 100644 --- a/.github/workflows/ci_wasm.yml +++ b/.github/workflows/ci_wasm.yml @@ -30,9 +30,7 @@ jobs: # 3️⃣ Install Bazelisk (recommended Bazel launcher) - name: Setup Bazelisk - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" + uses: ./.github/actions/setup-bazelisk # 4️⃣ Prefetch emsdk / toolchain archives (retry transient network timeouts) - name: Prefetch external repos diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 00421cab..baea72d1 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -16,9 +16,7 @@ jobs: # Install Bazelisk (recommended Bazel launcher) - name: Setup Bazelisk - uses: bazel-contrib/setup-bazel@0.19.0 - with: - bazelisk-version: "1.29.0" + uses: ./.github/actions/setup-bazelisk # Warm external deps (emsdk, LLVM, …); retry transient network fetch failures - name: Prefetch external repos From d2311e2fa7ba415573296882a5ec7a686455598e Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Fri, 24 Jul 2026 14:18:14 +0200 Subject: [PATCH 6/7] Verify Bazelisk with pwsh in the shared setup action Avoid a Bash-only dependency on Windows runners while keeping one composite action for all CI platforms. Co-authored-by: Cursor --- .github/actions/setup-bazelisk/action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-bazelisk/action.yml b/.github/actions/setup-bazelisk/action.yml index ffc3f486..7abb36bd 100644 --- a/.github/actions/setup-bazelisk/action.yml +++ b/.github/actions/setup-bazelisk/action.yml @@ -23,6 +23,13 @@ runs: with: bazelisk-version: ${{ inputs.bazelisk-version }} + # pwsh is available on all GitHub-hosted runners (Linux/macOS/Windows) and + # matches the Windows CI job's shell, so we avoid a Bash-only dependency. - name: Verify Bazelisk installation - shell: bash - run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + shell: pwsh + run: | + bazelisk version + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." + exit 1 + } From e22a67178f3e514181feeab7e893c8c7127631e0 Mon Sep 17 00:00:00 2001 From: Adam Wildavsky Date: Fri, 24 Jul 2026 14:39:29 +0200 Subject: [PATCH 7/7] Verify Bazelisk with bash on Unix and pwsh on Windows pwsh is not always available on Linux runners after free-disk-space, so pick the verify shell per OS in the shared action. Co-authored-by: Cursor --- .github/actions/setup-bazelisk/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-bazelisk/action.yml b/.github/actions/setup-bazelisk/action.yml index 7abb36bd..0576cef5 100644 --- a/.github/actions/setup-bazelisk/action.yml +++ b/.github/actions/setup-bazelisk/action.yml @@ -23,9 +23,15 @@ runs: with: bazelisk-version: ${{ inputs.bazelisk-version }} - # pwsh is available on all GitHub-hosted runners (Linux/macOS/Windows) and - # matches the Windows CI job's shell, so we avoid a Bash-only dependency. + # Composite run steps need an explicit shell. Use bash on Linux/macOS (pwsh + # is not always present after free-disk-space) and pwsh on Windows. - name: Verify Bazelisk installation + if: runner.os != 'Windows' + shell: bash + run: bazelisk version || (echo "Failed to install Bazelisk after two setup attempts, or Bazelisk is not available on PATH." && exit 1) + + - name: Verify Bazelisk installation + if: runner.os == 'Windows' shell: pwsh run: | bazelisk version