|
28 | 28 | strategy:
|
29 | 29 | matrix:
|
30 | 30 | include:
|
| 31 | + - compiler: ghc-9.14.0.20250819 |
| 32 | + compilerKind: ghc |
| 33 | + compilerVersion: 9.14.0.20250819 |
| 34 | + setup-method: ghcup-prerelease |
| 35 | + allow-failure: false |
31 | 36 | - compiler: ghc-9.12.2
|
32 | 37 | compilerKind: ghc
|
33 | 38 | compilerVersion: 9.12.2
|
|
78 | 83 | HCKIND: ${{ matrix.compilerKind }}
|
79 | 84 | HCNAME: ${{ matrix.compiler }}
|
80 | 85 | HCVER: ${{ matrix.compilerVersion }}
|
| 86 | + - name: Install GHC (GHCup prerelease) |
| 87 | + if: matrix.setup-method == 'ghcup-prerelease' |
| 88 | + run: | |
| 89 | + "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases |
| 90 | + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) |
| 91 | + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") |
| 92 | + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') |
| 93 | + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') |
| 94 | + echo "HC=$HC" >> "$GITHUB_ENV" |
| 95 | + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" |
| 96 | + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" |
| 97 | + env: |
| 98 | + HCKIND: ${{ matrix.compilerKind }} |
| 99 | + HCNAME: ${{ matrix.compiler }} |
| 100 | + HCVER: ${{ matrix.compilerVersion }} |
81 | 101 | - name: Set PATH and environment variables
|
82 | 102 | run: |
|
83 | 103 | echo "$HOME/.cabal/bin" >> $GITHUB_PATH
|
|
88 | 108 | echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
|
89 | 109 | echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
|
90 | 110 | echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
|
91 |
| - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" |
| 111 | + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi |
92 | 112 | echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
|
93 | 113 | env:
|
94 | 114 | HCKIND: ${{ matrix.compilerKind }}
|
@@ -116,6 +136,18 @@ jobs:
|
116 | 136 | repository hackage.haskell.org
|
117 | 137 | url: http://hackage.haskell.org/
|
118 | 138 | EOF
|
| 139 | + if $HEADHACKAGE; then |
| 140 | + cat >> $CABAL_CONFIG <<EOF |
| 141 | + repository head.hackage.ghc.haskell.org |
| 142 | + url: https://ghc.gitlab.haskell.org/head.hackage/ |
| 143 | + secure: True |
| 144 | + root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d |
| 145 | + 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 |
| 146 | + f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 |
| 147 | + key-threshold: 3 |
| 148 | + active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override |
| 149 | + EOF |
| 150 | + fi |
119 | 151 | cat >> $CABAL_CONFIG <<EOF
|
120 | 152 | program-default-options
|
121 | 153 | ghc-options: $GHCJOBS +RTS -M3G -RTS
|
@@ -171,6 +203,9 @@ jobs:
|
171 | 203 | echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
|
172 | 204 | cat >> cabal.project <<EOF
|
173 | 205 | 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 |
174 | 209 | $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(purebred)$/; }' >> cabal.project.local
|
175 | 210 | cat cabal.project
|
176 | 211 | cat cabal.project.local
|
|
0 commit comments