Skip to content

ci: pre-install ripgrep on Windows unit runners (LAC-2700) - #36

Merged
lacymorrow merged 1 commit into
LAC-2385/blacksmith-to-github-runnersfrom
LAC-2700/windows-preinstall-ripgrep
Jul 10, 2026
Merged

ci: pre-install ripgrep on Windows unit runners (LAC-2700)#36
lacymorrow merged 1 commit into
LAC-2385/blacksmith-to-github-runnersfrom
LAC-2700/windows-preinstall-ripgrep

Conversation

@lacymorrow

Copy link
Copy Markdown
Owner

Problem

The unit (windows) job fails on GitHub-hosted runners: every Ripgrep suite test errors with Ripgrep.Error: ripgrep execution failed (see run 29041726352). The first ripgrep call bootstraps the binary — downloading ripgrep-15.1.0-x86_64-pc-windows-msvc.zip and extracting it via PowerShell Expand-Archive — which exceeds Bun's 5s per-test timeout on hosted runners, so the child process is killed with SIGTERM.

Pre-existing on hosted Windows runners (same failure on run 27512032937); surfaced, not caused, by the LAC-2385 runner switch — same story as the linux failures fixed in #33.

Fix

RipgrepBinary (packages/core/src/ripgrep/binary.ts) resolves rg.exe from PATH before falling back to download. This adds a Windows-only workflow step that downloads the pinned 15.1.0 release once, extracts rg.exe with 7z (preinstalled on hosted runners), sanity-checks it with --version, and prepends it to GITHUB_PATH — so tests never pay the cold-download cost.

Deliberately uses the same github.com release asset the app itself downloads rather than choco install ripgrep (chocolatey community feed is rate-limit-prone on hosted runners) and pins the version to match binary.ts.

Acceptance

  • unit (windows) reaches success on GitHub-hosted windows-2025.

Targets LAC-2385/blacksmith-to-github-runners (PR #28), same as the sibling linux fix #33.

Closes LAC-2700.

The Ripgrep test suite bootstraps rg.exe on first use: download the
15.1.0 release zip and extract it via PowerShell Expand-Archive. On
GitHub-hosted Windows runners that cold path exceeds Bun's 5s per-test
timeout, killing the child process with SIGTERM and failing every
ripgrep-dependent test with 'Ripgrep.Error: ripgrep execution failed'.

RipgrepBinary resolves rg from PATH before falling back to download,
so installing the pinned release once in a workflow step removes the
cold-download cost from the test path entirely. Uses the same
github.com release asset the app itself downloads (no chocolatey
community-feed dependency) and verifies the binary runs.
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@lacymorrow
lacymorrow merged commit 85c4cc8 into LAC-2385/blacksmith-to-github-runners Jul 10, 2026
6 of 9 checks passed
@lacymorrow
lacymorrow deleted the LAC-2700/windows-preinstall-ripgrep branch July 10, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant