From 4d5f2bda90b0ac02abb948f891c8084dd507a7dc Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 13 Mar 2026 16:48:34 +0100 Subject: [PATCH 1/3] Use gvm instead of chocolatey to install Golang --- .buildkite/pipeline.yml | 3 --- .buildkite/scripts/run-win-tests.ps1 | 33 +++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a8984ca9f..3a460d4da 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -35,9 +35,6 @@ steps: - label: ":windows: Tests on Windows" key: windows-test command: ".buildkite/scripts/run-win-tests.ps1" - env: - # Latest 1.24 version supported by Chocolatey. - GO_VERSION: "1.24.6" agents: provider: "gcp" image: "${GO_WINDOWS_AGENT_IMAGE}" diff --git a/.buildkite/scripts/run-win-tests.ps1 b/.buildkite/scripts/run-win-tests.ps1 index 60c231969..2859914a5 100644 --- a/.buildkite/scripts/run-win-tests.ps1 +++ b/.buildkite/scripts/run-win-tests.ps1 @@ -7,12 +7,35 @@ function fixCRLF { git rm --quiet --cached -r . git reset --quiet --hard } +function ensureBinPath { + $workDir = if ($env:WORKSPACE) { $env:WORKSPACE } else { $PWD.Path } + $binDir = Join-Path $workDir "bin" + if (-not (Test-Path $binDir)) { New-Item -ItemType Directory -Path $binDir | Out-Null } + $env:PATH = "$binDir;$env:PATH" + return $binDir +} + function withGolang($version) { - Write-Host "--- Install golang $version" - choco install -y golang --version $version - $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv + Write-Host "--- Install golang (GVM)" + $binDir = ensureBinPath + $gvmExe = Join-Path $binDir "gvm-windows-amd64.exe" + $gvmUrl = "https://github.com/andrewkroh/gvm/releases/download/$env:SETUP_GVM_VERSION/gvm-windows-amd64.exe" + + Write-Host "Installing GVM tool" + $maxTries = 5 + for ($i = 1; $i -le $maxTries; $i++) { + try { + Invoke-WebRequest -Uri $gvmUrl -OutFile $gvmExe -UseBasicParsing + break + } catch { + if ($i -eq $maxTries) { throw } + Start-Sleep -Seconds 3 + } + } + + Write-Host "Installing Go version $version" + & $gvmExe --format=powershell $version | Invoke-Expression + $env:PATH = "$(go env GOPATH)\bin;$env:PATH" go version go env } From 69221c18bbd13570e27a79421352f786433f56b8 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 13 Mar 2026 16:48:44 +0100 Subject: [PATCH 2/3] Ignore .cursor folder in git --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b9e7b9d72..25285cc88 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ temp/ fuzz /build/ .vscode/ +.cursor From fe0f83d79749f76ad91f2cd20d7ad71b300b5001 Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 13 Mar 2026 19:53:04 +0100 Subject: [PATCH 3/3] Remove cursor entry in gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 25285cc88..b9e7b9d72 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ temp/ fuzz /build/ .vscode/ -.cursor