@@ -8,9 +8,9 @@
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11−# version: 0.19.20241223
11+# version: 0.11.20210214
1212#
13−# REGENDATA ("0.19.20241223",["github","cabal.project"])
13+# REGENDATA ("0.11.20210214",["github","cabal.project"])
1414#
1515name: Haskell-CI
1616on:
@@ -22,111 +22,65 @@ 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:
30− image: buildpack-deps:jammy
28+ image: buildpack-deps:bionic
3129 continue-on-error: ${{ matrix.allow-failure }}
3230 strategy:
3331 matrix:
3432 include:
35− - compiler: ghc-9.12.1
36− compilerKind: ghc
37− compilerVersion: 9.12.1
38− setup-method: ghcup
33+ - ghc: 8.10.3
3934 allow-failure: false
40− - compiler: ghc-9.10.1
41− compilerKind: ghc
42− compilerVersion: 9.10.1
43− setup-method: ghcup
35+ - ghc: 8.8.4
4436 allow-failure: false
45− - compiler: ghc-9.8.4
46− compilerKind: ghc
47− compilerVersion: 9.8.4
48− setup-method: ghcup
37+ - ghc: 8.6.4
4938 allow-failure: false
50− - compiler: ghc-9.6.6
51− compilerKind: ghc
52− compilerVersion: 9.6.6
53− setup-method: ghcup
39+ - ghc: 8.4.4
5440 allow-failure: false
55− - compiler: ghc-9.4.8
56− compilerKind: ghc
57− compilerVersion: 9.4.8
58− setup-method: ghcup
41+ - ghc: 8.2.2
5942 allow-failure: false
60− - compiler: ghc-9.2.8
61− compilerKind: ghc
62− compilerVersion: 9.2.8
63− setup-method: ghcup
43+ - ghc: 8.0.2
6444 allow-failure: false
65− - compiler: ghc-9.0.2
66− compilerKind: ghc
67− compilerVersion: 9.0.2
68− setup-method: ghcup
45+ - ghc: 7.10.3
6946 allow-failure: false
70− - compiler: ghc-8.10.7
71− compilerKind: ghc
72− compilerVersion: 8.10.7
73− setup-method: ghcup
47+ - ghc: 7.8.4
7448 allow-failure: false
75− - compiler: ghc-8.8.4
76− compilerKind: ghc
77− compilerVersion: 8.8.4
78− setup-method: ghcup
49+ - ghc: 7.6.3
7950 allow-failure: false
80− - compiler: ghc-8.6.5
81− compilerKind: ghc
82− compilerVersion: 8.6.5
83− setup-method: ghcup
51+ - ghc: 7.4.2
8452 allow-failure: false
8553 fail-fast: false
8654 steps:
87− - name: apt-get install
55+ - name: apt
8856 run: |
8957 apt-get update
90− apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91− - name: Install GHCup
92− run: |
93− mkdir -p "$HOME/.ghcup/bin"
94− curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
95− chmod a+x "$HOME/.ghcup/bin/ghcup"
96− - name: Install cabal-install
97− run: |
98− "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99− echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
100− - name: Install GHC (GHCup)
101− if: matrix.setup-method == 'ghcup'
102− run: |
103− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
104− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107− echo "HC=$HC" >> "$GITHUB_ENV"
108− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
58+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
59+ apt-add-repository -y 'ppa:hvr/ghc'
60+ apt-get update
61+ apt-get install -y ghc-$GHC_VERSION cabal-install-3.2
11062 env:
111− HCKIND: ${{ matrix.compilerKind }}
112− HCNAME: ${{ matrix.compiler }}
113− HCVER: ${{ matrix.compilerVersion }}
63+ GHC_VERSION: ${{ matrix.ghc }}
11464 - name: Set PATH and environment variables
11565 run: |
11666 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
117− echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
118− echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
119− echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
67+ echo "LANG=C.UTF-8" >> $GITHUB_ENV
68+ echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
69+ echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
70+ HC=/opt/ghc/$GHC_VERSION/bin/ghc
71+ echo "HC=$HC" >> $GITHUB_ENV
72+ echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
73+ echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
74+ echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
12075 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
121− echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
122− echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
123− echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
124− echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
125− echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
76+ echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
77+ echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
78+ echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV
79+ echo "HEADHACKAGE=false" >> $GITHUB_ENV
80+ echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
81+ echo "GHCJSARITH=0" >> $GITHUB_ENV
12682 env:
127− HCKIND: ${{ matrix.compilerKind }}
128− HCNAME: ${{ matrix.compiler }}
129− HCVER: ${{ matrix.compilerVersion }}
83+ GHC_VERSION: ${{ matrix.ghc }}
13084 - name: env
13185 run: |
13286 env
@@ -149,10 +103,6 @@ jobs:
149103 repository hackage.haskell.org
150104 url: http://hackage.haskell.org/
151105 EOF
152− cat >> $CABAL_CONFIG <<EOF
153− program-default-options
154− ghc-options: $GHCJOBS +RTS -M3G -RTS
155− EOF
156106 cat $CABAL_CONFIG
157107 - name: versions
158108 run: |
@@ -165,14 +115,14 @@ jobs:
165115 - name: install cabal-plan
166116 run: |
167117 mkdir -p $HOME/.cabal/bin
168− 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
169− echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
118+ 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
119+ echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
170120 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
171121 rm -f cabal-plan.xz
172122 chmod a+x $HOME/.cabal/bin/cabal-plan
173123 cabal-plan --version
174124 - name: checkout
175− uses: actions/checkout@v4
125+ uses: actions/checkout@v2
176126 with:
177127 path: source
178128 - name: initial cabal.project for sdist
@@ -192,33 +142,32 @@ jobs:
192142 - name: generate cabal.project
193143 run: |
194144 PKGDIR_uuid_types="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/uuid-types-[0-9.]*')"
195− echo "PKGDIR_uuid_types=${PKGDIR_uuid_types}" >> "$GITHUB_ENV"
145+ echo "PKGDIR_uuid_types=${PKGDIR_uuid_types}" >> $GITHUB_ENV
196146 PKGDIR_uuid="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/uuid-[0-9.]*')"
197− echo "PKGDIR_uuid=${PKGDIR_uuid}" >> "$GITHUB_ENV"
198− rm -f cabal.project cabal.project.local
147+ echo "PKGDIR_uuid=${PKGDIR_uuid}" >> $GITHUB_ENV
199148 touch cabal.project
200149 touch cabal.project.local
201150 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
202151 echo "packages: ${PKGDIR_uuid}" >> cabal.project
203− echo "package uuid-types" >> cabal.project
204− echo " ghc-options: -Werror=missing-methods" >> cabal.project
205− echo "package uuid" >> cabal.project
206− echo " ghc-options: -Werror=missing-methods" >> cabal.project
152+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
153+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
154+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
155+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
207156 cat >> cabal.project <<EOF
208157 EOF
209− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
158+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
210159 cat cabal.project
211160 cat cabal.project.local
212161 - name: dump install plan
213162 run: |
214163 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
215164 cabal-plan
216− - name: restore cache
217− uses: actions/cache/restore@v4
165+ - name: cache
166+ uses: actions/cache@v2
218167 with:
219− key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
168+ key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
220169 path: ~/.cabal/store
221− restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
170+ restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
222171 - name: install dependencies
223172 run: |
224173 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
@@ -240,23 +189,8 @@ jobs:
240189 ${CABAL} -vnormal check
241190 - name: haddock
242191 run: |
243− $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
192+ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
244193 - name: unconstrained build
245194 run: |
246195 rm -f cabal.project.local
247196 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
248− - name: prepare for constraint sets
249− run: |
250− rm -f cabal.project.local
251− - name: constraint set random-1.2
252− run: |
253− $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run
254− cabal-plan topo | sort
255− $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
256− $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
257− - name: save cache
258− if: always()
259− uses: actions/cache/save@v4
260− with:
261− key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
262− path: ~/.cabal/store