Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e578bfe

Browse files
committedSep 20, 2021
Bump to 3.3, CI for 9.2.1-rc1
1 parent b5e1ba5 commit e578bfe

File tree

3 files changed

+58
-17
lines changed

3 files changed

+58
-17
lines changed
 

‎.github/workflows/haskell-ci.yml

+51-15
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.13.20210606
11+
# version: 0.13.20210901
1212
#
13-
# REGENDATA ("0.13.20210606",["github","tasty-silver.cabal"])
13+
# REGENDATA ("0.13.20210901",["github","tasty-silver.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -26,15 +26,20 @@ jobs:
2626
strategy:
2727
matrix:
2828
include:
29+
- compiler: ghc-9.2.0.20210821
30+
compilerKind: ghc
31+
compilerVersion: 9.2.0.20210821
32+
setup-method: ghcup
33+
allow-failure: true
2934
- compiler: ghc-9.0.1
3035
compilerKind: ghc
3136
compilerVersion: 9.0.1
3237
setup-method: hvr-ppa
3338
allow-failure: false
34-
- compiler: ghc-8.10.4
39+
- compiler: ghc-8.10.7
3540
compilerKind: ghc
36-
compilerVersion: 8.10.4
37-
setup-method: hvr-ppa
41+
compilerVersion: 8.10.7
42+
setup-method: ghcup
3843
allow-failure: false
3944
- compiler: ghc-8.8.4
4045
compilerKind: ghc
@@ -87,9 +92,17 @@ jobs:
8792
run: |
8893
apt-get update
8994
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
90-
apt-add-repository -y 'ppa:hvr/ghc'
91-
apt-get update
92-
apt-get install -y "$HCNAME" cabal-install-3.4
95+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
96+
mkdir -p "$HOME/.ghcup/bin"
97+
curl -sL https://downloads.haskell.org/ghcup/0.1.16.2/x86_64-linux-ghcup-0.1.16.2 > "$HOME/.ghcup/bin/ghcup"
98+
chmod a+x "$HOME/.ghcup/bin/ghcup"
99+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
100+
"$HOME/.ghcup/bin/ghcup" install cabal 3.4.0.0
101+
else
102+
apt-add-repository -y 'ppa:hvr/ghc'
103+
apt-get update
104+
apt-get install -y "$HCNAME" cabal-install-3.4
105+
fi
93106
env:
94107
HCKIND: ${{ matrix.compilerKind }}
95108
HCNAME: ${{ matrix.compiler }}
@@ -101,16 +114,25 @@ jobs:
101114
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
102115
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
103116
HCDIR=/opt/$HCKIND/$HCVER
104-
HC=$HCDIR/bin/$HCKIND
105-
echo "HC=$HC" >> "$GITHUB_ENV"
106-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
107-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
108-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV"
117+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
118+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
119+
echo "HC=$HC" >> "$GITHUB_ENV"
120+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
121+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
122+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.4.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
123+
else
124+
HC=$HCDIR/bin/$HCKIND
125+
echo "HC=$HC" >> "$GITHUB_ENV"
126+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
127+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
128+
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> "$GITHUB_ENV"
129+
fi
130+
109131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112134
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
135+
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
114136
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115137
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116138
env:
@@ -139,6 +161,17 @@ jobs:
139161
repository hackage.haskell.org
140162
url: http://hackage.haskell.org/
141163
EOF
164+
if $HEADHACKAGE; then
165+
cat >> $CABAL_CONFIG <<EOF
166+
repository head.hackage.ghc.haskell.org
167+
url: https://ghc.gitlab.haskell.org/head.hackage/
168+
secure: True
169+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
170+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
171+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
172+
key-threshold: 3
173+
EOF
174+
fi
142175
cat $CABAL_CONFIG
143176
- name: versions
144177
run: |
@@ -186,6 +219,9 @@ jobs:
186219
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
187220
cat >> cabal.project <<EOF
188221
EOF
222+
if $HEADHACKAGE; then
223+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
224+
fi
189225
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(bytestring|directory|process|tasty-silver)$/; }' >> cabal.project.local
190226
cat cabal.project
191227
cat cabal.project.local
@@ -211,7 +247,7 @@ jobs:
211247
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
212248
- name: tests
213249
run: |
214-
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct --test-options=-i
250+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
215251
- name: cabal check
216252
run: |
217253
cd ${PKGDIR_tasty_silver} || false

‎cabal.haskell-ci

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
installed: +all -bytestring -directory -process
2+
3+
-- on Linux we can use ghcup to setup (some) of jobs
4+
-- hvr-ppa latest are 9.0.1 and 8.10.4
5+
ghcup-jobs: >= 9.2 || > 8.10.4 && < 9.0

‎tasty-silver.cabal

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: tasty-silver
2-
version: 3.2.3
2+
version: 3.3
33
synopsis: A fancy test runner, including support for golden tests.
44
description:
55
This package provides a fancy test runner and support for «golden testing».
@@ -29,8 +29,9 @@ extra-source-files:
2929
README.md
3030

3131
tested-with:
32+
GHC == 9.2.0.20210821
3233
GHC == 9.0.1
33-
GHC == 8.10.4
34+
GHC == 8.10.7
3435
GHC == 8.8.4
3536
GHC == 8.6.5
3637
GHC == 8.4.4

0 commit comments

Comments
 (0)
Please sign in to comment.