88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.19.20240402
11+ # version: 0.19.20250115
1212#
13- # REGENDATA ("0.19.20240402 ",["github","cabal.project.ci"])
13+ # REGENDATA ("0.19.20250115 ",["github","cabal.project.ci"])
1414#
1515name : Haskell-CI
1616on :
@@ -23,11 +23,21 @@ jobs:
2323 timeout-minutes :
2424 60
2525 container :
26- image : buildpack-deps:bionic
26+ image : buildpack-deps:jammy
2727 continue-on-error : ${{ matrix.allow-failure }}
2828 strategy :
2929 matrix :
3030 include :
31+ - compiler : ghc-9.12.1
32+ compilerKind : ghc
33+ compilerVersion : 9.12.1
34+ setup-method : ghcup
35+ allow-failure : false
36+ - compiler : ghc-9.10.1
37+ compilerKind : ghc
38+ compilerVersion : 9.10.1
39+ setup-method : ghcup
40+ allow-failure : false
3141 - compiler : ghc-9.8.2
3242 compilerKind : ghc
3343 compilerVersion : 9.8.2
@@ -55,18 +65,30 @@ jobs:
5565 allow-failure : false
5666 fail-fast : false
5767 steps :
58- - name : apt
68+ - name : apt-get install
5969 run : |
6070 apt-get update
6171 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
72+ apt-get install -y libsnappy-dev
73+ - name : Install GHCup
74+ run : |
6275 mkdir -p "$HOME/.ghcup/bin"
63- curl -sL https://downloads.haskell.org/ghcup/0.1.20 .0/x86_64-linux-ghcup-0.1.20 .0 > "$HOME/.ghcup/bin/ghcup"
76+ curl -sL https://downloads.haskell.org/ghcup/0.1.30 .0/x86_64-linux-ghcup-0.1.30 .0 > "$HOME/.ghcup/bin/ghcup"
6477 chmod a+x "$HOME/.ghcup/bin/ghcup"
65- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
78+ - name : Install cabal-install
79+ run : |
80+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
81+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
82+ - name : Install GHC (GHCup)
83+ if : matrix.setup-method == 'ghcup'
84+ run : |
6685 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
67- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
68- apt-get update
69- apt-get install -y libsnappy-dev
86+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
87+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
88+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
89+ echo "HC=$HC" >> "$GITHUB_ENV"
90+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
91+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
7092 env :
7193 HCKIND : ${{ matrix.compilerKind }}
7294 HCNAME : ${{ matrix.compiler }}
@@ -77,21 +99,12 @@ jobs:
7799 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
78100 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
79101 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
80- HCDIR=/opt/$HCKIND/$HCVER
81- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
82- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
83- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
84- echo "HC=$HC" >> "$GITHUB_ENV"
85- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
86- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
87- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
88102 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
89103 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
90104 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
91105 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
92106 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
93107 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
94- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
95108 env :
96109 HCKIND : ${{ matrix.compilerKind }}
97110 HCNAME : ${{ matrix.compiler }}
@@ -141,7 +154,7 @@ jobs:
141154 chmod a+x $HOME/.cabal/bin/cabal-plan
142155 cabal-plan --version
143156 - name : checkout
144- uses : actions/checkout@v3
157+ uses : actions/checkout@v4
145158 with :
146159 path : source
147160 - name : initial cabal.project for sdist
@@ -178,15 +191,15 @@ jobs:
178191 benchmarks: True
179192 ghc-options: -Werror
180193 EOF
181- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(snappy-c)$/; }' >> cabal.project.local
194+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(snappy-c)$/; }' >> cabal.project.local
182195 cat cabal.project
183196 cat cabal.project.local
184197 - name : dump install plan
185198 run : |
186199 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
187200 cabal-plan
188201 - name : restore cache
189- uses : actions/cache/restore@v3
202+ uses : actions/cache/restore@v4
190203 with :
191204 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
192205 path : ~/.cabal/store
@@ -216,8 +229,8 @@ jobs:
216229 rm -f cabal.project.local
217230 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
218231 - name : save cache
219- uses : actions/cache/save@v3
220232 if : always()
233+ uses : actions/cache/save@v4
221234 with :
222235 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
223236 path : ~/.cabal/store
0 commit comments