Skip to content

Commit

Permalink
Update dependency bounds and Haskell CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelBoucey committed Jan 31, 2024
1 parent dcae0a0 commit 2a7166b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 53 deletions.
57 changes: 21 additions & 36 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.17.20230925
# version: 0.17.20240109
#
# REGENDATA ("0.17.20230925",["github","NanoID.cabal"])
# REGENDATA ("0.17.20240109",["github","NanoID.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -28,19 +28,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.6.1
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.6.1
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.5
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.4.5
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.6
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.2.6
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand All @@ -58,26 +63,6 @@ jobs:
compilerVersion: 8.8.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
allow-failure: false
fail-fast: false
steps:
- name: apt
Expand All @@ -86,18 +71,18 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
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.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
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 cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand All @@ -117,13 +102,13 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
Expand Down Expand Up @@ -206,8 +191,8 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_NanoID}" >> cabal.project
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package NanoID" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package NanoID" >> 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: $_ installed\n" unless /^(NanoID)$/; }' >> cabal.project.local
Expand Down
24 changes: 7 additions & 17 deletions NanoID.cabal
Original file line number Diff line number Diff line change
@@ -1,50 +1,40 @@
name: NanoID
version: 3.4.0
version: 3.4.0.1
synopsis: NanoID generator
description: Library and CLI tool for NanoID generation
license: BSD3
license-file: LICENSE
author: Michel Boucey
maintainer: michel.boucey@gmail.com
copyright: (c) 2021-2023 - Michel Boucey
copyright: (c) 2021-2024 - Michel Boucey
category: Data
build-type: Simple
cabal-version: >=1.10
extra-source-files: ReadMe.md

Tested-With:
GHC == 8.0.2
|| == 8.2.2
|| == 8.4.4
|| == 8.6.5
|| == 8.8.4
|| == 8.10.7
|| == 9.0.2
|| == 9.2.6
|| == 9.4.5
|| == 9.6.1
Tested-With: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1

source-repository head
type: git
location: https://github.com/MichelBoucey/NanoID.git

library
exposed-modules: Data.NanoID
build-depends: aeson >= 1.5.6 && < 1.6 || >= 2.0 && < 2.2
, base >= 4.7 && < 4.19
build-depends: aeson >= 1.5.6 && < 1.6 || >= 2.0 && < 2.3
, base >= 4.7 && < 4.20
, bytestring >= 0.10 && < 0.12
, cereal >= 0.5.8 && < 0.5.9
, extra >= 1.6 && < 1.8
, mwc-random >= 0.13 && < 0.16
, text >= 1.2.3 && < 1.3 || == 2.0.*
, text >= 1.2.3 && < 2.2
hs-source-dirs: lib
default-language: Haskell2010

executable nanoid
main-is: Main.hs
other-modules: Options
Paths_NanoID
build-depends: base >= 4.7 && < 4.19
build-depends: base >= 4.7 && < 4.20
, bytestring >= 0.10 && < 0.12
, mwc-random >= 0.13 && < 0.16
, NanoID
Expand Down

0 comments on commit 2a7166b

Please sign in to comment.