88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.17.20231219
11+ # version: 0.19.20241202
1212#
13- # REGENDATA ("0.17.20231219 ",["github","brick.cabal"])
13+ # REGENDATA ("0.19.20241202 ",["github","brick.cabal"])
1414#
1515name : Haskell-CI
1616on :
@@ -27,19 +27,34 @@ jobs:
2727 timeout-minutes :
2828 60
2929 container :
30- image : buildpack-deps:bionic
30+ image : buildpack-deps:jammy
3131 continue-on-error : ${{ matrix.allow-failure }}
3232 strategy :
3333 matrix :
3434 include :
35- - compiler : ghc-9.8.1
35+ - compiler : ghc-9.12.0.20241128
3636 compilerKind : ghc
37- compilerVersion : 9.8.1
37+ compilerVersion : 9.12.0.20241128
3838 setup-method : ghcup
3939 allow-failure : false
40- - compiler : ghc-9.6.3
40+ - compiler : ghc-9.12.0.20241128
4141 compilerKind : ghc
42- compilerVersion : 9.6.3
42+ compilerVersion : 9.12.0.20241128
43+ setup-method : ghcup-prerelease
44+ allow-failure : false
45+ - compiler : ghc-9.10.1
46+ compilerKind : ghc
47+ compilerVersion : 9.10.1
48+ setup-method : ghcup
49+ allow-failure : false
50+ - compiler : ghc-9.8.4
51+ compilerKind : ghc
52+ compilerVersion : 9.8.4
53+ setup-method : ghcup
54+ allow-failure : false
55+ - compiler : ghc-9.6.6
56+ compilerKind : ghc
57+ compilerVersion : 9.6.6
4358 setup-method : ghcup
4459 allow-failure : false
4560 - compiler : ghc-9.4.8
@@ -62,47 +77,46 @@ jobs:
6277 compilerVersion : 8.10.7
6378 setup-method : ghcup
6479 allow-failure : false
65- - compiler : ghc-8.8.4
66- compilerKind : ghc
67- compilerVersion : 8.8.4
68- setup-method : hvr-ppa
69- allow-failure : false
70- - compiler : ghc-8.6.5
71- compilerKind : ghc
72- compilerVersion : 8.6.5
73- setup-method : hvr-ppa
74- allow-failure : false
75- - compiler : ghc-8.4.4
76- compilerKind : ghc
77- compilerVersion : 8.4.4
78- setup-method : hvr-ppa
79- allow-failure : false
80- - compiler : ghc-8.2.2
81- compilerKind : ghc
82- compilerVersion : 8.2.2
83- setup-method : hvr-ppa
84- allow-failure : false
8580 fail-fast : false
8681 steps :
87- - name : apt
82+ - name : apt-get install
8883 run : |
8984 apt-get update
9085 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91- if [ "${{ matrix.setup-method }}" = ghcup ]; then
92- mkdir -p "$HOME/.ghcup/bin"
93- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
94- chmod a+x "$HOME/.ghcup/bin/ghcup"
95- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97- else
98- apt-add-repository -y 'ppa:hvr/ghc'
99- apt-get update
100- apt-get install -y "$HCNAME"
101- mkdir -p "$HOME/.ghcup/bin"
102- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
103- chmod a+x "$HOME/.ghcup/bin/ghcup"
104- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105- fi
86+ - name : Install GHCup
87+ run : |
88+ mkdir -p "$HOME/.ghcup/bin"
89+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
90+ chmod a+x "$HOME/.ghcup/bin/ghcup"
91+ - name : Install cabal-install
92+ run : |
93+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
94+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
95+ - name : Install GHC (GHCup)
96+ if : matrix.setup-method == 'ghcup'
97+ run : |
98+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
99+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
100+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
101+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
102+ echo "HC=$HC" >> "$GITHUB_ENV"
103+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
104+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
105+ env :
106+ HCKIND : ${{ matrix.compilerKind }}
107+ HCNAME : ${{ matrix.compiler }}
108+ HCVER : ${{ matrix.compilerVersion }}
109+ - name : Install GHC (GHCup prerelease)
110+ if : matrix.setup-method == 'ghcup-prerelease'
111+ run : |
112+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
113+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
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"
106120 env :
107121 HCKIND : ${{ matrix.compilerKind }}
108122 HCNAME : ${{ matrix.compiler }}
@@ -113,30 +127,12 @@ jobs:
113127 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
114128 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
115129 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
116- HCDIR=/opt/$HCKIND/$HCVER
117- if [ "${{ matrix.setup-method }}" = ghcup ]; then
118- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121- echo "HC=$HC" >> "$GITHUB_ENV"
122- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
125- else
126- HC=$HCDIR/bin/$HCKIND
127- echo "HC=$HC" >> "$GITHUB_ENV"
128- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
129- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
130- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131- fi
132-
133130 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
134131 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
135132 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
136133 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
137- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
134+ if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
138135 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
139- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
140136 env :
141137 HCKIND : ${{ matrix.compilerKind }}
142138 HCNAME : ${{ matrix.compiler }}
@@ -163,6 +159,18 @@ jobs:
163159 repository hackage.haskell.org
164160 url: http://hackage.haskell.org/
165161 EOF
162+ if $HEADHACKAGE; then
163+ cat >> $CABAL_CONFIG <<EOF
164+ repository head.hackage.ghc.haskell.org
165+ url: https://ghc.gitlab.haskell.org/head.hackage/
166+ secure: True
167+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
168+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
169+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
170+ key-threshold: 3
171+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
172+ EOF
173+ fi
166174 cat >> $CABAL_CONFIG <<EOF
167175 program-default-options
168176 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -186,7 +194,7 @@ jobs:
186194 chmod a+x $HOME/.cabal/bin/cabal-plan
187195 cabal-plan --version
188196 - name : checkout
189- uses : actions/checkout@v3
197+ uses : actions/checkout@v4
190198 with :
191199 path : source
192200 - name : initial cabal.project for sdist
@@ -216,15 +224,18 @@ jobs:
216224 package brick
217225 flags: +demos
218226 EOF
219- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(brick)$/; }' >> cabal.project.local
227+ if $HEADHACKAGE; then
228+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
229+ fi
230+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(brick)$/; }' >> cabal.project.local
220231 cat cabal.project
221232 cat cabal.project.local
222233 - name : dump install plan
223234 run : |
224235 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
225236 cabal-plan
226237 - name : restore cache
227- uses : actions/cache/restore@v3
238+ uses : actions/cache/restore@v4
228239 with :
229240 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
230241 path : ~/.cabal/store
@@ -254,8 +265,8 @@ jobs:
254265 rm -f cabal.project.local
255266 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
256267 - name : save cache
257- uses : actions/cache/save@v3
258268 if : always()
269+ uses : actions/cache/save@v4
259270 with :
260271 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
261272 path : ~/.cabal/store
0 commit comments