66#
77# haskell-ci regenerate
88#
9- # For more information, see https://github.com/haskell-CI /haskell-ci
9+ # For more information, see https://github.com/andreasabel /haskell-ci
1010#
11- # version: 0.16.4
11+ # version: 0.17.20230928
1212#
13- # REGENDATA ("0.16.4 ",["github","regex-posix.cabal"])
13+ # REGENDATA ("0.17.20230928 ",["github","regex-posix.cabal"])
1414#
1515name : Haskell-CI
1616on :
@@ -27,19 +27,24 @@ jobs:
2727 timeout-minutes :
2828 60
2929 container :
30- image : buildpack-deps:bionic
30+ image : buildpack-deps:focal
3131 continue-on-error : ${{ matrix.allow-failure }}
3232 strategy :
3333 matrix :
3434 include :
35- - compiler : ghc-9.6.2
35+ - compiler : ghc-9.8.0.20230919
3636 compilerKind : ghc
37- compilerVersion : 9.6.2
37+ compilerVersion : 9.8.0.20230919
38+ setup-method : ghcup
39+ allow-failure : true
40+ - compiler : ghc-9.6.3
41+ compilerKind : ghc
42+ compilerVersion : 9.6.3
3843 setup-method : ghcup
3944 allow-failure : false
40- - compiler : ghc-9.4.5
45+ - compiler : ghc-9.4.7
4146 compilerKind : ghc
42- compilerVersion : 9.4.5
47+ compilerVersion : 9.4.7
4348 setup-method : ghcup
4449 allow-failure : false
4550 - compiler : ghc-9.2.8
8792 compilerVersion : 7.10.3
8893 setup-method : hvr-ppa
8994 allow-failure : false
90- - compiler : ghc-7.8.4
91- compilerKind : ghc
92- compilerVersion : 7.8.4
93- setup-method : hvr-ppa
94- allow-failure : false
95- - compiler : ghc-7.6.3
96- compilerKind : ghc
97- compilerVersion : 7.6.3
98- setup-method : hvr-ppa
99- allow-failure : false
100- - compiler : ghc-7.4.2
101- compilerKind : ghc
102- compilerVersion : 7.4.2
103- setup-method : hvr-ppa
104- allow-failure : false
105- - compiler : ghc-7.2.2
106- compilerKind : ghc
107- compilerVersion : 7.2.2
108- setup-method : hvr-ppa
109- allow-failure : false
110- - compiler : ghc-7.0.4
111- compilerKind : ghc
112- compilerVersion : 7.0.4
113- setup-method : hvr-ppa
114- allow-failure : false
11595 fail-fast : false
11696 steps :
11797 - name : apt
@@ -120,17 +100,19 @@ jobs:
120100 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
121101 if [ "${{ matrix.setup-method }}" = ghcup ]; then
122102 mkdir -p "$HOME/.ghcup/bin"
123- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
103+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
124104 chmod a+x "$HOME/.ghcup/bin/ghcup"
105+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
125106 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
126107 "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
127108 else
128109 apt-add-repository -y 'ppa:hvr/ghc'
129110 apt-get update
130111 apt-get install -y "$HCNAME"
131112 mkdir -p "$HOME/.ghcup/bin"
132- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
113+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
133114 chmod a+x "$HOME/.ghcup/bin/ghcup"
115+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
134116 "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
135117 fi
136118 env :
@@ -145,10 +127,12 @@ jobs:
145127 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
146128 HCDIR=/opt/$HCKIND/$HCVER
147129 if [ "${{ matrix.setup-method }}" = ghcup ]; then
148- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
130+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
131+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
132+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
149133 echo "HC=$HC" >> "$GITHUB_ENV"
150- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER " >> "$GITHUB_ENV"
151- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER " >> "$GITHUB_ENV"
134+ echo "HCPKG=$HCPKG " >> "$GITHUB_ENV"
135+ echo "HADDOCK=$HADDOCK " >> "$GITHUB_ENV"
152136 echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
153137 else
154138 HC=$HCDIR/bin/$HCKIND
@@ -162,7 +146,7 @@ jobs:
162146 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
163147 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
164148 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
165- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
149+ if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
166150 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
167151 echo "GHCJSARITH=0" >> "$GITHUB_ENV"
168152 env :
@@ -191,6 +175,18 @@ jobs:
191175 repository hackage.haskell.org
192176 url: http://hackage.haskell.org/
193177 EOF
178+ if $HEADHACKAGE; then
179+ cat >> $CABAL_CONFIG <<EOF
180+ repository head.hackage.ghc.haskell.org
181+ url: https://ghc.gitlab.haskell.org/head.hackage/
182+ secure: True
183+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
184+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
185+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
186+ key-threshold: 3
187+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
188+ EOF
189+ fi
194190 cat >> $CABAL_CONFIG <<EOF
195191 program-default-options
196192 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -214,7 +210,7 @@ jobs:
214210 chmod a+x $HOME/.cabal/bin/cabal-plan
215211 cabal-plan --version
216212 - name : checkout
217- uses : actions/checkout@v3
213+ uses : actions/checkout@v4
218214 with :
219215 path : source
220216 - name : initial cabal.project for sdist
@@ -241,7 +237,11 @@ jobs:
241237 if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package regex-posix" >> cabal.project ; fi
242238 if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
243239 cat >> cabal.project <<EOF
240+ allow-newer: containers
244241 EOF
242+ if $HEADHACKAGE; then
243+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
244+ fi
245245 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(regex-posix)$/; }' >> cabal.project.local
246246 cat cabal.project
247247 cat cabal.project.local
@@ -276,6 +276,15 @@ jobs:
276276 run : |
277277 rm -f cabal.project.local
278278 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
279+ - name : prepare for constraint sets
280+ run : |
281+ rm -f cabal.project.local
282+ - name : constraint set containers-0.7
283+ run : |
284+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all --dry-run ; fi
285+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
286+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' --dependencies-only -j2 all ; fi
287+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>= 0.7' all ; fi
279288 - name : save cache
280289 uses : actions/cache/save@v3
281290 if : always()
0 commit comments