Skip to content

Neatening

Neatening #119

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest # has stack preinstalled
steps:
# Checks-out your repository
- uses: actions/checkout@v2
# sets up a cache for the ~/.stack directory to avoid rebuilding dependencies
- uses: actions/[email protected]
name: Cache ~/.stack
with:
path: |
~/.stack
.stack-work
key: stack
# Install system dependencies for libraries such as PortMidi
- name: Install System Dependencies
run: |
sudo apt-get install libasound2-dev
# Build the dependencies
- name: Build Dependencies
run: stack build --test --no-run-tests --bench --no-run-benchmarks --only-dependencies --haddock
# Build the package
- name: Build Packages
run: |
stack build --test --no-run-tests --bench --no-run-benchmarks --haddock
mv $(stack path --local-doc-root) ./docs
# Run the tests for all sub-packages
- name: Run Tests
run: stack test
# Copy docs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs