Skip to content

Commit

Permalink
Add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ccntrq committed Aug 24, 2023
1 parent e8d9eaa commit c723e09
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build
on:
push:
pull_request:

permissions:
contents: read

jobs:
build:
name: ${{ matrix.ghc-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-version: ['9.2']

steps:
- uses: actions/checkout@v3

- name: Set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: 'latest'
cabal-update: true
enable-stack: true
stack-version: 'latest'

- name: Restore cached dependencies
uses: actions/cache@v3
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-stack-${{ steps.setup.outputs.stack-version }}
with:
path: |
~/.stack
.stack-work
key: ${{ env.key}}-plan-${{ hashFiles('stack.yaml', 'package.yaml') }}
restore-keys: ${{ env.key }}-

- name: Build
run: stack build

- name: Build documentation
run: stack haddock

- name: Package
run: stack sdist

0 comments on commit c723e09

Please sign in to comment.