Skip to content

Commit 8ede1fc

Browse files
authored
Update cabal file to 0.7 (#994)
* Fix missing contributions in changelog * Fix CI
1 parent 5d4bc2e commit 8ede1fc

File tree

3 files changed

+35
-47
lines changed

3 files changed

+35
-47
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 25 additions & 45 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.20240109
11+
# version: 0.19.20240708
1212
#
13-
# REGENDATA ("0.17.20240109",["github","--config=cabal.haskell-ci","--ghc-head","cabal.project"])
13+
# REGENDATA ("0.19.20240708",["github","--config=cabal.haskell-ci","--ghc-head","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -27,7 +27,7 @@ jobs:
2727
timeout-minutes:
2828
60
2929
container:
30-
image: buildpack-deps:bionic
30+
image: buildpack-deps:jammy
3131
continue-on-error: ${{ matrix.allow-failure }}
3232
strategy:
3333
matrix:
@@ -65,46 +65,35 @@ jobs:
6565
- compiler: ghc-8.8.4
6666
compilerKind: ghc
6767
compilerVersion: 8.8.4
68-
setup-method: hvr-ppa
68+
setup-method: ghcup
6969
allow-failure: false
7070
- compiler: ghc-8.6.5
7171
compilerKind: ghc
7272
compilerVersion: 8.6.5
73-
setup-method: hvr-ppa
73+
setup-method: ghcup
7474
allow-failure: false
7575
- compiler: ghc-8.4.4
7676
compilerKind: ghc
7777
compilerVersion: 8.4.4
78-
setup-method: hvr-ppa
78+
setup-method: ghcup
7979
allow-failure: false
8080
- compiler: ghc-8.2.2
8181
compilerKind: ghc
8282
compilerVersion: 8.2.2
83-
setup-method: hvr-ppa
83+
setup-method: ghcup
8484
allow-failure: false
8585
fail-fast: false
8686
steps:
8787
- name: apt
8888
run: |
8989
apt-get update
90-
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
92-
mkdir -p "$HOME/.ghcup/bin"
93-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
94-
chmod a+x "$HOME/.ghcup/bin/ghcup"
95-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
106-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
107-
fi
90+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
91+
mkdir -p "$HOME/.ghcup/bin"
92+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
93+
chmod a+x "$HOME/.ghcup/bin/ghcup"
94+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
95+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
10897
env:
10998
HCKIND: ${{ matrix.compilerKind }}
11099
HCNAME: ${{ matrix.compiler }}
@@ -116,22 +105,13 @@ jobs:
116105
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
117106
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
118107
HCDIR=/opt/$HCKIND/$HCVER
119-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
120-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
121-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
122-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
123-
echo "HC=$HC" >> "$GITHUB_ENV"
124-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
125-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
126-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
127-
else
128-
HC=$HCDIR/bin/$HCKIND
129-
echo "HC=$HC" >> "$GITHUB_ENV"
130-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
131-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
132-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
133-
fi
134-
108+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
109+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
110+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
111+
echo "HC=$HC" >> "$GITHUB_ENV"
112+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
113+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
114+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
135115
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
136116
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
137117
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -200,7 +180,7 @@ jobs:
200180
chmod a+x $HOME/.cabal/bin/cabal-plan
201181
cabal-plan --version
202182
- name: checkout
203-
uses: actions/checkout@v3
183+
uses: actions/checkout@v4
204184
with:
205185
path: source
206186
- name: initial cabal.project for sdist
@@ -237,15 +217,15 @@ jobs:
237217
if $HEADHACKAGE; then
238218
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
239219
fi
240-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|containers-tests|ghc-heap|text)$/; }' >> cabal.project.local
220+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(binary|containers|containers-tests|ghc-heap|text)$/; }' >> cabal.project.local
241221
cat cabal.project
242222
cat cabal.project.local
243223
- name: dump install plan
244224
run: |
245225
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
246226
cabal-plan
247227
- name: restore cache
248-
uses: actions/cache/restore@v3
228+
uses: actions/cache/restore@v4
249229
with:
250230
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
251231
path: ~/.cabal/store
@@ -267,7 +247,7 @@ jobs:
267247
rm -f cabal.project.local
268248
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
269249
- name: save cache
270-
uses: actions/cache/save@v3
250+
uses: actions/cache/save@v4
271251
if: always()
272252
with:
273253
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

containers/changelog.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@
2323

2424
* Add `Data.IntSet.fromRange`. (Soumik Sarkar)
2525

26+
### Improvements
27+
28+
* Speed up conversion from monotonic lists to `Set`s and
29+
`Map`s. (Soumik Sarkar)
30+
2631
### Documentation and other
2732

2833
* Add, improve, and correct documentation. (Niklas Hambüchen, Soumik Sarkar,
29-
tomjaguarpaw)
34+
tomjaguarpaw, Alice Rixte, Tom Smeding)
3035

3136
### Other/internal
3237

@@ -35,6 +40,9 @@
3540

3641
* Add a bunch of new tests and benchmarks. (Soumik Sarkar)
3742

43+
* Future-proof test suite against export of `foldl'` from `Prelude`.
44+
(Teo Camarasu)
45+
3846
## 0.6.7
3947

4048
### Additions

containers/containers.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: containers
2-
version: 0.6.8
2+
version: 0.7
33
license: BSD3
44
license-file: LICENSE
55
maintainer: [email protected]

0 commit comments

Comments
 (0)