forked from DCMLab/protovoices-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.31 KB
/
build_and_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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