Skip to content

WIP

WIP #50

Workflow file for this run

name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
# branches: [master]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# TODO: Not sure how to cache this one.. cachix?
nix:
name: nix build
runs-on: ubuntu-latest
container:
image: 'nixos/nix:2.3.6'
steps:
- uses: actions/checkout@v2
- name: Build
run: |
nix-build
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cabal: ["3.2"]
ghc:
- "8.6.5"
- "8.10.7"
- "9.0.2"
- "9.2.8"
steps:
- uses: actions/checkout@v2
# if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Freeze
run: |
cabal freeze
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
cabal build all --write-ghc-environment-files=always
ghc -iexample Example
- name: Test
run: |
cabal test all