Skip to content
Open
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
45 changes: 45 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: github-action

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
ghc: ['8.6.5', '8.8.4']
os: ['ubuntu-latest', 'macos-latest']
exclude:
# There are some linker warnings in 802 on darwin that
# cause compilation to fail
# See https://github.com/NixOS/nixpkgs/issues/25139
- ghc: '8.0.2'
os: 'macos-latest'
runs-on: ${{ matrix.os }}

name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.ghc }}-build-
${{ runner.os }}-${{ matrix.ghc }}-
${{ runner.os }}

- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks all
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all
4 changes: 4 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages:
class/
groundhog/
obelisk/
2 changes: 1 addition & 1 deletion class/database-id-class.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extra-source-files: CHANGELOG.md

library
exposed-modules: Database.Id.Class
build-depends: base >=4.11 && <4.14
build-depends: base >=4.11 && <4.15
, aeson
hs-source-dirs: src
default-language: Haskell2010
2 changes: 1 addition & 1 deletion groundhog/database-id-groundhog.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library
, Database.Id.Groundhog.TH
other-extensions: QuasiQuotes
, TemplateHaskell
build-depends: base >=4.11 && <4.13
build-depends: base >=4.11 && <4.15
, aeson
, database-id-class
, groundhog <= 0.7.0.3
Expand Down
2 changes: 1 addition & 1 deletion obelisk/database-id-obelisk.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extra-source-files: CHANGELOG.md

library
exposed-modules: Database.Id.Obelisk.Route
build-depends: base >=4.11 && <4.13
build-depends: base >=4.11 && <4.15
, obelisk-route
, database-id-class
, mtl
Expand Down