-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (40 loc) · 1.67 KB
/
pr.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
53
on:
pull_request:
types: [opened, synchronize, ready_for_review]
name: nsc PR integrity CI
jobs:
build:
runs-on: ubuntu-latest
name: Check PR integrity
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clean `.cabal` files
run: find . -type f -name '*.cabal' -delete
#############################################################################
- name: Install Stack
run: stack --version
- name: Install GHC
run: stack setup --install-ghc
- name: Install required tools
run: |
echo "::group::C2HS"
stack install c2hs
echo "PATH=~/.local/bin:$PATH" >> $GITHUB_ENV
echo "::end-group::"
echo "::group::glibc v2.31"
sudo apt-get install libc-dev
echo "::end-group::"
- name: Build Haskell dependencies
run: stack build --test --no-run-tests --only-dependencies --no-terminal
- name: Build NSC
id: build-nsc
run: stack build --test --no-run-tests --ghc-options=-fforce-recomp --ghc-options=-split-sections --ghc-options=-fdiagnostics-color=always
# --ghc-options=-fdefer-diagnostics
- name: Run tests
run: stack test
- name: Test doc generation
continue-on-error: true
if: steps.build-nsc.outcome == 'success' # it's useless to test doc generation if the code doesn't compile
run: stack build --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs"