Skip to content

Commit

Permalink
v0.11.102.0-r5: Allow newer base, add GHC 9.12.1 to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jan 1, 2025
1 parent fea92c1 commit 52ddc86
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 38 deletions.
61 changes: 33 additions & 28 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' 'cabal.project'
# haskell-ci 'github' 'cryptohash-sha512.cabal'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/andreasabel/haskell-ci
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240517
# version: 0.19.20241223
#
# REGENDATA ("0.19.20240517",["github","cabal.project"])
# REGENDATA ("0.19.20241223",["github","cryptohash-sha512.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -32,19 +32,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
- compiler: ghc-9.8.4
compilerKind: ghc
compilerVersion: 9.8.2
compilerVersion: 9.8.4
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,22 +92,31 @@ jobs:
compilerVersion: 8.2.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: ghcup
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 libnuma-dev
- 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.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.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.10.3.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 @@ -113,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.10.3.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 @@ -201,8 +206,8 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_cryptohash_sha512}" >> cabal.project
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package cryptohash-sha512" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package cryptohash-sha512" >> 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 /^(cryptohash-sha512)$/; }' >> cabal.project.local
Expand Down Expand Up @@ -243,8 +248,8 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks 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
5 changes: 4 additions & 1 deletion .github/workflows/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest]
ghc: ['9.2','9.4','9.6','9.8','9.10']
ghc: ['9.2','9.4','9.6','9.8','9.10','9.12']
fail-fast: false
timeout-minutes:
60
Expand Down Expand Up @@ -42,6 +42,9 @@ jobs:
restore-keys: ${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}-

- name: Build
run: cabal build all

- name: Build w/ tests
run: cabal build all --enable-tests

- name: Test
Expand Down
3 changes: 0 additions & 3 deletions cabal.project

This file was deleted.

12 changes: 6 additions & 6 deletions cryptohash-sha512.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.0
name: cryptohash-sha512
version: 0.11.102.0
x-revision: 4
x-revision: 5

synopsis: Fast, pure and practical SHA-512 implementation
description: {
Expand Down Expand Up @@ -54,9 +54,10 @@ category: Data, Cryptography
build-type: Simple

tested-with:
GHC == 9.12.1
GHC == 9.10.1
GHC == 9.8.2
GHC == 9.6.5
GHC == 9.8.4
GHC == 9.6.6
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand All @@ -65,7 +66,6 @@ tested-with:
GHC == 8.6.5
GHC == 8.4.4
GHC == 8.2.2
GHC == 8.0.2

extra-source-files: cbits/hs_sha512.h
changelog.md
Expand All @@ -76,7 +76,7 @@ source-repository head

library
default-language: Haskell2010
build-depends: base >= 4.5 && < 4.21
build-depends: base >= 4.5 && < 5
, bytestring >= 0.9.2 && < 0.13

hs-source-dirs: src
Expand All @@ -99,7 +99,7 @@ test-suite test-sha512
, base16-bytestring >= 1.0.1.0 && < 1.1
, SHA >= 1.6.4 && < 1.7
, tasty >= 1.4 && < 1.6
, tasty-quickcheck >= 0.10 && < 0.11
, tasty-quickcheck >= 0.10 && < 1
, tasty-hunit >= 0.10 && < 0.11

test-suite test-sha512t
Expand Down

0 comments on commit 52ddc86

Please sign in to comment.