Skip to content

Commit 14c8366

Browse files
authored
Add GHC 9.0 to CI (#768)
1 parent 7fb91ca commit 14c8366

File tree

3 files changed

+36
-26
lines changed

3 files changed

+36
-26
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 34 additions & 24 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.11.20210111
11+
# version: 0.13.20210525
1212
#
13-
# REGENDATA ("0.11.20210111",["github","--config=cabal.haskell-ci","cabal.project"])
13+
# REGENDATA ("0.13.20210525",["github","--config=cabal.haskell-ci","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -22,31 +22,33 @@ on:
2222
- master
2323
jobs:
2424
linux:
25-
name: Haskell-CI Linux - GHC ${{ matrix.ghc }}
25+
name: Haskell-CI - Linux - ${{ matrix.compiler }}
2626
runs-on: ubuntu-18.04
2727
container:
28-
image: buildpack-deps:bionic
28+
image: buildpack-deps:xenial
2929
continue-on-error: ${{ matrix.allow-failure }}
3030
strategy:
3131
matrix:
3232
include:
33-
- ghc: 8.10.3
33+
- compiler: ghc-9.0.1
3434
allow-failure: false
35-
- ghc: 8.8.4
35+
- compiler: ghc-8.10.4
3636
allow-failure: false
37-
- ghc: 8.6.5
37+
- compiler: ghc-8.8.4
3838
allow-failure: false
39-
- ghc: 8.4.4
39+
- compiler: ghc-8.6.5
4040
allow-failure: false
41-
- ghc: 8.2.2
41+
- compiler: ghc-8.4.4
4242
allow-failure: false
43-
- ghc: 8.0.2
43+
- compiler: ghc-8.2.2
4444
allow-failure: false
45-
- ghc: 7.10.3
45+
- compiler: ghc-8.0.2
4646
allow-failure: false
47-
- ghc: 7.8.4
47+
- compiler: ghc-7.10.3
4848
allow-failure: false
49-
- ghc: 7.6.3
49+
- compiler: ghc-7.8.4
50+
allow-failure: false
51+
- compiler: ghc-7.6.3
5052
allow-failure: false
5153
fail-fast: false
5254
steps:
@@ -56,28 +58,31 @@ jobs:
5658
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
5759
apt-add-repository -y 'ppa:hvr/ghc'
5860
apt-get update
59-
apt-get install -y ghc-$GHC_VERSION cabal-install-3.2
61+
apt-get install -y $CC cabal-install-3.4
6062
env:
61-
GHC_VERSION: ${{ matrix.ghc }}
63+
CC: ${{ matrix.compiler }}
6264
- name: Set PATH and environment variables
6365
run: |
6466
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
6567
echo "LANG=C.UTF-8" >> $GITHUB_ENV
6668
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
6769
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
68-
HC=/opt/ghc/$GHC_VERSION/bin/ghc
70+
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
71+
HCNAME=ghc
72+
HC=$HCDIR/bin/$HCNAME
6973
echo "HC=$HC" >> $GITHUB_ENV
70-
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
71-
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
72-
echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
74+
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
75+
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
76+
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
7377
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
7478
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
7579
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
7680
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi
77-
echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
81+
echo "HEADHACKAGE=false" >> $GITHUB_ENV
82+
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
7883
echo "GHCJSARITH=0" >> $GITHUB_ENV
7984
env:
80-
GHC_VERSION: ${{ matrix.ghc }}
85+
CC: ${{ matrix.compiler }}
8186
- name: env
8287
run: |
8388
env
@@ -122,10 +127,15 @@ jobs:
122127
uses: actions/checkout@v2
123128
with:
124129
path: source
130+
- name: initial cabal.project for sdist
131+
run: |
132+
touch cabal.project
133+
echo "packages: $GITHUB_WORKSPACE/source/containers" >> cabal.project
134+
echo "packages: $GITHUB_WORKSPACE/source/containers-tests" >> cabal.project
135+
cat cabal.project
125136
- name: sdist
126137
run: |
127138
mkdir -p sdist
128-
cd source || false
129139
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
130140
- name: unpack
131141
run: |
@@ -157,9 +167,9 @@ jobs:
157167
- name: cache
158168
uses: actions/cache@v2
159169
with:
160-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
170+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
161171
path: ~/.cabal/store
162-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
172+
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
163173
- name: build w/o tests
164174
run: |
165175
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all

containers-tests/containers-tests.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extra-source-files:
2626
benchmarks/LookupGE/*.hs
2727

2828
tested-with:
29-
GHC ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.3
29+
GHC ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4 || ==9.0.1
3030

3131
source-repository head
3232
type: git

containers/containers.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extra-source-files:
2525
include/containers.h
2626
changelog.md
2727

28-
tested-with: GHC==8.10.3, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
28+
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
2929

3030
source-repository head
3131
type: git

0 commit comments

Comments
 (0)