diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 5064cf67775..1c195ba7125 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -94,14 +94,12 @@ jobs: name: Artifact on Windows runs-on: windows-latest steps: - - name: Configure Chocolatey - run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 - - name: Install msys2 - run: choco install -y msys2 - name: Install Cabal - run: choco install -y cabal --version 3.0.0.0 + run: choco install -fy cabal --version 3.0.0.0 - name: Install GHC - run: choco install -y ghc --version 8.6.5 + run: | + choco uninstall -y ghc + choco install -y ghc --version 8.6.5 - name: Set PATH run: | [Environment]::GetEnvironmentVariable("Path") diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 31c8467eb44..d06066507e7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -23,28 +23,28 @@ jobs: name: test ghc-8.6.5 runs-on: windows-latest steps: - - name: Configure Chocolatey - run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 - - name: Install msys2 - run: choco install -y msys2 - name: Install Cabal - run: choco install -y cabal --version 3.0.0.0 + run: choco install -fy cabal --version 3.2.0.0 - name: Install GHC - run: choco install -y ghc --version 8.6.5 + run: | + choco uninstall -y ghc --all-versions + choco install -y ghc --version 8.6.5 - name: Set PATH run: | [Environment]::GetEnvironmentVariable("Path") - Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.0.0.0" - Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.6.5\bin" + Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0" + Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-8.6.5\bin" + [Environment]::GetEnvironmentVariable("Path") - name: Print versions run: | - ghc --version + [Environment]::GetEnvironmentVariable("Path") cabal --version + ghc --version cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3 - uses: actions/cache@v1 with: path: C:\SR - key: linux-store-meta + key: windows-store-meta - name: Update Hackage index run: cabal v2-update - uses: actions/checkout@v2 diff --git a/boot/ci-artifacts.template.yml b/boot/ci-artifacts.template.yml index 5064cf67775..1c195ba7125 100644 --- a/boot/ci-artifacts.template.yml +++ b/boot/ci-artifacts.template.yml @@ -94,14 +94,12 @@ jobs: name: Artifact on Windows runs-on: windows-latest steps: - - name: Configure Chocolatey - run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 - - name: Install msys2 - run: choco install -y msys2 - name: Install Cabal - run: choco install -y cabal --version 3.0.0.0 + run: choco install -fy cabal --version 3.0.0.0 - name: Install GHC - run: choco install -y ghc --version 8.6.5 + run: | + choco uninstall -y ghc + choco install -y ghc --version 8.6.5 - name: Set PATH run: | [Environment]::GetEnvironmentVariable("Path") diff --git a/boot/ci-windows.template.yml b/boot/ci-windows.template.yml index baaafd5f6e1..fb99918f2cc 100644 --- a/boot/ci-windows.template.yml +++ b/boot/ci-windows.template.yml @@ -30,28 +30,28 @@ jobs: needs: test-windows-{{ mangleVersion needs }} {% endfor %} steps: - - name: Configure Chocolatey - run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2 - - name: Install msys2 - run: choco install -y msys2 - name: Install Cabal - run: choco install -y cabal --version 3.0.0.0 + run: choco install -fy cabal --version 3.2.0.0 - name: Install GHC - run: choco install -y ghc --version {{ job.version }} + run: | + choco uninstall -y ghc --all-versions + choco install -y ghc --version {{ job.version }} - name: Set PATH run: | [Environment]::GetEnvironmentVariable("Path") - Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.0.0.0" - Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-{{ job.version }}\bin" + Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0" + Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-{{ job.version }}\bin" + [Environment]::GetEnvironmentVariable("Path") - name: Print versions run: | - ghc --version + [Environment]::GetEnvironmentVariable("Path") cabal --version + ghc --version cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3 - uses: actions/cache@v1 with: path: C:\SR - key: linux-store-meta + key: windows-store-meta - name: Update Hackage index run: cabal v2-update - uses: actions/checkout@v2