Skip to content

Commit 74a2dbc

Browse files
committed
Haskell-CI: test with GHC 8.10.4 and 9.0.1
1 parent 376c22e commit 74a2dbc

File tree

1 file changed

+82
-37
lines changed

1 file changed

+82
-37
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 82 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,81 +8,125 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.11.20210220
11+
# version: 0.13.20210606
1212
#
13-
# REGENDATA ("0.11.20210220",["github","regex-posix.cabal"])
13+
# REGENDATA ("0.13.20210606",["github","regex-posix.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
1717
- push
1818
- pull_request
1919
jobs:
2020
linux:
21-
name: Haskell-CI - Linux - GHC ${{ matrix.ghc }}
21+
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2222
runs-on: ubuntu-18.04
2323
container:
2424
image: buildpack-deps:bionic
2525
continue-on-error: ${{ matrix.allow-failure }}
2626
strategy:
2727
matrix:
2828
include:
29-
- ghc: 9.0.1
29+
- compiler: ghc-9.0.1
30+
compilerKind: ghc
31+
compilerVersion: 9.0.1
32+
setup-method: hvr-ppa
3033
allow-failure: false
31-
- ghc: 8.10.4
34+
- compiler: ghc-8.10.4
35+
compilerKind: ghc
36+
compilerVersion: 8.10.4
37+
setup-method: hvr-ppa
3238
allow-failure: false
33-
- ghc: 8.8.4
39+
- compiler: ghc-8.8.4
40+
compilerKind: ghc
41+
compilerVersion: 8.8.4
42+
setup-method: hvr-ppa
3443
allow-failure: false
35-
- ghc: 8.6.5
44+
- compiler: ghc-8.6.5
45+
compilerKind: ghc
46+
compilerVersion: 8.6.5
47+
setup-method: hvr-ppa
3648
allow-failure: false
37-
- ghc: 8.4.4
49+
- compiler: ghc-8.4.4
50+
compilerKind: ghc
51+
compilerVersion: 8.4.4
52+
setup-method: hvr-ppa
3853
allow-failure: false
39-
- ghc: 8.2.2
54+
- compiler: ghc-8.2.2
55+
compilerKind: ghc
56+
compilerVersion: 8.2.2
57+
setup-method: hvr-ppa
4058
allow-failure: false
41-
- ghc: 8.0.2
59+
- compiler: ghc-8.0.2
60+
compilerKind: ghc
61+
compilerVersion: 8.0.2
62+
setup-method: hvr-ppa
4263
allow-failure: false
43-
- ghc: 7.10.3
64+
- compiler: ghc-7.10.3
65+
compilerKind: ghc
66+
compilerVersion: 7.10.3
67+
setup-method: hvr-ppa
4468
allow-failure: false
45-
- ghc: 7.8.4
69+
- compiler: ghc-7.8.4
70+
compilerKind: ghc
71+
compilerVersion: 7.8.4
72+
setup-method: hvr-ppa
4673
allow-failure: false
47-
- ghc: 7.6.3
74+
- compiler: ghc-7.6.3
75+
compilerKind: ghc
76+
compilerVersion: 7.6.3
77+
setup-method: hvr-ppa
4878
allow-failure: false
49-
- ghc: 7.4.2
79+
- compiler: ghc-7.4.2
80+
compilerKind: ghc
81+
compilerVersion: 7.4.2
82+
setup-method: hvr-ppa
5083
allow-failure: false
51-
- ghc: 7.2.2
84+
- compiler: ghc-7.2.2
85+
compilerKind: ghc
86+
compilerVersion: 7.2.2
87+
setup-method: hvr-ppa
5288
allow-failure: false
53-
- ghc: 7.0.4
89+
- compiler: ghc-7.0.4
90+
compilerKind: ghc
91+
compilerVersion: 7.0.4
92+
setup-method: hvr-ppa
5493
allow-failure: false
5594
fail-fast: false
5695
steps:
5796
- name: apt
5897
run: |
5998
apt-get update
60-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
99+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
61100
apt-add-repository -y 'ppa:hvr/ghc'
62101
apt-get update
63-
apt-get install -y ghc-$GHC_VERSION cabal-install-3.4
102+
apt-get install -y "$HCNAME" cabal-install-3.4
64103
env:
65-
GHC_VERSION: ${{ matrix.ghc }}
104+
HCKIND: ${{ matrix.compilerKind }}
105+
HCNAME: ${{ matrix.compiler }}
106+
HCVER: ${{ matrix.compilerVersion }}
66107
- name: Set PATH and environment variables
67108
run: |
68109
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
69-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
70-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
71-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
72-
HC=/opt/ghc/$GHC_VERSION/bin/ghc
73-
echo "HC=$HC" >> $GITHUB_ENV
74-
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
75-
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
76-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
110+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
111+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
112+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
113+
HCDIR=/opt/$HCKIND/$HCVER
114+
HC=$HCDIR/bin/$HCKIND
115+
echo "HC=$HC" >> "$GITHUB_ENV"
116+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
117+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
118+
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV"
77119
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
78-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
79-
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
80-
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
81-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
82-
echo "ARG_COMPILER=--ghc --with-compiler=$HC" >> $GITHUB_ENV
83-
echo "GHCJSARITH=0" >> $GITHUB_ENV
120+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
121+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
122+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
123+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
124+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
125+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
84126
env:
85-
GHC_VERSION: ${{ matrix.ghc }}
127+
HCKIND: ${{ matrix.compilerKind }}
128+
HCNAME: ${{ matrix.compiler }}
129+
HCVER: ${{ matrix.compilerVersion }}
86130
- name: env
87131
run: |
88132
env
@@ -143,7 +187,8 @@ jobs:
143187
- name: generate cabal.project
144188
run: |
145189
PKGDIR_regex_posix="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/regex-posix-[0-9.]*')"
146-
echo "PKGDIR_regex_posix=${PKGDIR_regex_posix}" >> $GITHUB_ENV
190+
echo "PKGDIR_regex_posix=${PKGDIR_regex_posix}" >> "$GITHUB_ENV"
191+
rm -f cabal.project cabal.project.local
147192
touch cabal.project
148193
touch cabal.project.local
149194
echo "packages: ${PKGDIR_regex_posix}" >> cabal.project
@@ -161,9 +206,9 @@ jobs:
161206
- name: cache
162207
uses: actions/cache@v2
163208
with:
164-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
209+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
165210
path: ~/.cabal/store
166-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
211+
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
167212
- name: install dependencies
168213
run: |
169214
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all

0 commit comments

Comments
 (0)