@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.17.20231110
11+# version: 0.11.20210220
1212#
13−# REGENDATA ("0.17.20231110",["github","cabal.project"])
13+# REGENDATA ("0.11.20210220",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -22,15 +22,13 @@ on:
2222 - master
2323jobs:
2424 linux:
25− name: Haskell-CI - Linux - ${{ matrix.compiler }}
26− runs-on: ubuntu-20.04
27− timeout-minutes:
28− 60
25+ name: Haskell-CI - Linux - GHC ${{ matrix.ghc }}
26+ runs-on: ubuntu-18.04
2927 container:
3028 image: buildpack-deps:bionic
3129 services:
3230 postgres:
33− image: postgres:14
31+ image: postgres:10
3432 env:
3533 POSTGRES_PASSWORD: postgres
3634 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
@@ -38,105 +36,57 @@ jobs:
3836 strategy:
3937 matrix:
4038 include:
41− - compiler: ghc-9.8.1
42− compilerKind: ghc
43− compilerVersion: 9.8.1
44− setup-method: ghcup
39+ - ghc: 9.0.1
4540 allow-failure: false
46− - compiler: ghc-9.6.3
47− compilerKind: ghc
48− compilerVersion: 9.6.3
49− setup-method: ghcup
41+ - ghc: 8.10.4
5042 allow-failure: false
51− - compiler: ghc-9.4.8
52− compilerKind: ghc
53− compilerVersion: 9.4.8
54− setup-method: ghcup
43+ - ghc: 8.8.4
5544 allow-failure: false
56− - compiler: ghc-9.2.8
57− compilerKind: ghc
58− compilerVersion: 9.2.8
59− setup-method: ghcup
45+ - ghc: 8.6.5
6046 allow-failure: false
61− - compiler: ghc-9.0.2
62− compilerKind: ghc
63− compilerVersion: 9.0.2
64− setup-method: ghcup
47+ - ghc: 8.4.4
6548 allow-failure: false
66− - compiler: ghc-8.10.7
67− compilerKind: ghc
68− compilerVersion: 8.10.7
69− setup-method: ghcup
49+ - ghc: 8.2.2
7050 allow-failure: false
71− - compiler: ghc-8.8.4
72− compilerKind: ghc
73− compilerVersion: 8.8.4
74− setup-method: hvr-ppa
51+ - ghc: 8.0.2
7552 allow-failure: false
76− - compiler: ghc-8.6.5
77− compilerKind: ghc
78− compilerVersion: 8.6.5
79− setup-method: hvr-ppa
53+ - ghc: 7.10.3
54+ allow-failure: false
55+ - ghc: 7.8.4
56+ allow-failure: false
57+ - ghc: 7.6.3
8058 allow-failure: false
8159 fail-fast: false
8260 steps:
8361 - name: apt
8462 run: |
8563 apt-get update
86− apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
87− if [ "${{ matrix.setup-method }}" = ghcup ]; then
88− mkdir -p "$HOME/.ghcup/bin"
89− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
90− chmod a+x "$HOME/.ghcup/bin/ghcup"
91− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
92− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
93− else
94− apt-add-repository -y 'ppa:hvr/ghc'
95− apt-get update
96− apt-get install -y "$HCNAME"
97− mkdir -p "$HOME/.ghcup/bin"
98− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
99− chmod a+x "$HOME/.ghcup/bin/ghcup"
100− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
101− fi
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 ghc-$GHC_VERSION cabal-install-3.4
10268 env:
103− HCKIND: ${{ matrix.compilerKind }}
104− HCNAME: ${{ matrix.compiler }}
105− HCVER: ${{ matrix.compilerVersion }}
69+ GHC_VERSION: ${{ matrix.ghc }}
10670 - name: Set PATH and environment variables
10771 run: |
10872 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
109− echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
110− echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
111− echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
112− HCDIR=/opt/$HCKIND/$HCVER
113− if [ "${{ matrix.setup-method }}" = ghcup ]; then
114− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
115− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
116− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
117− echo "HC=$HC" >> "$GITHUB_ENV"
118− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
119− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
120− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
121− else
122− HC=$HCDIR/bin/$HCKIND
123− echo "HC=$HC" >> "$GITHUB_ENV"
124− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
125− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
126− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
127− fi
128−
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+ HC=/opt/ghc/$GHC_VERSION/bin/ghc
77+ echo "HC=$HC" >> $GITHUB_ENV
78+ echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
79+ echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
80+ echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
12981 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
130− echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
131− echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
132− echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
133− echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
134− echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
135− echo "GHCJSARITH=0" >> "$GITHUB_ENV"
82+ echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
83+ echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
84+ echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
85+ echo "HEADHACKAGE=false" >> $GITHUB_ENV
86+ echo "ARG_COMPILER=--ghc --with-compiler=$HC" >> $GITHUB_ENV
87+ echo "GHCJSARITH=0" >> $GITHUB_ENV
13688 env:
137− HCKIND: ${{ matrix.compilerKind }}
138− HCNAME: ${{ matrix.compiler }}
139− HCVER: ${{ matrix.compilerVersion }}
89+ GHC_VERSION: ${{ matrix.ghc }}
14090 - name: env
14191 run: |
14292 env
@@ -159,10 +109,6 @@ jobs:
159109 repository hackage.haskell.org
160110 url: http://hackage.haskell.org/
161111 EOF
162− cat >> $CABAL_CONFIG <<EOF
163− program-default-options
164− ghc-options: $GHCJOBS +RTS -M3G -RTS
165− EOF
166112 cat $CABAL_CONFIG
167113 - name: versions
168114 run: |
@@ -175,14 +121,14 @@ jobs:
175121 - name: install cabal-plan
176122 run: |
177123 mkdir -p $HOME/.cabal/bin
178− curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
179− echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
124+ curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
125+ echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
180126 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
181127 rm -f cabal-plan.xz
182128 chmod a+x $HOME/.cabal/bin/cabal-plan
183129 cabal-plan --version
184130 - name: checkout
185− uses: actions/checkout@v3
131+ uses: actions/checkout@v2
186132 with:
187133 path: source
188134 - name: initial cabal.project for sdist
@@ -201,13 +147,12 @@ jobs:
201147 - name: generate cabal.project
202148 run: |
203149 PKGDIR_postgresql_simple="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/postgresql-simple-[0-9.]*')"
204− echo "PKGDIR_postgresql_simple=${PKGDIR_postgresql_simple}" >> "$GITHUB_ENV"
205− rm -f cabal.project cabal.project.local
150+ echo "PKGDIR_postgresql_simple=${PKGDIR_postgresql_simple}" >> $GITHUB_ENV
206151 touch cabal.project
207152 touch cabal.project.local
208153 echo "packages: ${PKGDIR_postgresql_simple}" >> cabal.project
209− echo "package postgresql-simple" >> cabal.project
210− echo " ghc-options: -Werror=missing-methods" >> cabal.project
154+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package postgresql-simple" >> cabal.project ; fi
155+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
211156 cat >> cabal.project <<EOF
212157 allow-newer: cryptohash-md5-0.11.100.1:base
213158 EOF
@@ -218,12 +163,12 @@ jobs:
218163 run: |
219164 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
220165 cabal-plan
221− - name: restore cache
222− uses: actions/cache/restore@v3
166+ - name: cache
167+ uses: actions/cache@v2
223168 with:
224− key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
169+ key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
225170 path: ~/.cabal/store
226− restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
171+ restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
227172 - name: install dependencies
228173 run: |
229174 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
@@ -243,14 +188,8 @@ jobs:
243188 ${CABAL} -vnormal check
244189 - name: haddock
245190 run: |
246− $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
191+ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
247192 - name: unconstrained build
248193 run: |
249194 rm -f cabal.project.local
250195 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
251− - name: save cache
252− uses: actions/cache/save@v3
253− if: always()
254− with:
255− key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
256− path: ~/.cabal/store