diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml new file mode 100644 index 000000000..3abf3bf7e --- /dev/null +++ b/.github/workflows/haskell.yml @@ -0,0 +1,42 @@ +name: Build and Test + +on: [push, pull_request] +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + ghc: ['8.10.1', '8.8.3', '8.6.5', '8.4.4'] + os: [ubuntu-latest, macOS-latest, windows-latest] + exclude: + - os: windows-latest + ghc: '8.8.3' # fails due to segfault + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1.1.1 + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: '3.2' + enable-stack: true + + - name: Cache Cabal + uses: actions/cache@v1.2.0 + with: + path: ~/.cabal + key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-0 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + if: matrix.os == 'ubuntu-latest' + with: + ignore: tests + + - run: cabal update + - name: Build + run: cabal build + - name: Test + run: cabal test