This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathazure-pipelines.yml
199 lines (197 loc) · 8.7 KB
/
azure-pipelines.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Build master commits
trigger:
batch: false
branches:
include:
- master
# Enable PR triggers that target the master branch
pr:
autoCancel: true # cancel previous builds on push
branches:
include:
- master
jobs:
- job: ghcide_stack_86
timeoutInMinutes: 60
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
- task: CacheBeta@0
inputs:
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack.yaml | $(Build.SourcesDirectory)/ghcide.cabal
path: .azure-cache
cacheHitVar: CACHE_RESTORED
displayName: "Cache stack artifacts"
- bash: |
mkdir -p ~/.stack
tar xzf .azure-cache/stack-root.tar.gz -C $HOME
displayName: "Unpack cache"
condition: eq(variables.CACHE_RESTORED, 'true')
- bash: |
./fmt.sh
displayName: "HLint via ./fmt.sh"
- bash: |
sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev
if ! which stack >/dev/null 2>&1; then
curl -sSL https://get.haskellstack.org/ | sh
fi
displayName: 'Install Stack'
- bash: stack setup
displayName: 'stack setup'
- bash: stack build --only-dependencies
displayName: 'stack build --only-dependencies'
- bash: stack test --ghc-options=-Werror || stack test --ghc-options=-Werror || stack test --ghc-options=-Werror
# ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606.
displayName: 'stack test --ghc-options=-Werror'
- bash: |
mkdir -p .azure-cache
tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack
displayName: "Pack cache"
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-i \
-H 'Content-type: application/json' \
--data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: ghcide_stack_84
timeoutInMinutes: 60
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
- task: CacheBeta@0
inputs:
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack84.yaml | $(Build.SourcesDirectory)/ghcide.cabal
path: .azure-cache
cacheHitVar: CACHE_RESTORED
displayName: "Cache stack artifacts"
- bash: |
mkdir -p ~/.stack
tar xzf .azure-cache/stack-root.tar.gz -C $HOME
displayName: "Unpack cache"
condition: eq(variables.CACHE_RESTORED, 'true')
- bash: |
./fmt.sh
displayName: "HLint via ./fmt.sh"
- bash: |
sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev
if ! which stack >/dev/null 2>&1; then
curl -sSL https://get.haskellstack.org/ | sh
fi
displayName: 'Install Stack'
- bash: stack setup --stack-yaml=stack84.yaml
displayName: 'stack setup --stack-yaml=stack84.yaml'
- bash: stack build --only-dependencies --stack-yaml=stack84.yaml
displayName: 'stack build --only-dependencies --stack-yaml=stack84.yaml'
- bash: stack test --stack-yaml=stack84.yaml --ghc-options=-Werror || stack test --stack-yaml=stack84.yaml --ghc-options=-Werror || stack test --stack-yaml=stack84.yaml --ghc-options=-Werror
# ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606.
displayName: 'stack test --stack-yaml=stack84.yaml --ghc-options=-Werror'
- bash: |
mkdir -p .azure-cache
tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack
displayName: "Pack cache"
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-i \
-H 'Content-type: application/json' \
--data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: ghcide_stack_88
timeoutInMinutes: 60
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
- task: CacheBeta@0
inputs:
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack88.yaml | $(Build.SourcesDirectory)/ghcide.cabal
path: .azure-cache
cacheHitVar: CACHE_RESTORED
displayName: "Cache stack artifacts"
- bash: |
mkdir -p ~/.stack
tar xzf .azure-cache/stack-root.tar.gz -C $HOME
displayName: "Unpack cache"
condition: eq(variables.CACHE_RESTORED, 'true')
- bash: |
./fmt.sh
displayName: "HLint via ./fmt.sh"
- bash: |
sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev
if ! which stack >/dev/null 2>&1; then
curl -sSL https://get.haskellstack.org/ | sh
fi
displayName: 'Install Stack'
- bash: stack setup --stack-yaml=stack88.yaml
displayName: 'stack setup --stack-yaml=stack88.yaml'
- bash: stack build --only-dependencies --stack-yaml=stack88.yaml
displayName: 'stack build --only-dependencies --stack-yaml=stack88.yaml'
- bash: stack test --stack-yaml=stack88.yaml --ghc-options=-Werror || stack test --stack-yaml=stack88.yaml --ghc-options=-Werror || stack test --stack-yaml=stack88.yaml --ghc-options=-Werror
# ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606.
displayName: 'stack test --stack-yaml=stack88.yaml --ghc-options=-Werror'
- bash: |
mkdir -p .azure-cache
tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack
displayName: "Pack cache"
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-i \
-H 'Content-type: application/json' \
--data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: ghcide_stack_ghc_lib_88
timeoutInMinutes: 60
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
- task: CacheBeta@0
inputs:
key: stack-cache-v2 | $(Agent.OS) | $(Build.SourcesDirectory)/stack-ghc-lib.yaml | $(Build.SourcesDirectory)/ghcide.cabal
path: .azure-cache
cacheHitVar: CACHE_RESTORED
displayName: "Cache stack artifacts"
- bash: |
mkdir -p ~/.stack
tar xzf .azure-cache/stack-root.tar.gz -C $HOME
displayName: "Unpack cache"
condition: eq(variables.CACHE_RESTORED, 'true')
- bash: |
./fmt.sh
displayName: "HLint via ./fmt.sh"
- bash: |
sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make zlib1g-dev
if ! which stack >/dev/null 2>&1; then
curl -sSL https://get.haskellstack.org/ | sh
fi
displayName: 'Install Stack'
- bash: stack setup --stack-yaml=stack-ghc-lib.yaml
displayName: 'stack setup --stack-yaml=stack-ghc-lib.yaml'
- bash: stack build --only-dependencies --stack-yaml=stack-ghc-lib.yaml
displayName: 'stack build --only-dependencies --stack-yaml=stack-ghc-lib.yaml'
- bash: stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror || stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror || stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror
# ghcide stack tests are flaky, see https://github.com/digital-asset/daml/issues/2606.
displayName: 'stack test --stack-yaml=stack-ghc-lib.yaml --ghc-options=-Werror'
- bash: |
mkdir -p .azure-cache
tar czf .azure-cache/stack-root.tar.gz -C $HOME .stack
displayName: "Pack cache"
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-i \
-H 'Content-type: application/json' \
--data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/ghcide/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))