Skip to content

Commit bf66f07

Browse files
committed
Fix Windows GitHub Action
- msys2 should be installed - there is cabal and GHC, but we want to be sure about versions, so we reinstall. - Reinstalling GHC doesnt' "just work", so we uninstall it first. This takes time, but makes CI work.
1 parent 120e539 commit bf66f07

File tree

4 files changed

+28
-32
lines changed

4 files changed

+28
-32
lines changed

.github/workflows/artifacts.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,12 @@ jobs:
9494
name: Artifact on Windows
9595
runs-on: windows-latest
9696
steps:
97-
- name: Configure Chocolatey
98-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
99-
- name: Install msys2
100-
run: choco install -y msys2
10197
- name: Install Cabal
102-
run: choco install -y cabal --version 3.0.0.0
98+
run: choco install -fy cabal --version 3.0.0.0
10399
- name: Install GHC
104-
run: choco install -y ghc --version 8.6.5
100+
run: |
101+
choco uninstall -y ghc
102+
choco install -y ghc --version 8.6.5
105103
- name: Set PATH
106104
run: |
107105
[Environment]::GetEnvironmentVariable("Path")

.github/workflows/windows.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@ jobs:
2323
name: test ghc-8.6.5
2424
runs-on: windows-latest
2525
steps:
26-
- name: Configure Chocolatey
27-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
28-
- name: Install msys2
29-
run: choco install -y msys2
3026
- name: Install Cabal
31-
run: choco install -y cabal --version 3.0.0.0
27+
run: choco install -fy cabal --version 3.2.0.0
3228
- name: Install GHC
33-
run: choco install -y ghc --version 8.6.5
29+
run: |
30+
choco uninstall -y ghc --all-versions
31+
choco install -y ghc --version 8.6.5
3432
- name: Set PATH
3533
run: |
3634
[Environment]::GetEnvironmentVariable("Path")
37-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.0.0.0"
38-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.6.5\bin"
35+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0"
36+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-8.6.5\bin"
37+
[Environment]::GetEnvironmentVariable("Path")
3938
- name: Print versions
4039
run: |
41-
ghc --version
40+
[Environment]::GetEnvironmentVariable("Path")
4241
cabal --version
42+
ghc --version
4343
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
4444
- uses: actions/cache@v1
4545
with:
4646
path: C:\SR
47-
key: linux-store-meta
47+
key: windows-store-meta
4848
- name: Update Hackage index
4949
run: cabal v2-update
5050
- uses: actions/checkout@v2

boot/ci-artifacts.template.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,12 @@ jobs:
9494
name: Artifact on Windows
9595
runs-on: windows-latest
9696
steps:
97-
- name: Configure Chocolatey
98-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
99-
- name: Install msys2
100-
run: choco install -y msys2
10197
- name: Install Cabal
102-
run: choco install -y cabal --version 3.0.0.0
98+
run: choco install -fy cabal --version 3.0.0.0
10399
- name: Install GHC
104-
run: choco install -y ghc --version 8.6.5
100+
run: |
101+
choco uninstall -y ghc
102+
choco install -y ghc --version 8.6.5
105103
- name: Set PATH
106104
run: |
107105
[Environment]::GetEnvironmentVariable("Path")

boot/ci-windows.template.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,28 @@ jobs:
3030
needs: test-windows-{{ mangleVersion needs }}
3131
{% endfor %}
3232
steps:
33-
- name: Configure Chocolatey
34-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
35-
- name: Install msys2
36-
run: choco install -y msys2
3733
- name: Install Cabal
38-
run: choco install -y cabal --version 3.0.0.0
34+
run: choco install -fy cabal --version 3.2.0.0
3935
- name: Install GHC
40-
run: choco install -y ghc --version {{ job.version }}
36+
run: |
37+
choco uninstall -y ghc --all-versions
38+
choco install -y ghc --version {{ job.version }}
4139
- name: Set PATH
4240
run: |
4341
[Environment]::GetEnvironmentVariable("Path")
44-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.0.0.0"
45-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-{{ job.version }}\bin"
42+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0"
43+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-{{ job.version }}\bin"
44+
[Environment]::GetEnvironmentVariable("Path")
4645
- name: Print versions
4746
run: |
48-
ghc --version
47+
[Environment]::GetEnvironmentVariable("Path")
4948
cabal --version
49+
ghc --version
5050
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
5151
- uses: actions/cache@v1
5252
with:
5353
path: C:\SR
54-
key: linux-store-meta
54+
key: windows-store-meta
5555
- name: Update Hackage index
5656
run: cabal v2-update
5757
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)