Fixed CI for windows #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push] | |
name: Build and test | |
jobs: | |
ci: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: ${{ matrix.os }}-stack-${{ hashFiles('./stack.yaml.lock') }} | |
- name: Build package dependencies | |
run: | | |
stack --system-ghc build --no-run-tests --no-run-benchmarks --only-dependencies | |
- name: Build package | |
run: | | |
stack --system-ghc build --no-run-tests --no-run-benchmarks | |
- name: Build testing dependencies | |
run: | | |
stack --system-ghc build --no-run-tests --no-run-benchmarks --test --bench | |
- name: Run tests | |
run: | | |
stack --system-ghc build --test --no-run-benchmarks | |
- name: Build documentation | |
run: | | |
stack --system-ghc haddock | |
- name: Check documentation | |
if: matrix.os != 'windows-latest' | |
run: | | |
stack --system-ghc install doctest | |
$(stack path --local-bin)/doctest src/ |