Skip to content

Commit 84c16c1

Browse files
committed
Bump agda-stdlib-utils to 1.7.3; update its dependencies and CI
1 parent 2f2c413 commit 84c16c1

File tree

2 files changed

+146
-50
lines changed

2 files changed

+146
-50
lines changed

.github/workflows/haskell-ci.yml

+137-43
Original file line numberDiff line numberDiff line change
@@ -6,79 +6,144 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/haskell-CI/haskell-ci
9+
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.12.1
11+
# version: 0.17.20231002
1212
#
13-
# REGENDATA ("0.12.1",["github","--no-cabal-check","agda-stdlib-utils.cabal"])
13+
# REGENDATA ("0.17.20231002",["github","--no-cabal-check","agda-stdlib-utils.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
17-
push:
18-
branches:
19-
- master
20-
- experimental
21-
pull_request:
22-
branches:
23-
- master
24-
- experimental
17+
- push
18+
- pull_request
2519
jobs:
2620
linux:
2721
name: Haskell-CI - Linux - ${{ matrix.compiler }}
28-
runs-on: ubuntu-18.04
22+
runs-on: ubuntu-20.04
23+
timeout-minutes:
24+
60
2925
container:
30-
image: buildpack-deps:xenial
26+
image: buildpack-deps:focal
3127
continue-on-error: ${{ matrix.allow-failure }}
3228
strategy:
3329
matrix:
3430
include:
35-
- compiler: ghc-9.0.1
31+
- compiler: ghc-9.8.0.20230929
32+
compilerKind: ghc
33+
compilerVersion: 9.8.0.20230929
34+
setup-method: ghcup
35+
allow-failure: true
36+
- compiler: ghc-9.6.3
37+
compilerKind: ghc
38+
compilerVersion: 9.6.3
39+
setup-method: ghcup
3640
allow-failure: false
37-
- compiler: ghc-8.10.4
41+
- compiler: ghc-9.4.7
42+
compilerKind: ghc
43+
compilerVersion: 9.4.7
44+
setup-method: ghcup
45+
allow-failure: false
46+
- compiler: ghc-9.2.8
47+
compilerKind: ghc
48+
compilerVersion: 9.2.8
49+
setup-method: ghcup
50+
allow-failure: false
51+
- compiler: ghc-9.0.2
52+
compilerKind: ghc
53+
compilerVersion: 9.0.2
54+
setup-method: ghcup
55+
allow-failure: false
56+
- compiler: ghc-8.10.7
57+
compilerKind: ghc
58+
compilerVersion: 8.10.7
59+
setup-method: ghcup
3860
allow-failure: false
3961
- compiler: ghc-8.8.4
62+
compilerKind: ghc
63+
compilerVersion: 8.8.4
64+
setup-method: hvr-ppa
4065
allow-failure: false
4166
- compiler: ghc-8.6.5
67+
compilerKind: ghc
68+
compilerVersion: 8.6.5
69+
setup-method: hvr-ppa
4270
allow-failure: false
4371
- compiler: ghc-8.4.4
72+
compilerKind: ghc
73+
compilerVersion: 8.4.4
74+
setup-method: hvr-ppa
4475
allow-failure: false
4576
- compiler: ghc-8.2.2
77+
compilerKind: ghc
78+
compilerVersion: 8.2.2
79+
setup-method: hvr-ppa
4680
allow-failure: false
4781
- compiler: ghc-8.0.2
82+
compilerKind: ghc
83+
compilerVersion: 8.0.2
84+
setup-method: hvr-ppa
4885
allow-failure: false
4986
fail-fast: false
5087
steps:
5188
- name: apt
5289
run: |
5390
apt-get update
54-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
55-
apt-add-repository -y 'ppa:hvr/ghc'
56-
apt-get update
57-
apt-get install -y $CC cabal-install-3.4
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.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
95+
chmod a+x "$HOME/.ghcup/bin/ghcup"
96+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
97+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
98+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
else
100+
apt-add-repository -y 'ppa:hvr/ghc'
101+
apt-get update
102+
apt-get install -y "$HCNAME"
103+
mkdir -p "$HOME/.ghcup/bin"
104+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
105+
chmod a+x "$HOME/.ghcup/bin/ghcup"
106+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
107+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
108+
fi
58109
env:
59-
CC: ${{ matrix.compiler }}
110+
HCKIND: ${{ matrix.compilerKind }}
111+
HCNAME: ${{ matrix.compiler }}
112+
HCVER: ${{ matrix.compilerVersion }}
60113
- name: Set PATH and environment variables
61114
run: |
62115
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
63-
echo "LANG=C.UTF-8" >> $GITHUB_ENV
64-
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
65-
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
66-
HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
67-
HCNAME=ghc
68-
HC=$HCDIR/bin/$HCNAME
69-
echo "HC=$HC" >> $GITHUB_ENV
70-
echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
71-
echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
72-
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
116+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
117+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
118+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
119+
HCDIR=/opt/$HCKIND/$HCVER
120+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
121+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
122+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
123+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
124+
echo "HC=$HC" >> "$GITHUB_ENV"
125+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
126+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
127+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
128+
else
129+
HC=$HCDIR/bin/$HCKIND
130+
echo "HC=$HC" >> "$GITHUB_ENV"
131+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
132+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
133+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
134+
fi
135+
73136
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
74-
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
75-
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
76-
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
77-
echo "HEADHACKAGE=false" >> $GITHUB_ENV
78-
echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
79-
echo "GHCJSARITH=0" >> $GITHUB_ENV
137+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
138+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
139+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
140+
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
141+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
142+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
80143
env:
81-
CC: ${{ matrix.compiler }}
144+
HCKIND: ${{ matrix.compilerKind }}
145+
HCNAME: ${{ matrix.compiler }}
146+
HCVER: ${{ matrix.compilerVersion }}
82147
- name: env
83148
run: |
84149
env
@@ -101,6 +166,22 @@ jobs:
101166
repository hackage.haskell.org
102167
url: http://hackage.haskell.org/
103168
EOF
169+
if $HEADHACKAGE; then
170+
cat >> $CABAL_CONFIG <<EOF
171+
repository head.hackage.ghc.haskell.org
172+
url: https://ghc.gitlab.haskell.org/head.hackage/
173+
secure: True
174+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
175+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
176+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
177+
key-threshold: 3
178+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
179+
EOF
180+
fi
181+
cat >> $CABAL_CONFIG <<EOF
182+
program-default-options
183+
ghc-options: $GHCJOBS +RTS -M3G -RTS
184+
EOF
104185
cat $CABAL_CONFIG
105186
- name: versions
106187
run: |
@@ -113,14 +194,14 @@ jobs:
113194
- name: install cabal-plan
114195
run: |
115196
mkdir -p $HOME/.cabal/bin
116-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
117-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
197+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
198+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
118199
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
119200
rm -f cabal-plan.xz
120201
chmod a+x $HOME/.cabal/bin/cabal-plan
121202
cabal-plan --version
122203
- name: checkout
123-
uses: actions/checkout@v2
204+
uses: actions/checkout@v4
124205
with:
125206
path: source
126207
- name: initial cabal.project for sdist
@@ -139,23 +220,27 @@ jobs:
139220
- name: generate cabal.project
140221
run: |
141222
PKGDIR_agda_stdlib_utils="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/agda-stdlib-utils-[0-9.]*')"
142-
echo "PKGDIR_agda_stdlib_utils=${PKGDIR_agda_stdlib_utils}" >> $GITHUB_ENV
223+
echo "PKGDIR_agda_stdlib_utils=${PKGDIR_agda_stdlib_utils}" >> "$GITHUB_ENV"
224+
rm -f cabal.project cabal.project.local
143225
touch cabal.project
144226
touch cabal.project.local
145227
echo "packages: ${PKGDIR_agda_stdlib_utils}" >> cabal.project
146228
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package agda-stdlib-utils" >> cabal.project ; fi
147229
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
148230
cat >> cabal.project <<EOF
149231
EOF
232+
if $HEADHACKAGE; then
233+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
234+
fi
150235
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(agda-stdlib-utils)$/; }' >> cabal.project.local
151236
cat cabal.project
152237
cat cabal.project.local
153238
- name: dump install plan
154239
run: |
155240
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
156241
cabal-plan
157-
- name: cache
158-
uses: actions/cache@v2
242+
- name: restore cache
243+
uses: actions/cache/restore@v3
159244
with:
160245
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
161246
path: ~/.cabal/store
@@ -170,7 +255,16 @@ jobs:
170255
- name: build
171256
run: |
172257
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
258+
- name: haddock
259+
run: |
260+
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
173261
- name: unconstrained build
174262
run: |
175263
rm -f cabal.project.local
176264
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
265+
- name: save cache
266+
uses: actions/cache/save@v3
267+
if: always()
268+
with:
269+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
270+
path: ~/.cabal/store

agda-stdlib-utils.cabal

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: agda-stdlib-utils
2-
version: 1.7.2
2+
version: 1.7.3
33
cabal-version: >= 1.10
44
build-type: Simple
55
description: Helper programs.
@@ -11,24 +11,26 @@ tested-with: GHC == 8.0.2
1111
GHC == 8.8.4
1212
GHC == 8.10.7
1313
GHC == 9.0.2
14-
GHC == 9.2.1
15-
GHC == 9.4.4
14+
GHC == 9.2.8
15+
GHC == 9.4.7
16+
GHC == 9.6.3
17+
GHC == 9.8.0
1618

1719
executable GenerateEverything
1820
hs-source-dirs: .
1921
main-is: GenerateEverything.hs
2022
default-language: Haskell2010
2123
default-extensions: PatternGuards, PatternSynonyms
22-
build-depends: base >= 4.9.0.0 && < 4.18
24+
build-depends: base >= 4.9.0.0 && < 4.20
2325
, directory >= 1.0.0.0 && < 1.4
2426
, filemanip >= 0.3.6.2 && < 0.4
2527
, filepath >= 1.4.1.0 && < 1.5
26-
, mtl >= 2.2.2 && < 2.3
28+
, mtl >= 2.2.2 && < 2.4
2729

2830
executable AllNonAsciiChars
2931
hs-source-dirs: .
3032
main-is: AllNonAsciiChars.hs
3133
default-language: Haskell2010
32-
build-depends: base >= 4.9.0.0 && < 4.18
34+
build-depends: base >= 4.9.0.0 && < 4.20
3335
, filemanip >= 0.3.6.2 && < 0.4
34-
, text >= 1.2.3.0 && < 2.1
36+
, text >= 1.2.3.0 && < 2.2

0 commit comments

Comments
 (0)