@@ -11,76 +11,27 @@ jobs:
1111 strategy :
1212 fail-fast : false
1313 matrix :
14- ghc : ["8.10.7 ", "9.2.8 ", "9.4.7 ", "9.6.3 "]
14+ ghc : ["8.10", "9.2", "9.4", "9.6"]
1515 os : [ubuntu-latest, macos-latest, windows-latest]
1616
1717 env :
1818 CABAL_VERSION : " 3.10.1.0"
1919
2020 defaults :
2121 run :
22- shell : ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || ' bash' }}
22+ shell : " bash"
2323
2424 steps :
25- - name : " WIN: Setup MSYS2 and libraries"
26- if : runner.os == 'Windows'
27- uses : msys2/setup-msys2@v2
28- with :
29- update : true
30- install : >-
31- base-devel
32- autoconf-wrapper
33- autoconf
34- automake
35- libtool
36- make
37- git
38- mingw-w64-x86_64-jq
39-
4025 - name : Set cache version
4126 run : echo "CACHE_VERSION=pu4Aevoo" >> $GITHUB_ENV
4227
43- - name : " LINUX: Setup Haskell"
44- uses : haskell/actions/setup@v1
45- if : runner.os != 'Windows'
28+ - name : " Setup Haskell"
29+ uses : haskell-actions/setup@v2
4630 id : setup-haskell
4731 with :
4832 ghc-version : ${{ matrix.ghc }}
4933 cabal-version : ${{ env.CABAL_VERSION }}
5034
51- - name : " WIN: Setup Haskell"
52- id : win-setup-haskell
53- if : runner.os == 'Windows'
54- run : |
55- # see https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell
56- curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | \
57- BOOTSTRAP_HASKELL_NONINTERACTIVE=1 \
58- BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=1 \
59- BOOTSTRAP_HASKELL_ADJUST_BASHRC=1 \
60- BOOTSTRAP_HASKELL_GHC_VERSION="${{ matrix.ghc }}" \
61- BOOTSTRAP_HASKELL_CABAL_VERSION="${{ env.CABAL_VERSION }}" \
62- sh
63-
64- # MSYS2 doesn't inherit $GITHUB_PATH so this is needed
65- cat <(echo "source /c/ghcup/env") ~/.bashrc > ~/.bashrc.new
66- mv ~/.bashrc.new ~/.bashrc
67-
68- source ~/.bashrc
69-
70- # There is an issue with crt libraries, fixed by prepending the ghc
71- # mingw32 libraries directory to every other library directory.
72- echo "# Original cabal config extra-lib-dirs"
73- grep extra-lib-dirs /c/cabal/config
74-
75- sed -i 's/C:\\msys64\\mingw64\\lib/C:\\ghcup\\ghc\\8.10.7\\mingw\\x86_64-w64-mingw32\\lib, C:\\msys64\\mingw64\\lib/g' /c/cabal/config
76-
77- echo "# Modified cabal config extra-lib-dirs"
78- grep extra-lib-dirs /c/cabal/config
79-
80- ghc --version
81- cabal --version
82- echo "cabal-store=$(dirname $(cabal --help | tail -1 | tr -d ' '))\\store" >> $GITHUB_OUTPUT
83-
8435 - uses : actions/checkout@v3
8536
8637 - name : " Configure cabal.project.local"
14091 sudo apt-get -y install fd-find
14192
14293 - name : " Setup Haskell"
143- uses : haskell/ actions/setup@v2
94+ uses : haskell- actions/setup@v2
14495 id : setup-haskell
14596 with :
14697 ghc-version : 9.2.5
0 commit comments