Skip to content

Commit 56137c1

Browse files
committed
Use haskell setup action for ghc 8.0.2 and 8.2.2
1 parent f2cd98e commit 56137c1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/haskell.yml

+15
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ jobs:
6565
include:
6666

6767
- name: 8.0.2
68+
use_haskell_actions: true
6869
ghc_version: 8.0.2
6970
runner: ubuntu-latest
7071
cabal_version: 3.2.0.0
7172
pack_options: DISABLE_TEST=y
7273
ignore_error: false
7374

7475
- name: 8.2.2
76+
use_haskell_actions: true
7577
ghc_version: 8.2.2
7678
runner: ubuntu-latest
7779
cabal_version: 3.2.0.0
@@ -172,6 +174,19 @@ jobs:
172174
steps:
173175
- uses: actions/checkout@v4
174176

177+
# This is only required for 8.0.2 and 8.2.2
178+
# Fails with the following error when we use ghcup:
179+
# /usr/local/.ghcup/tmp/ghcup-05bf9c49ec7cd38c/usr/local/.ghcup/ghc/8.0.2/lib/ghc-8.0.2/bin/ghc-pkg: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
180+
# This might be because the older ghc installers look for libtinfo.so.5 and not libtinfo.so
181+
# If that is the case "sudo ln libtinfo.so libtinfo.so.5" should fix the problem
182+
# But we can't sudo on the CI so this is the roundabout way to get the CIs working with minimal effort
183+
- uses: haskell-actions/setup@v2
184+
if: ${{ matrix.use_haskell_actions }}
185+
with:
186+
ghc-version: ${{ matrix.ghc_version }}
187+
ghcup-release-channel: ${{ matrix.ghcup_release_channel }}
188+
cabal-version: ${{ matrix.cabal_version }}
189+
175190
- uses: actions/cache@v4
176191
name: Cache ~/.cabal
177192
with:

0 commit comments

Comments
 (0)