diff --git a/.github/workflows/qa-azure.yaml b/.github/workflows/qa-azure.yaml index eda559063..4a9f68de5 100644 --- a/.github/workflows/qa-azure.yaml +++ b/.github/workflows/qa-azure.yaml @@ -47,9 +47,37 @@ jobs: with: distro: "Ubuntu-Preview" - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: "go.work" + shell: powershell + run: | + $path = ( + (Invoke-WebRequest -Uri "https://go.dev/dl/").Links.Href ` + | Select-String '/dl/go.*windows-amd64.msi' ` + | Select-Object -First 1 ` + ) + + if ( "${path}" -eq "" ) { + Write-Error "Could not find Go download" + exit(1) + } + + $URL = "https://go.dev${path}" + $file = "${HOME}/Downloads/" + ($path -replace '/dl/', '') + + if ( Test-Path "${file}" ) { + Write-Output "Cache hit: using ${file}" + } else { + Write-Output "Cache miss: downloading ${URL}" + Invoke-WebRequest -Uri "${URL}" -Outfile "${file}" + } + + try { + msiexec.exe /i "${file}" /quiet + } catch { + Write-Error "${Error}" + Exit(1) + } + + Exit(0) - name: Set up Flutter uses: subosito/flutter-action@v2 with: @@ -80,8 +108,8 @@ jobs: | select(.Version | endswith("${want_version}") | not ) | (.Path) + "@${want_version}" "@) - go get $dependencies - go mod tidy + go.exe get $dependencies + go.exe mod tidy Write-Output "::endgroup::" New-Item -ItemType Directory "ci-build/wsl-pro-service"