Skip to content

Commit 3cdad36

Browse files
committed
CI
1 parent 92c67a6 commit 3cdad36

File tree

1 file changed

+29
-54
lines changed

1 file changed

+29
-54
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 29 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.17.20231010
11+
# version: 0.19.20241021
1212
#
13-
# REGENDATA ("0.17.20231010",["github","vector-algorithms.cabal"])
13+
# REGENDATA ("0.19.20241021",["github","vector-algorithms.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,7 +27,7 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:focal
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
@@ -42,9 +42,9 @@ jobs:
4242
compilerVersion: 9.8.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.6.5
45+
- compiler: ghc-9.6.3
4646
compilerKind: ghc
47-
compilerVersion: 9.6.5
47+
compilerVersion: 9.6.3
4848
setup-method: ghcup
4949
allow-failure: false
5050
- compiler: ghc-9.4.7
@@ -70,56 +70,40 @@ jobs:
7070
- compiler: ghc-8.8.4
7171
compilerKind: ghc
7272
compilerVersion: 8.8.4
73-
setup-method: hvr-ppa
73+
setup-method: ghcup
7474
allow-failure: false
7575
- compiler: ghc-8.6.5
7676
compilerKind: ghc
7777
compilerVersion: 8.6.5
78-
setup-method: hvr-ppa
78+
setup-method: ghcup
7979
allow-failure: false
8080
- compiler: ghc-8.4.4
8181
compilerKind: ghc
8282
compilerVersion: 8.4.4
83-
setup-method: hvr-ppa
83+
setup-method: ghcup
8484
allow-failure: false
8585
- compiler: ghc-8.2.2
8686
compilerKind: ghc
8787
compilerVersion: 8.2.2
88-
setup-method: hvr-ppa
88+
setup-method: ghcup
8989
allow-failure: false
9090
- compiler: ghc-8.0.2
9191
compilerKind: ghc
9292
compilerVersion: 8.0.2
93-
setup-method: hvr-ppa
94-
allow-failure: false
95-
- compiler: ghc-7.10.3
96-
compilerKind: ghc
97-
compilerVersion: 7.10.3
98-
setup-method: hvr-ppa
93+
setup-method: ghcup
9994
allow-failure: false
10095
fail-fast: false
10196
steps:
10297
- name: apt
10398
run: |
10499
apt-get update
105-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
106-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
107-
mkdir -p "$HOME/.ghcup/bin"
108-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
109-
chmod a+x "$HOME/.ghcup/bin/ghcup"
110-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
111-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
112-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
113-
else
114-
apt-add-repository -y 'ppa:hvr/ghc'
115-
apt-get update
116-
apt-get install -y "$HCNAME"
117-
mkdir -p "$HOME/.ghcup/bin"
118-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
119-
chmod a+x "$HOME/.ghcup/bin/ghcup"
120-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
121-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122-
fi
100+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101+
mkdir -p "$HOME/.ghcup/bin"
102+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
103+
chmod a+x "$HOME/.ghcup/bin/ghcup"
104+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
105+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
106+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123107
env:
124108
HCKIND: ${{ matrix.compilerKind }}
125109
HCNAME: ${{ matrix.compiler }}
@@ -131,25 +115,16 @@ jobs:
131115
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
132116
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
133117
HCDIR=/opt/$HCKIND/$HCVER
134-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
135-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
136-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
137-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
138-
echo "HC=$HC" >> "$GITHUB_ENV"
139-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
140-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
141-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
142-
else
143-
HC=$HCDIR/bin/$HCKIND
144-
echo "HC=$HC" >> "$GITHUB_ENV"
145-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
146-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
147-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
148-
fi
149-
118+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121+
echo "HC=$HC" >> "$GITHUB_ENV"
122+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
150125
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
151126
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
152-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
127+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
153128
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
154129
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
155130
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
@@ -231,15 +206,15 @@ jobs:
231206
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
232207
cat >> cabal.project <<EOF
233208
EOF
234-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(vector-algorithms)$/; }' >> cabal.project.local
209+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(vector-algorithms)$/; }' >> cabal.project.local
235210
cat cabal.project
236211
cat cabal.project.local
237212
- name: dump install plan
238213
run: |
239214
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
240215
cabal-plan
241216
- name: restore cache
242-
uses: actions/cache/restore@v3
217+
uses: actions/cache/restore@v4
243218
with:
244219
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
245220
path: ~/.cabal/store
@@ -256,7 +231,7 @@ jobs:
256231
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
257232
- name: tests
258233
run: |
259-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
234+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
260235
- name: cabal check
261236
run: |
262237
cd ${PKGDIR_vector_algorithms} || false
@@ -269,7 +244,7 @@ jobs:
269244
rm -f cabal.project.local
270245
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
271246
- name: save cache
272-
uses: actions/cache/save@v3
247+
uses: actions/cache/save@v4
273248
if: always()
274249
with:
275250
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

0 commit comments

Comments
 (0)