Skip to content

Commit

Permalink
Support GHC-9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Jan 3, 2025
1 parent 1a97751 commit 1d4ce94
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 28 deletions.
52 changes: 31 additions & 21 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.20240708
# version: 0.19.20241223
#
# REGENDATA ("0.19.20240708",["github","--config=cabal.haskell-ci","lattices.cabal"])
# REGENDATA ("0.19.20241223",["github","--config=cabal.haskell-ci","lattices.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 @@ -79,15 +84,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.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.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 +117,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 @@ -155,7 +165,7 @@ jobs:
- name: cache (tools)
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a326b3c0
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-91770216
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
Expand All @@ -180,10 +190,10 @@ jobs:
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --version ; fi
- name: save cache (tools)
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a326b3c0
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-91770216
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -269,8 +279,8 @@ jobs:
if [ $((HCNUMVER >= 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='transformers ^>=0.6' --dependencies-only -j2 all ; fi
if [ $((HCNUMVER >= 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='transformers ^>=0.6' all ; fi
- 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
6 changes: 3 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
packages: .
tests: true

allow-newer: quickcheck-instances-0.3.30:base
allow-newer: quickcheck-instances-0.3.30:containers
allow-newer: these-1.2:base
allow-newer: quickcheck-instances-0.3.32:base
allow-newer: quickcheck-instances-0.3.32:containers
allow-newer: these-1.2.1:base
9 changes: 5 additions & 4 deletions lattices.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 1.18
name: lattices
version: 2.2.1
x-revision: 1
x-revision: 2
category: Math
license: BSD3
license-file: LICENSE
Expand Down Expand Up @@ -29,9 +29,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

synopsis:
Fine-grained library for constructing and manipulating lattices
Expand Down Expand Up @@ -80,7 +81,7 @@ library
Algebra.PartialOrd.Instances

build-depends:
base >=4.12 && <4.21
base >=4.12 && <4.22
, containers >=0.5.0.0 && <0.8
, deepseq >=1.3.0.0 && <1.6
, hashable >=1.2.7.0 && <1.6
Expand Down

0 comments on commit 1d4ce94

Please sign in to comment.