on debug help sign in
ghcide/.azure/linux-stack.yml
57 lines 2.2 kB history raw
1jobs:
2- job: ghcide_stack_linux
3 timeoutInMinutes: 60
4 pool:
5 vmImage: 'ubuntu-latest'
6 strategy:
7 matrix:
8 stack_88:
9 STACK_YAML: "stack88.yaml"
10 stack_86:
11 STACK_YAML: "stack.yaml"
12 stack_84:
13 STACK_YAML: "stack84.yaml"
14 stack_ghc_lib_88:
15 STACK_YAML: "stack-ghc-lib.yaml"
16 steps:
17 - checkout: self
18 - task: Cache@2
19 inputs:
20 key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/$(STACK_YAML) | $(Build.SourcesDirectory)/ghcide.cabal
21 path: .azure-cache
22 cacheHitVar: CACHE_RESTORED
23 displayName: "Cache stack artifacts"
24 - bash: |
25 mkdir -p ~/.stack
26 tar xzf .azure-cache/stack-root.tar.gz -C $HOME
27 displayName: "Unpack cache"
28 condition: eq(variables.CACHE_RESTORED, 'true')
29 - bash: |
30 ./fmt.sh
31 displayName: "HLint via ./fmt.sh"
32 - bash: |
33 sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev
34 if ! which stack >/dev/null 2>&1; then
35 curl -sSL https://get.haskellstack.org/ | sh
36 fi
37 displayName: 'Install Stack'
38 - bash: stack setup --stack-yaml=$STACK_YAML
39 displayName: 'stack setup'
40 - bash: stack build --only-dependencies --stack-yaml=$STACK_YAML
41 displayName: 'stack build --only-dependencies'
42 - bash: stack test --ghc-options=-Werror --stack-yaml=$STACK_YAML || stack test --ghc-options=-Werror --stack-yaml=$STACK_YAML|| stack test --ghc-options=-Werror --stack-yaml=$STACK_YAML
43 # ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606.
44 displayName: 'stack test --ghc-options=-Werror'
45 - bash: |
46 mkdir -p .azure-cache
47 tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack
48 displayName: "Pack cache"
49 - bash: |
50 set -euo pipefail
51 MESSAGE=$(git log --pretty=format:%s -n1)
52 curl -XPOST \
53 -i \
54 -H 'Content-type: application/json' \
55 --data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
56 $(Slack.URL)
57 condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))