Skip to content

Commit

Permalink
Bump dependencies and CI (#158)
Browse files Browse the repository at this point in the history
Summary:
- include latest GHCs in CI
- ~~latest minor version is determined by haskell-actions/setup~~
- ~~freeze file is a bad cache key as it contains a time stamp, use the build plan instead (the correct choice)~~

~~Successful CI run at: https://github.com/andreasabel/Haxl/actions/runs/6725224644~~
CI running here: andreasabel#1

Pull Request resolved: #158

Reviewed By: simonmar

Differential Revision: D66102814

Pulled By: josefs

fbshipit-source-id: a31dbf74b7086d909c2a2c1508a749341cde11c0
  • Loading branch information
andreasabel authored and facebook-github-bot committed Nov 19, 2024
1 parent fb2cabb commit 7255eb0
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 61 deletions.
98 changes: 50 additions & 48 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
# For more information, see https://github.com/andreasabel/haskell-ci
#
# version: 0.18.1
# version: 0.19.20241111
#
# REGENDATA ("0.18.1",["--no-cabal-check","github","haxl.cabal"])
# REGENDATA ("0.19.20241111",["--no-cabal-check","github","haxl.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -23,20 +23,40 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.2.2
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.2.2
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.1
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: hvr-ppa
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
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
compilerKind: ghc
compilerVersion: 9.0.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
Expand All @@ -46,39 +66,30 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
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.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)
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.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.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
mkdir -p "$HOME/.ghcup/bin"
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"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
"$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)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -90,22 +101,13 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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.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.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
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"
Expand Down Expand Up @@ -162,7 +164,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -190,15 +192,15 @@ jobs:
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 /^(haxl)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(haxl)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -224,7 +226,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
38 changes: 25 additions & 13 deletions haxl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ build-type: Simple
stability: alpha
cabal-version: >= 1.10
tested-with:
GHC==8.4.4,
GHC==8.6.5,
GHC==8.8.4,
GHC==8.4.4
GHC==8.6.5
GHC==8.8.4
GHC==8.10.7
GHC==9.0.1
GHC==9.2.2
GHC==9.0.2
GHC==9.2.8
GHC==9.4.8
GHC==9.6.6
GHC==9.8.2
GHC==9.10.1

description:
Haxl is a library and EDSL for efficient scheduling of concurrent data
Expand All @@ -44,25 +48,25 @@ extra-source-files:
library

build-depends:
aeson >= 0.6 && < 2.1,
aeson >= 0.6 && < 2.3,
base >= 4.10 && < 5,
binary >= 0.7 && < 0.10,
bytestring >= 0.9 && < 0.12,
containers >= 0.5 && < 0.7,
bytestring >= 0.9 && < 0.13,
containers >= 0.5 && < 0.8,
deepseq,
exceptions >=0.8 && <0.11,
filepath >= 1.3 && < 1.5,
filepath >= 1.3 && < 1.6,
ghc-prim,
hashable >= 1.2 && < 1.5,
hashable >= 1.2 && < 1.6,
hashtables >= 1.2.3.1,
pretty == 1.1.*,
-- text 1.2.1.0 required for instance Binary Text
text >= 1.2.1.0 && < 1.3,
time >= 1.4 && < 1.12,
text >= 1.2.1.0 && < 1.3 || >= 2 && < 2.2,
time >= 1.4 && < 1.13,
stm >= 2.4 && < 2.6,
transformers,
unordered-containers == 0.2.*,
vector >= 0.10 && <0.13
vector >= 0.10 && <0.14

exposed-modules:
Haxl.Core,
Expand All @@ -88,6 +92,8 @@ library
Haxl.Core.Util

default-language: Haskell2010
default-extensions:
TypeOperators

ghc-options:
-O2 -fprof-auto
Expand Down Expand Up @@ -156,6 +162,8 @@ test-suite test
exitcode-stdio-1.0

default-language: Haskell2010
default-extensions:
TypeOperators

flag bench
default: False
Expand All @@ -165,6 +173,8 @@ executable monadbench
buildable: False
default-language:
Haskell2010
default-extensions:
TypeOperators
hs-source-dirs:
tests
build-depends:
Expand All @@ -185,6 +195,8 @@ executable cachebench
buildable: False
default-language:
Haskell2010
default-extensions:
TypeOperators
hs-source-dirs:
tests
build-depends:
Expand Down

0 comments on commit 7255eb0

Please sign in to comment.