Skip to content

Commit 933ff1d

Browse files
committed
allow base-4.20, containers-0.7, and test on GHC 9.10
1 parent cc8fbe8 commit 933ff1d

File tree

2 files changed

+37
-51
lines changed

2 files changed

+37
-51
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 34 additions & 48 deletions
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.17.20231203
11+
# version: 0.19.20240708
1212
#
13-
# REGENDATA ("0.17.20231203",["github","palette.cabal"])
13+
# REGENDATA ("0.19.20240708",["github","palette.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,19 +23,24 @@ jobs:
2323
timeout-minutes:
2424
60
2525
container:
26-
image: buildpack-deps:bionic
26+
image: buildpack-deps:jammy
2727
continue-on-error: ${{ matrix.allow-failure }}
2828
strategy:
2929
matrix:
3030
include:
31-
- compiler: ghc-9.8.1
31+
- compiler: ghc-9.10.1
3232
compilerKind: ghc
33-
compilerVersion: 9.8.1
33+
compilerVersion: 9.10.1
3434
setup-method: ghcup
3535
allow-failure: false
36-
- compiler: ghc-9.6.3
36+
- compiler: ghc-9.8.2
3737
compilerKind: ghc
38-
compilerVersion: 9.6.3
38+
compilerVersion: 9.8.2
39+
setup-method: ghcup
40+
allow-failure: false
41+
- compiler: ghc-9.6.5
42+
compilerKind: ghc
43+
compilerVersion: 9.6.5
3944
setup-method: ghcup
4045
allow-failure: false
4146
- compiler: ghc-9.4.8
@@ -61,49 +66,39 @@ jobs:
6166
- compiler: ghc-8.8.4
6267
compilerKind: ghc
6368
compilerVersion: 8.8.4
64-
setup-method: hvr-ppa
69+
setup-method: ghcup
6570
allow-failure: false
6671
- compiler: ghc-8.6.5
6772
compilerKind: ghc
6873
compilerVersion: 8.6.5
69-
setup-method: hvr-ppa
74+
setup-method: ghcup
7075
allow-failure: false
7176
- compiler: ghc-8.4.4
7277
compilerKind: ghc
7378
compilerVersion: 8.4.4
74-
setup-method: hvr-ppa
79+
setup-method: ghcup
7580
allow-failure: false
7681
- compiler: ghc-8.2.2
7782
compilerKind: ghc
7883
compilerVersion: 8.2.2
79-
setup-method: hvr-ppa
84+
setup-method: ghcup
8085
allow-failure: false
8186
- compiler: ghc-8.0.2
8287
compilerKind: ghc
8388
compilerVersion: 8.0.2
84-
setup-method: hvr-ppa
89+
setup-method: ghcup
8590
allow-failure: false
8691
fail-fast: false
8792
steps:
8893
- name: apt
8994
run: |
9095
apt-get update
91-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
92-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
93-
mkdir -p "$HOME/.ghcup/bin"
94-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
95-
chmod a+x "$HOME/.ghcup/bin/ghcup"
96-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
97-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
98-
else
99-
apt-add-repository -y 'ppa:hvr/ghc'
100-
apt-get update
101-
apt-get install -y "$HCNAME"
102-
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
104-
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
106-
fi
96+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
97+
mkdir -p "$HOME/.ghcup/bin"
98+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
99+
chmod a+x "$HOME/.ghcup/bin/ghcup"
100+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
101+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
107102
env:
108103
HCKIND: ${{ matrix.compilerKind }}
109104
HCNAME: ${{ matrix.compiler }}
@@ -115,22 +110,13 @@ jobs:
115110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
116111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
117112
HCDIR=/opt/$HCKIND/$HCVER
118-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
119-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
120-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
121-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
122-
echo "HC=$HC" >> "$GITHUB_ENV"
123-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
124-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
125-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
126-
else
127-
HC=$HCDIR/bin/$HCKIND
128-
echo "HC=$HC" >> "$GITHUB_ENV"
129-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
130-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
131-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
132-
fi
133-
113+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
114+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
115+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
116+
echo "HC=$HC" >> "$GITHUB_ENV"
117+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
118+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
134120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
135121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
136122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -187,7 +173,7 @@ jobs:
187173
chmod a+x $HOME/.cabal/bin/cabal-plan
188174
cabal-plan --version
189175
- name: checkout
190-
uses: actions/checkout@v3
176+
uses: actions/checkout@v4
191177
with:
192178
path: source
193179
- name: initial cabal.project for sdist
@@ -215,15 +201,15 @@ jobs:
215201
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
216202
cat >> cabal.project <<EOF
217203
EOF
218-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(palette)$/; }' >> cabal.project.local
204+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(palette)$/; }' >> cabal.project.local
219205
cat cabal.project
220206
cat cabal.project.local
221207
- name: dump install plan
222208
run: |
223209
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
224210
cabal-plan
225211
- name: restore cache
226-
uses: actions/cache/restore@v3
212+
uses: actions/cache/restore@v4
227213
with:
228214
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
229215
path: ~/.cabal/store
@@ -250,7 +236,7 @@ jobs:
250236
rm -f cabal.project.local
251237
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
252238
- name: save cache
253-
uses: actions/cache/save@v3
239+
uses: actions/cache/save@v4
254240
if: always()
255241
with:
256242
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

palette.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Build-type: Simple
1515
Cabal-version: 1.18
1616
Extra-source-files: README.markdown, diagrams/*.svg
1717
Extra-doc-files: diagrams/*.svg, CHANGES.markdown
18-
Tested-with: GHC ==8.0.2 || == 8.2.2 || == 8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1
18+
Tested-with: GHC ==8.0.2 || == 8.2.2 || == 8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1
1919
Source-repository head
2020
type: git
2121
location: http://github.com/diagrams/palette.git
@@ -28,9 +28,9 @@ Library
2828
Data.Colour.Palette.Types
2929
Data.Colour.Palette.RandomColor
3030

31-
Build-depends: base >= 4.2 && < 4.20,
31+
Build-depends: base >= 4.2 && < 4.21,
3232
array >= 0.4 && < 0.6,
3333
colour >= 2.3 && < 3.0,
34-
containers >= 0.5 && < 0.7,
34+
containers >= 0.5 && < 0.8,
3535
MonadRandom >= 0.5 && < 0.7
3636
hs-source-dirs: src

0 commit comments

Comments
 (0)