Skip to content

Commit fc9adc9

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 2507056 commit fc9adc9

File tree

4 files changed

+48
-52
lines changed

4 files changed

+48
-52
lines changed

.github/workflows/artifacts.yml

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

.github/workflows/windows.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ jobs:
2424
name: test ghc-8.6.5
2525
runs-on: windows-latest
2626
steps:
27-
- name: Configure Chocolatey
28-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
29-
- name: Install msys2
30-
run: choco install -y msys2
3127
- name: Install Cabal
32-
run: choco install -y cabal --version 3.2.0.0
28+
run: choco install -fy cabal --version 3.2.0.0
3329
- name: Install GHC
34-
run: choco install -y ghc --version 8.6.5
30+
run: |
31+
choco uninstall -y ghc --all-versions
32+
choco install -y ghc --version 8.6.5
3533
- name: Set PATH
3634
run: |
3735
[Environment]::GetEnvironmentVariable("Path")
38-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.2.0.0"
39-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.6.5\bin"
36+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0"
37+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-8.6.5\bin"
38+
[Environment]::GetEnvironmentVariable("Path")
4039
- name: Print versions
4140
run: |
42-
ghc --version
41+
[Environment]::GetEnvironmentVariable("Path")
4342
cabal --version
43+
ghc --version
4444
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
4545
- uses: actions/cache@v1
4646
with:
4747
path: C:\SR
48-
key: linux-store-meta
48+
key: windows-store-meta
4949
- name: Update Hackage index
5050
run: cabal v2-update
5151
- uses: actions/checkout@v2
@@ -79,28 +79,28 @@ jobs:
7979
name: test ghc-8.8.3
8080
runs-on: windows-latest
8181
steps:
82-
- name: Configure Chocolatey
83-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
84-
- name: Install msys2
85-
run: choco install -y msys2
8682
- name: Install Cabal
87-
run: choco install -y cabal --version 3.2.0.0
83+
run: choco install -fy cabal --version 3.2.0.0
8884
- name: Install GHC
89-
run: choco install -y ghc --version 8.8.3
85+
run: |
86+
choco uninstall -y ghc --all-versions
87+
choco install -y ghc --version 8.8.3
9088
- name: Set PATH
9189
run: |
9290
[Environment]::GetEnvironmentVariable("Path")
93-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.2.0.0"
94-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.8.3\bin"
91+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0"
92+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-8.8.3\bin"
93+
[Environment]::GetEnvironmentVariable("Path")
9594
- name: Print versions
9695
run: |
97-
ghc --version
96+
[Environment]::GetEnvironmentVariable("Path")
9897
cabal --version
98+
ghc --version
9999
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
100100
- uses: actions/cache@v1
101101
with:
102102
path: C:\SR
103-
key: linux-store-meta
103+
key: windows-store-meta
104104
- name: Update Hackage index
105105
run: cabal v2-update
106106
- uses: actions/checkout@v2
@@ -135,28 +135,28 @@ jobs:
135135
runs-on: windows-latest
136136
needs: test-windows-8_8_3
137137
steps:
138-
- name: Configure Chocolatey
139-
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
140-
- name: Install msys2
141-
run: choco install -y msys2
142138
- name: Install Cabal
143-
run: choco install -y cabal --version 3.2.0.0
139+
run: choco install -fy cabal --version 3.2.0.0
144140
- name: Install GHC
145-
run: choco install -y ghc --version 8.10.1
141+
run: |
142+
choco uninstall -y ghc --all-versions
143+
choco install -y ghc --version 8.10.1
146144
- name: Set PATH
147145
run: |
148146
[Environment]::GetEnvironmentVariable("Path")
149-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.2.0.0"
150-
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.10.1\bin"
147+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\cabal\tools\cabal-3.2.0.0"
148+
Write-Host "::add-path::C:\ProgramData\Chocolatey\lib\ghc\tools\ghc-8.10.1\bin"
149+
[Environment]::GetEnvironmentVariable("Path")
151150
- name: Print versions
152151
run: |
153-
ghc --version
152+
[Environment]::GetEnvironmentVariable("Path")
154153
cabal --version
154+
ghc --version
155155
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
156156
- uses: actions/cache@v1
157157
with:
158158
path: C:\SR
159-
key: linux-store-meta
159+
key: windows-store-meta
160160
- name: Update Hackage index
161161
run: cabal v2-update
162162
- uses: actions/checkout@v2

boot/ci-artifacts.template.yml

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

boot/ci-windows.template.yml

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

0 commit comments

Comments
 (0)