thebrowsercompany / swift-build

Swift toolchain builds by The Browser Company
352 stars 12 forks source link

Pre-load Azure Images with Chocolatey package manager #205

Open andrurogerz opened 3 weeks ago

andrurogerz commented 3 weeks ago

In order to build the toolchain on Azure VMs we have to install the Chocolatey package manger for Windows:

steps:
  - name: Install Chocolatey
    run: |
        if (-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall")) {
          Invoke-Expression ((New-Object net.webclient).DownloadString("${{ inputs.install-script }}"))
          choco feature enable -n allowGlobalConfirmation
          # Propagate the updated path to subsequent steps in the current job.
          echo "$env:ChocolateyInstall\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
        }

It would be faster if Chocolatey were pre-installed like it is on the GitHub Windows runner images.