name: build
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    name: Haskell GHC
    steps:
      - uses: actions/checkout@v5
      - uses: haskell-actions/setup@v2
        with:
          enable-stack: true
          stack-no-global: true
      - uses: actions/cache@v5
        with:
          path: |
            ~/.stack
            .stack-work
          key: ${{ runner.os }}-${{ hashFiles('**/*.cabal','**/stack.yaml') }}
          restore-keys: |
            ${{ runner.os }}-
      - run: stack build
