Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 42 additions & 18 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.20240702
# version: 0.19.20260209
#
# REGENDATA ("0.19.20240702",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
# REGENDATA ("0.19.20260209",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
#
name: Benchmarks
on:
Expand All @@ -20,10 +20,15 @@ on:
pull_request:
branches:
- master
merge_group:
branches:
- master
workflow_dispatch:
{}
jobs:
linux:
name: Benchmarks - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes:
60
container:
Expand All @@ -32,6 +37,16 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.1
compilerKind: ghc
compilerVersion: 9.14.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
Expand Down Expand Up @@ -79,15 +94,29 @@ jobs:
allow-failure: false
fail-fast: false
steps:
- name: apt
- name: apt-get install
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -98,21 +127,12 @@ jobs:
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$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"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -162,7 +182,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: source
- name: initial cabal.project for sdist
Expand All @@ -187,7 +207,11 @@ jobs:
touch cabal.project.local
echo "packages: ${PKGDIR_uuid_bench}" >> cabal.project
echo "package uuid-bench" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package uuid-bench" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package uuid-bench" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid-bench)$/; }' >> cabal.project.local
Expand Down Expand Up @@ -234,8 +258,8 @@ jobs:
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
- name: save cache
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
32 changes: 25 additions & 7 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.20250330
# version: 0.19.20260209
#
# REGENDATA ("0.19.20250330",["github","cabal.project"])
# REGENDATA ("0.19.20260209",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -20,6 +20,11 @@ on:
pull_request:
branches:
- master
merge_group:
branches:
- master
workflow_dispatch:
{}
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
Expand All @@ -32,6 +37,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.1
compilerKind: ghc
compilerVersion: 9.14.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.2
Expand Down Expand Up @@ -95,8 +105,8 @@ jobs:
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV"
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand Down Expand Up @@ -172,7 +182,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -201,9 +211,17 @@ jobs:
echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
echo "packages: ${PKGDIR_uuid}" >> cabal.project
echo "package uuid-types" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
echo "package uuid" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
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
10 changes: 6 additions & 4 deletions uuid-bench/uuid-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ tested-with:
|| ==9.6.6
|| ==9.8.2
|| ==9.10.1
|| ==9.12.2
|| ==9.14.1

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

-- uuid modules
exposed-modules:
Expand Down Expand Up @@ -100,13 +102,13 @@ benchmark uuid-types-benchmark

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

benchmark uuid-benchmark
type: exitcode-stdio-1.0
main-is: uuid-benchmark.hs
main-is: uuid-benchmark.hs
hs-source-dirs: bench
default-language: Haskell2010
default-extensions:
Expand Down
2 changes: 0 additions & 2 deletions uuid-types/src/Data/UUID/Types/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ module Data.UUID.Types.Internal

import Prelude hiding (null)

import Control.Applicative ((<*>))
import Control.DeepSeq (NFData (..))
import Control.Monad (guard, liftM2)
import Data.Bits
import Data.Char
import Data.Data
import Data.Functor ((<$>))
import Data.Hashable
import Data.List (elemIndices)
import Foreign.Ptr (Ptr)
Expand Down
4 changes: 2 additions & 2 deletions uuid-types/uuid-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ tested-with:
|| ==9.8.4
|| ==9.10.1
|| ==9.12.2
|| ==9.14.1

synopsis: Type definitions for Universally Unique Identifiers
description:
Expand Down Expand Up @@ -52,7 +53,7 @@ library
, deepseq >=1.4.4.0 && <1.6
, hashable >=1.4.4.0 && <1.6
, random >=1.2.1.2 && <1.4
, template-haskell >=2.14.0.0 && <2.24
, template-haskell >=2.14.0.0 && <2.25
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2

exposed-modules: Data.UUID.Types
Expand Down Expand Up @@ -83,7 +84,6 @@ test-suite testuuid
base
, binary
, bytestring
, template-haskell
, uuid-types

-- deps w/o inherited constraints
Expand Down
1 change: 0 additions & 1 deletion uuid/src/Data/UUID/Named.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module Data.UUID.Named

import Data.UUID.Types.Internal

import Control.Applicative ((<*>),(<$>))
import Data.Binary.Get (runGet, getWord32be)
import Data.Maybe
import Data.Word (Word8)
Expand Down
1 change: 0 additions & 1 deletion uuid/src/Data/UUID/V1.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import Data.Maybe
import Data.Time
import Data.Word

import Control.Applicative ((<$>),(<*>))
import Control.Concurrent.MVar
import System.IO.Unsafe

Expand Down
5 changes: 2 additions & 3 deletions uuid/uuid.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tested-with:
|| ==9.8.4
|| ==9.10.1
|| ==9.12.2
|| ==9.14.1

synopsis:
For creating, comparing, parsing and printing Universally Unique Identifiers
Expand Down Expand Up @@ -49,8 +50,7 @@ library
, entropy >=0.3.7 && <0.5
, network-info >=0.2 && <0.3
, random >=1.2.1.2 && <1.4
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
, time >=1.4 && <1.15
, time >=1.4 && <1.16

-- strict dependency on uuid-types,
-- as we re-rexport datatype, thus leak instances etc.
Expand Down Expand Up @@ -86,7 +86,6 @@ test-suite testuuid
build-depends:
base
, bytestring
, random
, uuid

-- deps w/o inherited constraints
Expand Down