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
71 changes: 45 additions & 26 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.20250506
# version: 0.19.20260331
#
# REGENDATA ("0.19.20250506",["github","cabal.project"])
# REGENDATA ("0.19.20260331",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -20,48 +20,58 @@ on:
pull_request:
branches:
- master
merge_group:
branches:
- master
workflow_dispatch:
{}
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-24.04
timeout-minutes:
60
container:
image: buildpack-deps:focal
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.12.1
- compiler: ghc-9.14.1
compilerKind: ghc
compilerVersion: 9.12.1
compilerVersion: 9.14.1
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.10.2
- compiler: ghc-9.12.4
compilerKind: ghc
compilerVersion: 9.10.2
compilerVersion: 9.12.4
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.8.1
allow-failure: false
- compiler: ghc-9.10.3
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.3
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.6.3
allow-failure: false
- compiler: ghc-9.8.4
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.8.4
setup-method: ghcup
allow-failure: true
allow-failure: false
- compiler: ghc-9.6.7
compilerKind: ghc
compilerVersion: 9.6.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: true
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: true
allow-failure: false
- compiler: ghc-9.0.2
compilerKind: ghc
compilerVersion: 9.0.2
Expand All @@ -82,26 +92,21 @@ jobs:
compilerVersion: 8.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- 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
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.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.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
"$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: |
Expand Down Expand Up @@ -177,7 +182,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 @@ -202,7 +207,9 @@ jobs:
touch cabal.project.local
echo "packages: ${PKGDIR_openapi3}" >> cabal.project
echo "package openapi3" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package openapi3" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(openapi3)$/; }' >> cabal.project.local
Expand Down Expand Up @@ -245,6 +252,18 @@ jobs:
- name: prepare for constraint sets
run: |
rm -f cabal.project.local
- name: constraint set insert-ordered-containers-0.3
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='insert-ordered-containers >=0.3' all --dry-run
cabal-plan topo | sort
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='insert-ordered-containers >=0.3' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='insert-ordered-containers >=0.3' all
- name: constraint set insert-ordered-containers-0.2
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='insert-ordered-containers <0.3' all --dry-run
cabal-plan topo | sort
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='insert-ordered-containers <0.3' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='insert-ordered-containers <0.3' all
- name: constraint set aeson-2
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson >=2.0' all --dry-run
Expand Down
12 changes: 10 additions & 2 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
branches: master

distribution: focal
allow-failures: >=9.2
allow-failures: >=9.14

-- https://github.com/haskell-CI/haskell-ci/issues/658#issuecomment-1513692337
haddock-components: libs
Expand All @@ -11,9 +10,18 @@ haddock-components: libs
-- and https://github.com/haskell/cabal/issues/8707
haddock: < 9.0 || >= 9.4

-- Breaks on doctests
error-unused-packages: False

constraint-set aeson-1
constraints: aeson <2.0
ghc: <9.2

constraint-set aeson-2
constraints: aeson >=2.0

constraint-set insert-ordered-containers-0.2
constraints: insert-ordered-containers <0.3

constraint-set insert-ordered-containers-0.3
constraints: insert-ordered-containers >=0.3
60 changes: 48 additions & 12 deletions openapi3.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ extra-source-files:
, CHANGELOG.md
, examples/*.hs
tested-with:
GHC ==8.4.4
|| ==8.6.5
GHC ==8.6.5
|| ==8.8.4
|| ==8.10.7
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.3
|| ==9.8.1
|| ==9.10.2
|| ==9.12.1
|| ==9.6.7
|| ==9.8.4
|| ==9.10.3
|| ==9.12.4
|| ==9.14.1

custom-setup
setup-depends:
Expand Down Expand Up @@ -65,14 +65,15 @@ library
Data.OpenApi.Internal.TypeShape

Data.OpenApi.Aeson.Compat
Data.HashMap.Strict.InsOrd.Compat

-- GHC boot libraries
build-depends:
base >=4.11.1.0 && <4.22
base >=4.11.1.0 && <4.23
, bytestring >=0.10.8.2 && <0.13
, containers >=0.5.11.0 && <0.9
, template-haskell >=2.13.0.0 && <2.24
, time >=1.8.0.2 && <1.15
, template-haskell >=2.13.0.0 && <2.25
, time >=1.8.0.2 && <1.16
, transformers >=0.5.5.0 && <0.7

build-depends:
Expand All @@ -81,25 +82,59 @@ library

-- other dependencies
build-depends:
base-compat-batteries >=0.11.1 && <0.15
base-compat-batteries >=0.11.1 && <0.16
, aeson >=1.4.2.0 && <1.6 || >=2.0.1.0 && < 2.3
, aeson-pretty >=0.8.7 && <0.9
-- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
, cookie >=0.4.3 && <0.6
, generics-sop >=0.5.1.0 && <0.6
, hashable >=1.2.7.0 && <1.6
, http-media >=0.8.0.0 && <0.9
, insert-ordered-containers >=0.2.3 && <0.3
, insert-ordered-containers >=0.2.3 && <0.4
, lens >=4.16.1 && <5.4
, optics-core >=0.2 && <0.5
, optics-th >=0.2 && <0.5
, scientific >=0.3.6.2 && <0.4
, unordered-containers >=0.2.9.0 && <0.3
, uuid-types >=1.0.3 && <1.1
, vector >=0.12.0.1 && <0.14
, QuickCheck >=2.10.1 && <2.16
, QuickCheck >=2.10.1 && <2.19

default-language: Haskell2010
default-extensions:
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveFunctor
DeriveGeneric
DeriveTraversable
ExplicitForAll
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
KindSignatures
LambdaCase
MultiParamTypeClasses
OverloadedLabels
OverloadedStrings
PackageImports
PolyKinds
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TemplateHaskell
TupleSections
TypeApplications
TypeFamilies
TypeOperators
TypeSynonymInstances
UndecidableInstances
UndecidableSuperClasses
ViewPatterns

test-suite spec
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -155,6 +190,7 @@ test-suite doctests
main-is: doctests.hs
type: exitcode-stdio-1.0
build-depends: base, openapi3
ghc-options: -Wno-unused-packages

executable example
hs-source-dirs: examples
Expand Down
Loading
Loading