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.20230911
1212#
13- # REGENDATA ("0.16.4 ",["github","hackage-cli.cabal"])
13+ # REGENDATA ("0.17.20230911 ",["github","hackage-cli.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.8.0.20230822
36+ compilerKind : ghc
37+ compilerVersion : 9.8.0.20230822
38+ setup-method : ghcup
39+ allow-failure : true
3540 - compiler : ghc-9.6.2
3641 compilerKind : ghc
3742 compilerVersion : 9.6.2
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
8590 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
8691 if [ "${{ matrix.setup-method }}" = ghcup ]; then
8792 mkdir -p "$HOME/.ghcup/bin"
88- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
93+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
8994 chmod a+x "$HOME/.ghcup/bin/ghcup"
95+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
9096 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
9197 "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
9298 apt-get update
96102 apt-get update
97103 apt-get install -y "$HCNAME" libbrotli-dev
98104 mkdir -p "$HOME/.ghcup/bin"
99- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
105+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
100106 chmod a+x "$HOME/.ghcup/bin/ghcup"
107+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
101108 "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
102109 fi
103110 env :
@@ -112,10 +119,12 @@ jobs:
112119 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
113120 HCDIR=/opt/$HCKIND/$HCVER
114121 if [ "${{ matrix.setup-method }}" = ghcup ]; then
115- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
122+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
123+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
124+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
116125 echo "HC=$HC" >> "$GITHUB_ENV"
117- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER " >> "$GITHUB_ENV"
118- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER " >> "$GITHUB_ENV"
126+ echo "HCPKG=$HCPKG " >> "$GITHUB_ENV"
127+ echo "HADDOCK=$HADDOCK " >> "$GITHUB_ENV"
119128 echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120129 else
121130 HC=$HCDIR/bin/$HCKIND
@@ -129,7 +138,7 @@ jobs:
129138 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
130139 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
131140 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
132- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
141+ if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
133142 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
134143 echo "GHCJSARITH=0" >> "$GITHUB_ENV"
135144 env :
@@ -158,6 +167,18 @@ jobs:
158167 repository hackage.haskell.org
159168 url: http://hackage.haskell.org/
160169 EOF
170+ if $HEADHACKAGE; then
171+ cat >> $CABAL_CONFIG <<EOF
172+ repository head.hackage.ghc.haskell.org
173+ url: https://ghc.gitlab.haskell.org/head.hackage/
174+ secure: True
175+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
176+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
177+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
178+ key-threshold: 3
179+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
180+ EOF
181+ fi
161182 cat >> $CABAL_CONFIG <<EOF
162183 program-default-options
163184 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -181,7 +202,7 @@ jobs:
181202 chmod a+x $HOME/.cabal/bin/cabal-plan
182203 cabal-plan --version
183204 - name : checkout
184- uses : actions/checkout@v3
205+ uses : actions/checkout@v4
185206 with :
186207 path : source
187208 - name : initial cabal.project for sdist
@@ -209,6 +230,9 @@ jobs:
209230 echo " ghc-options: -Werror=missing-methods" >> cabal.project
210231 cat >> cabal.project <<EOF
211232 EOF
233+ if $HEADHACKAGE; then
234+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
235+ fi
212236 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|binary|hackage-cli)$/; }' >> cabal.project.local
213237 cat cabal.project
214238 cat cabal.project.local
0 commit comments