Skip to content

Commit

Permalink
Extend GHCs tested on CI
Browse files Browse the repository at this point in the history
This required some hackery in package.yaml to configure warnings and
dependencies across versions, but not much in the actual code (e.g.
CPP), so that's good.
  • Loading branch information
pbrisbin committed Mar 30, 2022
1 parent 0a174cb commit 24b55f6
Show file tree
Hide file tree
Showing 21 changed files with 161 additions and 56 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,43 @@ on:
jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
stack-yaml:
- stack.yaml # ghc-9.0
- stack-lts-18.28.yaml # ghc-8.10
- stack-lts-16.31.yaml # ghc-8.8
- stack-lts-14.27.yaml # ghc-8.6
- stack-lts-12.26.yaml # ghc-8.4
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: freckle/stack-cache-action@v2
with:
stack-yaml: ${{ matrix.stack-yaml }}
- uses: freckle/stack-action@v3
with:
stack-yaml: ${{ matrix.stack-yaml }}

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: freckle/stack-cache-action@v1
- uses: freckle/stack-action@main
- uses: rwe/actions-hlint-setup@v1
- uses: rwe/actions-hlint-run@v2
with:
fail-on: warning

nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: freckle/stack-cache-action@v2
with:
stack-yaml: stack-nightly.yaml
- uses: freckle/stack-action@v3
with:
weeder: false
stack-yaml: stack-nightly.yaml
stack-arguments: --resolver nightly
28 changes: 17 additions & 11 deletions graphula.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: fbf7a7a0f44dad0ea63d4f70b57442153982e960d839d2ab2c38d9ad0d40114e
-- hash: f07abca9cc4e0e29ae8560a745c8b2cc86944deeb041585db5d70a2aa3fea027

name: graphula
version: 2.0.1.0
Expand All @@ -25,6 +25,11 @@ source-repository head
type: git
location: https://github.com/freckle/graphula

flag persistent-template
description: Include dependency on persistent-template
manual: False
default: False

library
exposed-modules:
Graphula
Expand All @@ -41,7 +46,7 @@ library
Paths_graphula
hs-source-dirs:
src
ghc-options: -Weverything -Wno-unsafe -Wno-safe -Wno-missing-import-lists -Wno-implicit-prelude
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe
build-depends:
HUnit
, QuickCheck
Expand All @@ -55,11 +60,12 @@ library
, semigroups
, temporary
, text
, transformers
, unliftio
, unliftio-core
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
if impl(ghc < 8.6)
ghc-options: -Wno-redundant-constraints
default-language: Haskell2010

test-suite readme
Expand All @@ -69,27 +75,27 @@ test-suite readme
Paths_graphula
hs-source-dirs:
test
ghc-options: -Weverything -Wno-unsafe -Wno-safe -Wno-missing-import-lists -Wno-implicit-prelude -pgmL markdown-unlit
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-missing-import-lists -Wno-safe -Wno-unsafe -pgmL markdown-unlit
build-depends:
QuickCheck
, aeson
, base <5
, bytestring
, containers
, generic-arbitrary
, graphula
, hspec
, http-api-data
, markdown-unlit
, monad-logger
, path-pieces
, persistent
, persistent-sqlite
, persistent-template
, resourcet
, text
, transformers
, unliftio-core
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
if impl(ghc < 8.6)
ghc-options: -Wno-redundant-constraints
if impl(ghc >= 8.8)
ghc-options: -Wno-missing-deriving-strategies
if flag(persistent-template)
build-depends:
persistent-template
default-language: Haskell2010
45 changes: 28 additions & 17 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ extra-source-files:
- CHANGELOG.md

ghc-options:
-Weverything
-Wno-unsafe
-Wno-safe
-Wno-missing-import-lists
-Wno-implicit-prelude
- -Weverything
- -Wno-all-missed-specialisations
- -Wno-implicit-prelude
- -Wno-missing-import-lists
- -Wno-safe
- -Wno-unsafe

when:
condition: impl(ghc >= 8.10)
ghc-options:
-Wno-missing-safe-haskell-mode
-Wno-prepositive-qualified-module
- condition: impl(ghc >= 8.10)
ghc-options:
- -Wno-missing-safe-haskell-mode
- -Wno-prepositive-qualified-module
- condition: impl(ghc < 8.6)
ghc-options:
- -Wno-redundant-constraints

dependencies:
- base < 5
Expand All @@ -42,7 +46,6 @@ library:
- semigroups
- temporary
- text
- transformers
- unliftio
- unliftio-core

Expand All @@ -52,22 +55,30 @@ tests:
ghc-options: -pgmL markdown-unlit
source-dirs:
- test

dependencies:
- QuickCheck
- aeson
- bytestring
- containers
- generic-arbitrary
- graphula
- hspec
- http-api-data
- markdown-unlit
- monad-logger
- path-pieces
- persistent
- persistent-sqlite
- persistent-template
- resourcet
- text
- transformers
- unliftio-core

when:
- condition: impl(ghc >= 8.8)
ghc-options:
- -Wno-missing-deriving-strategies
- condition: "flag(persistent-template)"
dependencies:
- persistent-template

flags:
persistent-template:
description: Include dependency on persistent-template
manual: false
default: false
1 change: 0 additions & 1 deletion src/Graphula.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
1 change: 0 additions & 1 deletion src/Graphula/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
Expand Down
1 change: 0 additions & 1 deletion src/Graphula/Dependencies.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
Expand Down
1 change: 0 additions & 1 deletion src/Graphula/Dependencies/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
Expand Down
2 changes: 0 additions & 2 deletions src/Graphula/Idempotent.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
Expand Down
1 change: 0 additions & 1 deletion src/Graphula/Logged.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
Expand Down
1 change: 0 additions & 1 deletion src/Graphula/Node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
Expand Down
5 changes: 5 additions & 0 deletions stack-lts-12.26.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-12.26

flags:
graphula:
persistent-template: true
12 changes: 12 additions & 0 deletions stack-lts-12.26.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 509471
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/26.yaml
sha256: 95f014df58d0679b1c4a2b7bf2b652b61da8d30de5f571abb0d59015ef678646
original: lts-12.26
5 changes: 5 additions & 0 deletions stack-lts-14.27.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resolver: lts-14.27

flags:
graphula:
persistent-template: true
12 changes: 12 additions & 0 deletions stack-lts-14.27.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 524996
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0
original: lts-14.27
7 changes: 7 additions & 0 deletions stack-lts-16.31.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resolver: lts-16.31
extra-deps:
- generics-eot-0.4.0.1

flags:
graphula:
persistent-template: true
19 changes: 19 additions & 0 deletions stack-lts-16.31.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
pantry-tree:
size: 1384
sha256: 0895826ac5485a85e6fa37ae2b76195872fa2d92e901478c42d0690fc206a5ab
original:
hackage: generics-eot-0.4.0.1
snapshots:
- completed:
size: 534126
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml
sha256: 637fb77049b25560622a224845b7acfe81a09fdb6a96a3c75997a10b651667f6
original: lts-16.31
1 change: 1 addition & 0 deletions stack-lts-18.28.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-18.28
12 changes: 12 additions & 0 deletions stack-lts-18.28.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 590100
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
sha256: 428ec8d5ce932190d3cbe266b9eb3c175cd81e984babf876b64019e2cbe4ea68
original: lts-18.28
5 changes: 1 addition & 4 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
resolver: lts-17.8

extra-deps:
- generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
resolver: lts-19.1

ghc-options:
"$locals": -fwrite-ide-info
17 changes: 5 additions & 12 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
pantry-tree:
size: 1384
sha256: 0895826ac5485a85e6fa37ae2b76195872fa2d92e901478c42d0690fc206a5ab
original:
hackage: generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312
packages: []
snapshots:
- completed:
size: 565720
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/8.yaml
sha256: 76bf8992ff8dfe6eda9c02f81866138c2369344d5011ab39ae403457c4448b03
original: lts-17.8
size: 617355
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/1.yaml
sha256: cbd5e8593869445794924668479b5bd9f1738d075898623dceacc13b2576b6e3
original: lts-19.1
1 change: 0 additions & 1 deletion test/README.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies. We use this interface to generate fixtures for automated testing.
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-missing-deriving-strategies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main (module Main) where
Expand Down

0 comments on commit 24b55f6

Please sign in to comment.