Skip to content
Merged
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
61 changes: 31 additions & 30 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci 'github' 'api-tools.cabal'
# haskell-ci 'github' 'api-tools.cabal' '--no-error-unused-packages' '--no-error-incomplete-patterns'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240708
# version: 0.19.20251019
#
# REGENDATA ("0.19.20240708",["github","api-tools.cabal"])
# REGENDATA ("0.19.20251019",["github","api-tools.cabal","--no-error-unused-packages","--no-error-incomplete-patterns"])
#
name: Haskell-CI
on:
- push
- pull_request
- merge_group
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes:
60
container:
Expand All @@ -28,37 +29,46 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.10.1
- compiler: ghc-9.10.3
compilerKind: ghc
compilerVersion: 9.10.1
compilerVersion: 9.10.3
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.6
- compiler: ghc-9.6.7
compilerKind: ghc
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
compilerVersion: 9.6.7
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
- 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"
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 @@ -69,21 +79,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 @@ -133,7 +134,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 @@ -158,7 +159,7 @@ jobs:
touch cabal.project.local
echo "packages: ${PKGDIR_api_tools}" >> cabal.project
echo "package api-tools" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(api-tools)$/; }' >> cabal.project.local
Expand Down Expand Up @@ -199,8 +200,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
17 changes: 6 additions & 11 deletions api-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ License: BSD3
License-file: LICENSE
Author: Chris Dornan <chrisd@irisconnect.co.uk> and Adam Gundry <adam@well-typed.com>
Maintainer: Adam Gundry <adam@well-typed.com>
Copyright: (c) Iris Connect 2013-2024
Copyright: (c) Iris Connect 2013-2025
Category: Network, Web, Cloud, Distributed Computing
Build-type: Simple
Extra-source-files: changelog
Cabal-version: >=1.10
Tested-with: GHC == 9.4.8, GHC == 9.6.6, GHC == 9.8.2, GHC == 9.10.1
Tested-with: GHC == 9.6.7, GHC == 9.8.4, GHC == 9.10.3

Source-Repository head
Type: git
Location: git://github.com/iconnect/api-tools.git

Source-Repository this
Type: git
Location: git://github.com/iconnect/api-tools.git
Tag: 0.10.1.0
Location: https://github.com/iconnect/api-tools.git

flag use-attoparsec-aeson
description: Depend on Data.Aeson.Parser from attoparsec-aeson
Expand Down Expand Up @@ -194,9 +189,9 @@ Test-Suite test-api-tools
containers,
safecopy,
serialise,
tasty >= 0.10.1 && < 1.5 ,
tasty-hunit >= 0.2 && < 10.0,
tasty-quickcheck >= 0.3 && < 0.11,
tasty >= 0.10.1 && < 1.6 ,
tasty-hunit >= 0.2 && < 0.11,
tasty-quickcheck >= 0.3 && < 0.12,
time,
template-haskell,
text,
Expand Down