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 #stack-lts-16: # BUILD: stack # STACK_YAML: stack-lts-16.yaml stack-lts-17: BUILD: stack STACK_YAML: stack-lts-17.yaml maxParallel: 6 steps: - task: Cache@2 inputs: key: ${{ parameters.name }} | "${{ parameters.vmImage }}" | $(STACK_YAML) | stack-root | $(Agent.OS) | version4 path: $(STACK_ROOT) cacheHitVar: CACHE_RESTORED displayName: Cache stack root - script: | # brew install gcc # brew install blas # brew install lapack # brew install openblas mkdir -p ~/.local/bin curl -skL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin; export PATH=$HOME/.local/bin:$PATH # Check if the cache has been corrupted. Delete it if it has. stack exec ghc -- --version || rm -fr $(STACK_ROOT) displayName: 'Setup' - script: | stack --install-ghc build $ARGS --only-dependencies --extra-lib-dirs=/usr/local/opt/openblas/lib stack --install-ghc build --test $ARGS --only-dependencies displayName: 'Install dependencies' - script: | # stack ./examples/counter.hs check stack test $ARGS displayName: 'Build & Test' - script: | stack haddock --no-haddock-deps displayName: 'Build documentation'