88#
99# For more information, see https://github.com/andreasabel/haskell-ci
1010#
11- # version: 0.17.20231010
11+ # version: 0.19.20240403
1212#
13- # REGENDATA ("0.17.20231010 ",["github","io-streams.cabal"])
13+ # REGENDATA ("0.19.20240403 ",["github","io-streams.cabal"])
1414#
1515name : Haskell-CI
1616on :
@@ -32,19 +32,24 @@ jobs:
3232 strategy :
3333 matrix :
3434 include :
35- - compiler : ghc-9.8.1
35+ - compiler : ghc-9.10.0.20240328
3636 compilerKind : ghc
37- compilerVersion : 9.8.1
37+ compilerVersion : 9.10.0.20240328
3838 setup-method : ghcup
3939 allow-failure : false
40- - compiler : ghc-9.6.3
40+ - compiler : ghc-9.8.2
4141 compilerKind : ghc
42- compilerVersion : 9.6.3
42+ compilerVersion : 9.8.2
4343 setup-method : ghcup
4444 allow-failure : false
45- - compiler : ghc-9.4.7
45+ - compiler : ghc-9.6.4
4646 compilerKind : ghc
47- compilerVersion : 9.4.7
47+ compilerVersion : 9.6.4
48+ setup-method : ghcup
49+ allow-failure : false
50+ - compiler : ghc-9.4.8
51+ compilerKind : ghc
52+ compilerVersion : 9.4.8
4853 setup-method : ghcup
4954 allow-failure : false
5055 - compiler : ghc-9.2.8
@@ -65,36 +70,25 @@ jobs:
6570 - compiler : ghc-8.8.4
6671 compilerKind : ghc
6772 compilerVersion : 8.8.4
68- setup-method : hvr-ppa
73+ setup-method : ghcup
6974 allow-failure : false
7075 - compiler : ghc-8.6.5
7176 compilerKind : ghc
7277 compilerVersion : 8.6.5
73- setup-method : hvr-ppa
78+ setup-method : ghcup
7479 allow-failure : false
7580 fail-fast : false
7681 steps :
7782 - name : apt
7883 run : |
7984 apt-get update
8085 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
81- if [ "${{ matrix.setup-method }}" = ghcup ]; then
82- mkdir -p "$HOME/.ghcup/bin"
83- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
84- chmod a+x "$HOME/.ghcup/bin/ghcup"
85- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
86- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
87- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
88- else
89- apt-add-repository -y 'ppa:hvr/ghc'
90- apt-get update
91- apt-get install -y "$HCNAME"
92- mkdir -p "$HOME/.ghcup/bin"
93- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
94- 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;
96- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97- fi
86+ mkdir -p "$HOME/.ghcup/bin"
87+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88+ chmod a+x "$HOME/.ghcup/bin/ghcup"
89+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
90+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
91+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
9892 env :
9993 HCKIND : ${{ matrix.compilerKind }}
10094 HCNAME : ${{ matrix.compiler }}
@@ -106,27 +100,18 @@ jobs:
106100 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
107101 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
108102 HCDIR=/opt/$HCKIND/$HCVER
109- if [ "${{ matrix.setup-method }}" = ghcup ]; then
110- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
111- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
112- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
113- echo "HC=$HC" >> "$GITHUB_ENV"
114- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
115- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
116- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
117- else
118- HC=$HCDIR/bin/$HCKIND
119- echo "HC=$HC" >> "$GITHUB_ENV"
120- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
121- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
122- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
123- fi
124-
103+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
104+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
105+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
106+ echo "HC=$HC" >> "$GITHUB_ENV"
107+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
108+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
109+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
125110 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
126111 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
127112 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
128113 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
129- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114+ if [ $((HCNUMVER >= 91000)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
130115 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
131116 echo "GHCJSARITH=0" >> "$GITHUB_ENV"
132117 env :
@@ -155,6 +140,18 @@ jobs:
155140 repository hackage.haskell.org
156141 url: http://hackage.haskell.org/
157142 EOF
143+ if $HEADHACKAGE; then
144+ cat >> $CABAL_CONFIG <<EOF
145+ repository head.hackage.ghc.haskell.org
146+ url: https://ghc.gitlab.haskell.org/head.hackage/
147+ secure: True
148+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
149+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
150+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
151+ key-threshold: 3
152+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
153+ EOF
154+ fi
158155 cat >> $CABAL_CONFIG <<EOF
159156 program-default-options
160157 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -202,10 +199,13 @@ jobs:
202199 touch cabal.project
203200 touch cabal.project.local
204201 echo "packages: ${PKGDIR_io_streams}" >> cabal.project
205- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package io-streams" >> cabal.project ; fi
206- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
202+ echo "package io-streams" >> cabal.project
203+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
207204 cat >> cabal.project <<EOF
208205 EOF
206+ if $HEADHACKAGE; then
207+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
208+ fi
209209 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(io-streams)$/; }' >> cabal.project.local
210210 cat cabal.project
211211 cat cabal.project.local
@@ -214,7 +214,7 @@ jobs:
214214 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
215215 cabal-plan
216216 - name : restore cache
217- uses : actions/cache/restore@v3
217+ uses : actions/cache/restore@v4
218218 with :
219219 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
220220 path : ~/.cabal/store
@@ -244,7 +244,7 @@ jobs:
244244 rm -f cabal.project.local
245245 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
246246 - name : save cache
247- uses : actions/cache/save@v3
247+ uses : actions/cache/save@v4
248248 if : always()
249249 with :
250250 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments