Skip to content

Commit

Permalink
Merge pull request #4 from rickowens/pr
Browse files Browse the repository at this point in the history
feat: Support GHC-9.8.
  • Loading branch information
rickowens committed Dec 16, 2023
2 parents bbfdb92 + afc6fec commit b0a9a3c
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 52 deletions.
129 changes: 129 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
on: [push]
name: Haskell Builds
jobs:
build:
name: Haskell Build
runs-on: ubuntu-latest # or macOS-latest, or windows-latest
strategy:
fail-fast: false
matrix:
ghc-version:
- '9.8'
cabal-version: ['3.10.2.0']
steps:
# Checkout
- uses: actions/checkout@v3

# Setup
- name: Setup Haskell
uses: haskell-actions/setup@v2
id: setup
if: steps.tooling-cache.outputs.cache-hit != 'true'
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: ${{ matrix.cabal-version }}

# Generate Plan
- name: Configure the Build
run: |
rm cabal.project.freeze
cabal configure
cabal build --dry-run
# Restore cache
- name: Restore cached dependencies
uses: actions/cache/restore@v3
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}

# Build deps (for caching)
- name: Cabal build dependencies
run: cabal build all --only-dependencies

# Save dependency cache
- name: Save cache
uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}

# Cabal build
- name: Cabal Bulid
run: |
project="$(cat cabal.project | grep -v -- '-Werror')"
echo "$project" > cabal.project
cabal build all
build-lower-bounds:
name: Haskell Build (lower bounds)
runs-on: ubuntu-latest # or macOS-latest, or windows-latest
strategy:
fail-fast: false
matrix:
ghc-version: ['9.8.1']
cabal-version: ['3.10.2.0']
steps:
# Checkout
- uses: actions/checkout@v3

# Setup
- name: Setup Haskell
uses: haskell-actions/setup@v2
id: setup
if: steps.tooling-cache.outputs.cache-hit != 'true'
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: ${{ matrix.cabal-version }}

# Generate Plan
- name: Configure the Build
run: |
(cat << EOF
packages: .
constraints:
aeson == 2.2.1.0,
base == 4.19.0.0,
bytestring == 0.12.0.2,
hspec == 2.11.1,
json-spec == 0.2.1.3,
lens == 5.2.3,
openapi3 == 3.2.4,
text == 2.1,
time == 1.12.2
EOF
) > cabal.project
rm cabal.project.freeze
cabal configure
cabal build --dry-run
# Restore cache
- name: Restore cached dependencies
uses: actions/cache/restore@v3
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}

# Build deps (for caching)
- name: Cabal build dependencies
run: cabal build all --only-dependencies

# Save dependency cache
- name: Save cache
uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}

# Cabal build
- name: Cabal Bulid
run: cabal build all

86 changes: 44 additions & 42 deletions cabal.project.freeze
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
active-repositories: owensmurray:merge, hackage.haskell.org:merge
constraints: any.Cabal ==3.8.1.0,
any.Cabal-syntax ==3.8.1.0,
active-repositories: hackage.haskell.org:merge, owensmurray:merge
constraints: any.Cabal ==3.10.2.0,
any.Cabal-syntax ==3.10.2.0,
any.HUnit ==1.6.2.0,
any.OneTuple ==0.4.1.1,
any.QuickCheck ==2.14.3,
QuickCheck -old-random +templatehaskell,
any.StateVar ==1.2.2,
any.adjunctions ==4.4.2,
any.aeson ==2.1.2.1,
aeson -cffi +ordered-keymap,
any.aeson ==2.2.1.0,
aeson +ordered-keymap,
any.aeson-pretty ==0.8.10,
aeson-pretty -lib-only,
any.ansi-terminal ==1.0,
ansi-terminal -example,
any.ansi-terminal-types ==0.11.5,
any.array ==0.5.4.0,
any.array ==0.5.6.0,
any.assoc ==1.1,
assoc +tagged,
any.attoparsec ==0.14.4,
attoparsec -developer,
any.attoparsec-aeson ==2.1.0.0,
any.base ==4.17.1.0,
any.base-compat ==0.13.0,
any.base-compat-batteries ==0.13.0,
any.base-orphans ==0.9.0,
any.attoparsec-aeson ==2.2.0.1,
any.base ==4.19.0.0,
any.base-compat ==0.13.1,
any.base-compat-batteries ==0.13.1,
any.base-orphans ==0.9.1,
any.bifunctors ==5.6.1,
bifunctors +tagged,
any.binary ==0.8.9.1,
any.bytestring ==0.11.4.0,
any.bytestring ==0.12.0.2,
any.cabal-doctest ==1.0.9,
any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0,
Expand All @@ -36,58 +36,58 @@ constraints: any.Cabal ==3.8.1.0,
any.colour ==2.3.6,
any.comonad ==5.0.8,
comonad +containers +distributive +indexed-traversable,
any.containers ==0.6.7,
any.containers ==0.6.8,
any.contravariant ==1.5.5,
contravariant +semigroups +statevar +tagged,
any.cookie ==0.4.6,
any.data-default-class ==0.1.2.0,
any.data-fix ==0.3.2,
any.deepseq ==1.4.8.0,
any.directory ==1.3.7.1,
any.deepseq ==1.5.0.0,
any.directory ==1.3.8.1,
any.distributive ==0.6.2.1,
distributive +semigroups +tagged,
any.dlist ==1.0,
dlist -werror,
any.exceptions ==0.10.5,
any.filepath ==1.4.2.2,
any.foldable1-classes-compat ==0.1,
foldable1-classes-compat +tagged,
any.exceptions ==0.10.7,
any.filepath ==1.4.100.4,
any.free ==5.2,
any.generically ==0.1.1,
any.generics-sop ==0.5.1.3,
any.generics-sop ==0.5.1.4,
any.ghc-bignum ==1.3,
any.ghc-boot-th ==9.4.5,
any.ghc-prim ==0.9.0,
any.ghc-boot-th ==9.8.1,
any.ghc-prim ==0.11.0,
any.hashable ==1.4.3.0,
hashable +integer-gmp -random-initial-seed,
any.haskell-lexer ==1.1.1,
any.hspec ==2.11.4,
any.hspec-core ==2.11.4,
any.hspec-discover ==2.11.4,
any.hspec ==2.11.7,
any.hspec-core ==2.11.7,
any.hspec-discover ==2.11.7,
any.hspec-expectations ==0.8.4,
any.http-media ==0.8.1.1,
any.indexed-profunctors ==0.1.1.1,
any.indexed-traversable ==0.1.2.1,
any.indexed-traversable ==0.1.3,
any.indexed-traversable-instances ==0.1.1.2,
any.insert-ordered-containers ==0.2.5.3,
any.integer-conversion ==0.1.0.1,
any.integer-logarithms ==1.0.3.1,
integer-logarithms -check-bounds +integer-gmp,
any.invariant ==0.6.2,
any.json-spec ==0.2.1.1,
any.json-spec ==0.2.1.3,
any.kan-extensions ==5.2.5,
any.lens ==5.2.3,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
any.mtl ==2.2.2,
any.openapi3 ==3.2.3,
any.mtl ==2.3.1,
any.network-uri ==2.6.4.2,
any.openapi3 ==3.2.4,
any.optics-core ==0.4.1.1,
optics-core -explicit-generic-labels,
any.optics-extra ==0.4.2.1,
any.optics-th ==0.4.1,
any.parallel ==3.2.2.0,
any.parsec ==3.1.16.1,
any.parsec ==3.1.17.0,
any.pretty ==1.1.3.6,
any.primitive ==0.8.0.0,
any.process ==1.6.16.0,
any.primitive ==0.9.0.0,
any.process ==1.6.18.0,
any.profunctors ==5.6.2,
any.quickcheck-io ==0.2.0,
any.random ==1.2.1.1,
Expand All @@ -103,36 +103,38 @@ constraints: any.Cabal ==3.8.1.0,
any.semigroups ==0.20,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
any.sop-core ==0.5.0.2,
any.splitmix ==0.1.0.4,
any.splitmix ==0.1.0.5,
splitmix -optimised-mixer,
any.stm ==2.5.1.0,
any.stm ==2.5.2.1,
any.strict ==0.5,
any.tagged ==0.8.8,
tagged +deepseq +transformers,
any.template-haskell ==2.19.0.0,
any.text ==2.0.2,
any.template-haskell ==2.21.0.0,
any.text ==2.1,
any.text-iso8601 ==0.1,
any.text-short ==0.1.5,
text-short -asserts,
any.tf-random ==0.5,
any.th-abstraction ==0.5.0.0,
any.th-abstraction ==0.6.0.0,
any.th-compat ==0.1.4,
any.these ==1.2,
any.time ==1.12.2,
any.time-compat ==1.9.6.1,
time-compat -old-locale,
any.transformers ==0.5.6.2,
any.transformers ==0.6.1.0,
any.transformers-base ==0.4.6,
transformers-base +orphaninstances,
any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.unix ==2.7.3,
any.unix ==2.8.3.0,
any.unordered-containers ==0.2.19.1,
unordered-containers -debug,
any.utf8-string ==1.0.2,
any.uuid-types ==1.0.5,
any.vector ==0.13.0.0,
any.uuid-types ==1.0.5.1,
any.vector ==0.13.1.0,
vector +boundschecks -internalchecks -unsafechecks -wall,
any.vector-stream ==0.1.0.0,
any.void ==0.7.3,
void -safe,
any.witherable ==0.4.2
index-state: hackage.haskell.org 2023-09-10T14:45:35Z
index-state: hackage.haskell.org 2023-12-16T20:14:48Z
18 changes: 8 additions & 10 deletions json-spec-openapi.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: json-spec-openapi
version: 0.1.0.2
version: 0.1.0.3
synopsis: json-spec-openapi
description:
This package provides a way to produce
Expand Down Expand Up @@ -62,12 +62,12 @@ extra-source-files:

common dependencies
build-depends:
, aeson >= 2.1.2.1 && < 2.2
, base >= 4.17 && < 4.18
, json-spec >= 0.2.0.0 && < 0.3
, lens >= 5.2.2 && < 5.3
, openapi3 >= 3.2.3 && < 3.3
, text >= 2.0.2 && < 2.1
, aeson >= 2.2.1.0 && < 2.3
, base >= 4.19.0.0 && < 4.20
, json-spec >= 0.2.1.3 && < 0.3
, lens >= 5.2.3 && < 5.3
, openapi3 >= 3.2.4 && < 3.3
, text >= 2.1 && < 2.2

common warnings
ghc-options:
Expand Down Expand Up @@ -95,9 +95,7 @@ test-suite json-spec-openapi-tests
build-depends:
, json-spec-openapi

, aeson >= 2.1.2.1 && < 2.2
, bytestring >= 0.11.4.0 && < 0.12
, bytestring >= 0.12.0.2 && < 0.13
, hspec >= 2.11.1 && < 2.12
, scientific >= 0.3.7.0 && < 0.4
, time >= 1.12.2 && < 1.13

1 change: 1 addition & 0 deletions test/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeAbstractions #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
Expand Down

0 comments on commit b0a9a3c

Please sign in to comment.