Skip to content

Commit fd95087

Browse files
committed
windows ci
1 parent 6f18db7 commit fd95087

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/ci.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ jobs:
5454
if: runner.os == 'Linux' && !startsWith(matrix.container, 'alpine')
5555
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
5656

57-
- name: Install system dependencies (Windows)
58-
if: ${{ startsWith(matrix.os, 'windows') }}
59-
uses: msys2/setup-msys2@v2
60-
with:
61-
path-type: inherit
62-
install: >-
63-
mingw-w64-x86_64-pkg-config
64-
mingw-w64-x86_64-gtk3
65-
6657
- name: Install system dependencies (macOS)
6758
if: runner.os == 'macOS'
6859
run: brew install cairo gtk+3 pkg-config
@@ -72,13 +63,26 @@ jobs:
7263
run: |
7364
printf 'package gtk\n flags: +have-quartz-gtk' >>cabal.project
7465
75-
7666
- name: Set up GHC ${{ matrix.ghc-version }}
7767
uses: haskell-actions/setup@v2
7868
id: setup
7969
with:
8070
ghc-version: ${{ matrix.ghc-version }}
8171

72+
# Taken from https://github.com/agda/agda/blob/8210048a50c35d8d6fd0ae7e5edd1699592fda6f/src/github/workflows/cabal.yml#L113C1-L124C85
73+
# See: https://github.com/haskell/text-icu/pull/86
74+
# pacman needs MSYS /usr/bin in PATH, but this breaks the latest cache action.
75+
# - https://github.com/actions/cache/issues/1073
76+
# MSYS' pkg-config needs MSYS /mingw64/bin which we can safely add to the PATH
77+
#
78+
- name: Install system dependencies (Windows)
79+
if: ${{ startsWith(matrix.os, 'windows') }}
80+
shell: pwsh
81+
run: |
82+
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
83+
pacman --noconfirm -S msys2-keyring mingw-w64-x86_64-pkgconf mingw-w64-x86_64-gtk3
84+
echo "C:\msys64\mingw64\bin" | Out-File -FilePath "$env:GITHUB_PATH" -Append
85+
8286
- name: Enable static build (only on alpine)
8387
if: ${{ startsWith(matrix.container, 'alpine') }}
8488
run: |

0 commit comments

Comments
 (0)