Skip to content

Commit

Permalink
GHC-9.10 support (uuid)
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jul 3, 2024
1 parent 07cfb8f commit 27eedf0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 25 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/haskell-ci-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240514
# version: 0.19.20240702
#
# REGENDATA ("0.19.20240514",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
# REGENDATA ("0.19.20240702",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
#
name: Benchmarks
on:
Expand All @@ -32,14 +32,19 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.4
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.4
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -82,7 +87,7 @@ jobs:
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -100,7 +105,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240514
# version: 0.19.20240702
#
# REGENDATA ("0.19.20240514",["github","cabal.project"])
# REGENDATA ("0.19.20240702",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -42,9 +42,9 @@ jobs:
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.5
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.5
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -105,7 +105,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
cat cabal.project
- name: sdist
run: |
Expand All @@ -189,11 +189,11 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: ${PKGDIR_uuid}" >> cabal.project ; fi
echo "packages: ${PKGDIR_uuid}" >> cabal.project
echo "package uuid-types" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package uuid" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
Expand Down Expand Up @@ -226,8 +226,8 @@ jobs:
run: |
cd ${PKGDIR_uuid_types} || false
${CABAL} -vnormal check
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_uuid} || false ; fi
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
cd ${PKGDIR_uuid} || false
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
Expand Down
2 changes: 1 addition & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
branches: master
jobs-selection: any
-- jobs-selection: any
head-hackage: False

constraint-set random-1.2
Expand Down
9 changes: 5 additions & 4 deletions uuid-bench/uuid-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.4
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

synopsis: UUID benchmarks
description:
Expand Down Expand Up @@ -49,7 +50,7 @@ library
, hashable >=1.4.4.0 && <1.5
, network-info >=0.2 && <0.3
, random >=1.2.1.2 && <1.3
, template-haskell >=2.14.0.0 && <2.22
, template-haskell >=2.14.0.0 && <2.23
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
, time >=1.4 && <1.13

Expand Down Expand Up @@ -99,7 +100,7 @@ benchmark uuid-types-benchmark

-- deps w/o inherited constraints
build-depends:
containers >=0.5 && <0.7
containers >=0.5 && <0.8
, criterion >=1.5 && <1.7
, unordered-containers >=0.2.7 && <0.3

Expand All @@ -118,7 +119,7 @@ benchmark uuid-benchmark
build-depends:
base
, random
, uuid
, uuid-bench

-- deps w/o inherited constraints
build-depends:
Expand Down
2 changes: 1 addition & 1 deletion uuid-types/uuid-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

Expand Down
3 changes: 2 additions & 1 deletion uuid/uuid.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1

synopsis:
For creating, comparing, parsing and printing Universally Unique Identifiers
Expand Down

0 comments on commit 27eedf0

Please sign in to comment.