reanimate/.azure/azure-windows-template.yml
2021-11-07 17:35:20 +00:00

50 lines
1.5 KiB
YAML

jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 120
variables:
STACK_ROOT: $(Build.SourcesDirectory)/.stack-root
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
stack:
BUILD: stack
STACK_YAML: stack.yaml
ARGS: --pedantic
# lts-16.12 fails intermittently on windows. :(
# lts-15 fails due to segfaults. Think it is a GHC issue.
# stack-lts-15:
# BUILD: stack
# STACK_YAML: stack-lts-15.yaml
# ARGS: --no-run-tests
stack-lts-14:
BUILD: stack
STACK_YAML: stack-lts-14.yaml
ARGS: --no-run-tests
maxParallel: 6
steps:
- task: Cache@2
inputs:
key: ${{ parameters.name }} | ${{ parameters.vmImage }} | $(STACK_YAML) | stack-root | $(Agent.OS) | version3
path: $(STACK_ROOT)
cacheHitVar: CACHE_RESTORED
displayName: Cache stack root
- bash: |
set -o xtrace
curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip
unzip -o /usr/bin/stack.zip -d /usr/bin/
displayName: 'Setup'
- bash: |
set -o xtrace
stack --install-ghc build $ARGS --no-keep-going --fast --only-dependencies
stack --install-ghc test $ARGS --no-keep-going --fast --only-dependencies
displayName: 'Install dependencies'
- bash: |
set -o xtrace
# stack ./examples/counter.hs check
stack test --fast $ARGS
displayName: 'Build & Test'
- bash: |
# stack haddock --no-haddock-deps
displayName: 'Build documentation'