From 8307e7ac3713f561855f183c2630b60c18af50e7 Mon Sep 17 00:00:00 2001 From: Andrew Rogers Date: Mon, 19 Aug 2024 11:15:50 -0700 Subject: [PATCH] [android] install Chocolatey if not installed Installs the Chocolatey package manager if it is not already installed on the system. This is currently needed for the Azure runners but not for GitHub runners, where Chocolatey is pre-installed. --- .github/workflows/swift-toolchain.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index a142783e..d76c16ea 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -306,7 +306,12 @@ jobs: arch: amd64 - name: Install Flex and Bison Tools - run: choco install winflexbison3 + run: | + if (-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall")) { + Invoke-Expression ((New-Object net.webclient).DownloadString("https://community.chocolatey.org/install.ps1")) + } + choco feature enable -n allowGlobalConfirmation + choco install winflexbison3 - name: Configure RegsGen2 run: | @@ -387,7 +392,12 @@ jobs: arch: ${{ matrix.arch }} - name: Install Flex and Bison Tools - run: choco install winflexbison3 + run: | + if (-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall")) { + Invoke-Expression ((New-Object net.webclient).DownloadString("https://community.chocolatey.org/install.ps1")) + } + choco feature enable -n allowGlobalConfirmation + choco install winflexbison3 - uses: actions/download-artifact@v4 with: