@@ -18,68 +18,19 @@ jobs:
18
18
19
19
defaults :
20
20
run :
21
- shell : ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || ' bash' }}
21
+ shell : ' bash'
22
22
23
23
steps :
24
- - name : " WIN: Setup MSYS2 and libraries"
25
- if : runner.os == 'Windows'
26
- uses : msys2/setup-msys2@v2
27
- with :
28
- update : true
29
- install : >-
30
- base-devel
31
- autoconf-wrapper
32
- autoconf
33
- automake
34
- libtool
35
- make
36
- git
37
- mingw-w64-x86_64-jq
38
-
39
24
- name : Set cache version
40
25
run : echo "CACHE_VERSION=pu4Aevoo_v1" >> $GITHUB_ENV
41
26
42
- - name : " LINUX: Setup Haskell"
27
+ - name : " Setup Haskell"
43
28
uses : haskell-actions/setup@v2
44
- if : runner.os != 'Windows'
45
29
id : setup-haskell
46
30
with :
47
31
ghc-version : ${{ matrix.ghc }}
48
32
cabal-version : " 3.10.1.0"
49
33
50
- - name : " WIN: Setup Haskell"
51
- id : win-setup-haskell
52
- if : runner.os == 'Windows'
53
- run : |
54
- # see https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell
55
- curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | \
56
- BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \
57
- BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=1 \
58
- BOOTSTRAP_HASKELL_ADJUST_BASHRC=1 \
59
- BOOTSTRAP_HASKELL_GHC_VERSION="${{ matrix.ghc }}" \
60
- BOOTSTRAP_HASKELL_CABAL_VERSION="${{ matrix.cabal }}" \
61
- sh
62
-
63
- # MSYS2 doesn't inherit $GITHUB_PATH so this is needed
64
- cat <(echo "source /c/ghcup/env") ~/.bashrc > ~/.bashrc.new
65
- mv ~/.bashrc.new ~/.bashrc
66
-
67
- source ~/.bashrc
68
-
69
- # There is an issue with crt libraries, fixed by prepending the ghc
70
- # mingw32 libraries directory to every other library directory.
71
- echo "# Original cabal config extra-lib-dirs"
72
- grep extra-lib-dirs /c/cabal/config
73
-
74
- sed -i 's/C:\\msys64\\mingw64\\lib/C:\\ghcup\\ghc\\${{matrix.ghc}}\\mingw\\x86_64-w64-mingw32\\lib, C:\\msys64\\mingw64\\lib/g' /c/cabal/config
75
-
76
- echo "# Modified cabal config extra-lib-dirs"
77
- grep extra-lib-dirs /c/cabal/config
78
-
79
- ghc --version
80
- cabal --version
81
- echo "cabal-store=$(dirname $(cabal --help | tail -1 | tr -d ' '))\\store" >> $GITHUB_OUTPUT
82
-
83
34
- uses : actions/checkout@v3
84
35
85
36
- name : " Configure cabal.project.local"
0 commit comments