Skip to content

Commit

Permalink
Add github workflow (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
donatello authored May 29, 2020
1 parent ae141fd commit 8e48749
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions stack.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: 524127
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/6.yaml
sha256: dc70dfb45e2c32f54719819bd055f46855dd4b3bd2e58b9f3f38729a2d553fbb
original: lts-14.6

0 comments on commit 8e48749

Please sign in to comment.