Skip to content

Commit

Permalink
Merge pull request #207 from haskell-works/newhoggy/update-ci
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
newhoggy authored Jan 10, 2024
2 parents e0af83f + 1f9fce4 commit 8fc35c3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 34 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,33 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.2.2", "9.0.2", "8.10.7", "8.8.4", "8.6.5"]
os: [ubuntu-latest, windows-latest]
ghc: ["9.8.1", "9.6.3", "9.4.8", "9.2.8", "9.0.2", "8.10.7"]
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
- os: windows-latest
ghc: "9.4.8"

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-01-05"

steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.6.2.0
cabal-version: '3.10.2.1'

- name: Set some window specific things
if: matrix.os == 'windows-latest'
run: echo 'EXE_EXT=.exe' >> $GITHUB_ENV

- name: Configure project
run: cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
run: |
cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
cabal build all --enable-tests --enable-benchmarks --dry-run
- name: Cabal cache over S3
uses: action-works/cabal-cache-s3@v1
Expand All @@ -46,7 +55,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: ${{ secrets.BINARY_CACHE_URI }}
archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"

- name: Cabal cache over HTTPS
Expand All @@ -55,18 +64,14 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: https://cache.haskellworks.io/archive
archive-uri: https://cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
skip: "${{ secrets.BINARY_CACHE_URI != '' }}"

- name: Build
# Try building it twice in case of flakey builds on Windows
run: |
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ || \
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ -j1
run: cabal build all --enable-tests --enable-benchmarks

- name: Test
run: |
cabal test all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
run: cabal test all --enable-tests --enable-benchmarks

check:
needs: build
Expand Down
1 change: 0 additions & 1 deletion app/App/Commands/CountAeson.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import qualified Data.Aeson as J
import qualified Data.Aeson.Key as J
import qualified Data.Aeson.KeyMap as J
import qualified Data.ByteString.Lazy as LBS
import qualified Data.HashMap.Strict as SHM
import qualified System.IO as IO

runCountAeson :: Z.CountAesonOptions -> IO ()
Expand Down
20 changes: 12 additions & 8 deletions hw-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,20 @@ flag sse42

common base { build-depends: base >= 4.11 && < 5 }

common aeson { build-depends: aeson >= 2.0 && < 2.1 }
common ansi-wl-pprint { build-depends: ansi-wl-pprint >= 0.6.8.2 && < 0.7 }
common aeson { build-depends: aeson >= 2.0 && < 2.3 }
common ansi-wl-pprint { build-depends: ansi-wl-pprint >= 0.6.8.2 && < 2 }
common array { build-depends: array >= 0.5 && < 0.6 }
common attoparsec { build-depends: attoparsec >= 0.13 && < 0.15 }
common attoparsec-aeson { build-depends: attoparsec-aeson >= 2 && < 3 }
common bits-extra { build-depends: bits-extra >= 0.0.1.3 && < 0.1 }
common bytestring { build-depends: bytestring >= 0.10.6 && < 0.12 }
common bytestring { build-depends: bytestring >= 0.10.6 && < 0.13 }
common criterion { build-depends: criterion >= 1.4 && < 1.7 }
common directory { build-depends: directory >= 1.3 && < 1.4 }
common dlist { build-depends: dlist >= 0.8 && < 1.1 }
common doctest { build-depends: doctest >= 0.16.2 && < 0.21 }
common doctest { build-depends: doctest >= 0.16.2 && < 0.23 }
common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }
common generic-lens { build-depends: generic-lens >= 1.2.0.1 && < 2.3 }
common hedgehog { build-depends: hedgehog >= 0.6 && < 1.3 }
common hedgehog { build-depends: hedgehog >= 0.6 && < 1.5 }
common hspec { build-depends: hspec >= 2.4 && < 3 }
common hw-balancedparens { build-depends: hw-balancedparens >= 0.3.0.0 && < 0.5 }
common hw-bits { build-depends: hw-bits >= 0.7.0.5 && < 0.8 }
Expand All @@ -67,7 +68,7 @@ common hw-rankselect-base { build-depends: hw-rankselect-base >=
common hw-simd { build-depends: hw-simd >= 0.1.1.2 && < 0.2 }
common lens { build-depends: lens >= 4 && < 6 }
common mmap { build-depends: mmap >= 0.5 && < 0.6 }
common optparse-applicative { build-depends: optparse-applicative >= 0.14 && < 0.18 }
common optparse-applicative { build-depends: optparse-applicative >= 0.14 && < 0.19 }
common scientific { build-depends: scientific >= 0.3.6.2 && < 0.4 }
common text { build-depends: text >= 1.2 && < 3 }
common transformers { build-depends: transformers >= 0.4 && < 0.7 }
Expand All @@ -92,6 +93,7 @@ library
, aeson
, ansi-wl-pprint
, attoparsec
, attoparsec-aeson
, bits-extra
, bytestring
, dlist
Expand All @@ -106,6 +108,7 @@ library
, hw-rankselect-base
, hw-simd
, mmap
, scientific
, text
, vector
, word8
Expand All @@ -114,14 +117,14 @@ library
autogen-modules: Paths_hw_json
exposed-modules: HaskellWorks.Data.Json.DecodeError
HaskellWorks.Data.Json.FromValue
HaskellWorks.Data.Json.Internal.Standard.Cursor.Token
HaskellWorks.Data.Json.Internal.Standard.Token.Tokenize
HaskellWorks.Data.Json.Internal.CharLike
HaskellWorks.Data.Json.Internal.Doc
HaskellWorks.Data.Json.Internal.Index
HaskellWorks.Data.Json.Internal.Orphans
HaskellWorks.Data.Json.Internal.PartialIndex
HaskellWorks.Data.Json.Internal.Slurp
HaskellWorks.Data.Json.Internal.Standard.Cursor.Token
HaskellWorks.Data.Json.Internal.Standard.Token.Tokenize
HaskellWorks.Data.Json.Internal.Token
HaskellWorks.Data.Json.Internal.Token.Types
HaskellWorks.Data.Json.Internal.Value
Expand Down Expand Up @@ -168,6 +171,7 @@ test-suite hw-json-test
import: base, config
, aeson
, attoparsec
, attoparsec-aeson
, bytestring
, dlist
, hedgehog
Expand Down
8 changes: 4 additions & 4 deletions src/HaskellWorks/Data/Json/Internal/Slurp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Data.Word8
import HaskellWorks.Data.Json.Standard.Cursor.Internal.Word8
import Prelude hiding (drop)

import qualified Data.Aeson.Parser.Internal as AP
import qualified Data.Attoparsec.ByteString as PBS
import qualified Data.ByteString as BS
import qualified Data.Text as T
import qualified Data.Aeson.Parser.Internal as AP
import qualified Data.Attoparsec.ByteString as PBS
import qualified Data.ByteString as BS
import qualified Data.Text as T

data JsonState
= Escaped
Expand Down
16 changes: 8 additions & 8 deletions test/HaskellWorks/Data/Json/LightJsonSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import Test.Hspec

import qualified Data.Aeson.Parser.Internal as AP
import qualified Data.Attoparsec.ByteString as PBS
import qualified Data.ByteString as BS
import qualified Data.Scientific as S
import qualified Data.Text as T
import qualified HaskellWorks.Data.Json.Standard.Cursor.Fast as FAST
import qualified HaskellWorks.Data.Json.Standard.Cursor.Slow as SLOW
import qualified HaskellWorks.Data.TreeCursor as TC
import qualified Data.Aeson.Parser.Internal as AP
import qualified Data.Attoparsec.ByteString as PBS
import qualified Data.ByteString as BS
import qualified Data.Scientific as S
import qualified Data.Text as T
import qualified HaskellWorks.Data.Json.Standard.Cursor.Fast as FAST
import qualified HaskellWorks.Data.Json.Standard.Cursor.Slow as SLOW
import qualified HaskellWorks.Data.TreeCursor as TC

{- HLINT ignore "Reduce duplication" -}
{- HLINT ignore "Redundant bracket" -}
Expand Down

0 comments on commit 8fc35c3

Please sign in to comment.