Add github workflow (#148)

This commit is contained in:
Aditya Manthramurthy 2020-05-29 11:45:32 -07:00 committed by GitHub
parent ae141fd6f5
commit 8e4874972b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 1 deletions

50
.github/workflows/haskell.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Haskell CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc: ['8.6.5', '8.8.3']
cabal: ['2.4.1.0', '3.0.0.0']
os: [ubuntu-latest, macOS-latest] #, windows-latest]
exclude:
# GHC 8.8+ only works with cabal v3+
- ghc: 8.8.3
cabal: 2.4.1.0
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1.1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: |
cabal v2-update
cabal v2-build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal v2-build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal v2-test all

View File

@ -18,7 +18,7 @@ matrix:
# Cabal
- ghc: 8.4.4
- ghc: 8.6.5
- ghc: 8.8.2
- ghc: 8.8.3
# Stack
- ghc: 8.6.5

12
stack.yaml.lock Normal file
View File

@ -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: 524127
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/6.yaml
sha256: dc70dfb45e2c32f54719819bd055f46855dd4b3bd2e58b9f3f38729a2d553fbb
original: lts-14.6