Skip to content

Commit 4107caa

Browse files
committed
Allow base-4.16
1 parent 11f76e0 commit 4107caa

File tree

2 files changed

+99
-26
lines changed

2 files changed

+99
-26
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 96 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.12
11+
# version: 0.13.20211030
1212
#
13-
# REGENDATA ("0.12",["github","cabal.project"])
13+
# REGENDATA ("0.13.20211030",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -30,65 +30,133 @@ jobs:
3030
strategy:
3131
matrix:
3232
include:
33+
- compiler: ghc-9.2.1
34+
compilerKind: ghc
35+
compilerVersion: 9.2.1
36+
setup-method: ghcup
37+
allow-failure: false
3338
- compiler: ghc-9.0.1
39+
compilerKind: ghc
40+
compilerVersion: 9.0.1
41+
setup-method: hvr-ppa
3442
allow-failure: false
3543
- compiler: ghc-8.10.4
44+
compilerKind: ghc
45+
compilerVersion: 8.10.4
46+
setup-method: hvr-ppa
3647
allow-failure: false
3748
- compiler: ghc-8.8.4
49+
compilerKind: ghc
50+
compilerVersion: 8.8.4
51+
setup-method: hvr-ppa
3852
allow-failure: false
3953
- compiler: ghc-8.6.5
54+
compilerKind: ghc
55+
compilerVersion: 8.6.5
56+
setup-method: hvr-ppa
4057
allow-failure: false
4158
- compiler: ghc-8.4.4
59+
compilerKind: ghc
60+
compilerVersion: 8.4.4
61+
setup-method: hvr-ppa
4262
allow-failure: false
4363
- compiler: ghc-8.2.2
64+
compilerKind: ghc
65+
compilerVersion: 8.2.2
66+
setup-method: hvr-ppa
4467
allow-failure: false
4568
- compiler: ghc-8.0.2
69+
compilerKind: ghc
70+
compilerVersion: 8.0.2
71+
setup-method: hvr-ppa
4672
allow-failure: false
4773
- compiler: ghc-7.10.3
74+
compilerKind: ghc
75+
compilerVersion: 7.10.3
76+
setup-method: hvr-ppa
4877
allow-failure: false
4978
- compiler: ghc-7.8.4
79+
compilerKind: ghc
80+
compilerVersion: 7.8.4
81+
setup-method: hvr-ppa
5082
allow-failure: false
5183
- compiler: ghc-7.6.3
84+
compilerKind: ghc
85+
compilerVersion: 7.6.3
86+
setup-method: hvr-ppa
5287
allow-failure: false
5388
- compiler: ghc-7.4.2
89+
compilerKind: ghc
90+
compilerVersion: 7.4.2
91+
setup-method: hvr-ppa
5492
allow-failure: false
5593
- compiler: ghc-7.2.2
94+
compilerKind: ghc
95+
compilerVersion: 7.2.2
96+
setup-method: hvr-ppa
5697
allow-failure: false
5798
- compiler: ghc-7.0.4
99+
compilerKind: ghc
100+
compilerVersion: 7.0.4
101+
setup-method: hvr-ppa
58102
allow-failure: false
59103
fail-fast: false
60104
steps:
61105
- name: apt
62106
run: |
63107
apt-get update
64-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
65-
apt-add-repository -y 'ppa:hvr/ghc'
66-
apt-get update
67-
apt-get install -y $CC cabal-install-3.4
108+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
109+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
110+
mkdir -p "$HOME/.ghcup/bin"
111+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
112+
chmod a+x "$HOME/.ghcup/bin/ghcup"
113+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
114+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
115+
else
116+
apt-add-repository -y 'ppa:hvr/ghc'
117+
apt-get update
118+
apt-get install -y "$HCNAME"
119+
mkdir -p "$HOME/.ghcup/bin"
120+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
121+
chmod a+x "$HOME/.ghcup/bin/ghcup"
122+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
123+
fi
68124
env:
69-
CC: ${{ matrix.compiler }}
125+
HCKIND: ${{ matrix.compilerKind }}
126+
HCNAME: ${{ matrix.compiler }}
127+
HCVER: ${{ matrix.compilerVersion }}
70128
- name: Set PATH and environment variables
71129
run: |
72130
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
73-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
74-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
75-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
76-
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
77-
HCNAME=ghc
78-
HC=$HCDIR/bin/$HCNAME
79-
echo "HC=$HC" >> $GITHUB_ENV
80-
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
81-
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
82-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
131+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
132+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
133+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
134+
HCDIR=/opt/$HCKIND/$HCVER
135+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
136+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
137+
echo "HC=$HC" >> "$GITHUB_ENV"
138+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
139+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
140+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
141+
else
142+
HC=$HCDIR/bin/$HCKIND
143+
echo "HC=$HC" >> "$GITHUB_ENV"
144+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
145+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
146+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
147+
fi
148+
83149
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
84-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
85-
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
86-
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
87-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
88-
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
89-
echo "GHCJSARITH=0" >> $GITHUB_ENV
150+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
151+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
152+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
153+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
154+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
155+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
90156
env:
91-
CC: ${{ matrix.compiler }}
157+
HCKIND: ${{ matrix.compilerKind }}
158+
HCNAME: ${{ matrix.compiler }}
159+
HCVER: ${{ matrix.compilerVersion }}
92160
- name: env
93161
run: |
94162
env
@@ -149,7 +217,8 @@ jobs:
149217
- name: generate cabal.project
150218
run: |
151219
PKGDIR_some="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/some-[0-9.]*')"
152-
echo "PKGDIR_some=${PKGDIR_some}" >> $GITHUB_ENV
220+
echo "PKGDIR_some=${PKGDIR_some}" >> "$GITHUB_ENV"
221+
rm -f cabal.project cabal.project.local
153222
touch cabal.project
154223
touch cabal.project.local
155224
echo "packages: ${PKGDIR_some}" >> cabal.project
@@ -199,7 +268,9 @@ jobs:
199268
rm -f cabal.project.local
200269
- name: constraint set unsafe
201270
run: |
271+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='some +newtype-unsafe' --dependencies-only -j2 all
202272
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='some +newtype-unsafe' all
203273
- name: constraint set safe
204274
run: |
275+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='some -newtype-unsafe' --dependencies-only -j2 all
205276
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='some -newtype-unsafe' all

some.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: some
22
version: 1.0.3
3+
x-revision: 1
34
stability: provisional
45
cabal-version: >=1.10
56
build-type: Simple
@@ -38,6 +39,7 @@ tested-with:
3839
|| ==8.8.4
3940
|| ==8.10.4
4041
|| ==9.0.1
42+
|| ==9.2.1
4143

4244
extra-source-files: ChangeLog.md
4345

@@ -72,7 +74,7 @@ library
7274

7375
other-modules: Data.GADT.Internal
7476
build-depends:
75-
base >=4.3 && <4.16
77+
base >=4.3 && <4.17
7678
, deepseq >=1.3.0.0 && <1.5
7779

7880
if !impl(ghc >=7.8)

0 commit comments

Comments
 (0)