-
Notifications
You must be signed in to change notification settings - Fork 9
/
azure-pipelines.yml
182 lines (169 loc) · 6.31 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
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
strategy:
# Limit number of executors used so other pipelines can run too
maxParallel: 10
matrix:
# Notes:
# Tags are encoded in the following way:
# <os> '-' <ghc-lib> '-' <compiler>
# Not every combination is tested
# - We do sampling to keep the number of builds reasonable;
# - Minimum GHC needed to bootstrap:
# +--------------+-------------+
# | GHC flavor | version |
# +==============+=============+
# | ghc-8.8.* | >= 8.4.4 |
# | ghc-8.10.* | >= 8.6.5 |
# | ghc-9.0.* | >= 8.8.1 |
# | ghc-9.2.* | >= 8.10.1 |
# | ghc-9.4.1 | >= 9.0.1 |
# | ghc-9.6.2 | >= 9.2.2 | (9.2.1 is invalid)
# | > ghc-9.6.2 | >= 9.2.2 |
# +--------------+-------------+
# (the general rule is only the last two compiler versions are
# supported).
# +---------+-----------------+------------+
# | OS | ghc-lib flavor | GHC |
# +=========+=================+============+
# | linux | ghc-master | ghc-9.6.5 |
# | macOS | ghc-master | ghc-9.6.5 |
# | windows | ghc-master | ghc-9.6.5 |
# +---------+-----------------+------------+
linux-ghc-master-9.6.5:
image: "ubuntu-22.04"
mode: "--ghc-flavor ghc-master"
resolver: "ghc-9.6.5"
stack-yaml: "stack-exact.yaml"
mac-ghc-master-9.6.5:
image: "macOS-latest"
mode: "--ghc-flavor ghc-master"
resolver: "ghc-9.6.5"
stack-yaml: "stack-exact.yaml"
windows-ghc-master-9.6.5:
image: "windows-latest"
mode: "--ghc-flavor ghc-master"
resolver: "ghc-9.6.5"
stack-yaml: "stack-exact.yaml"
# +---------+-----------------+------------+
# | OS | ghc-lib flavor | GHC |
# +=========+=================+============+
# | linux | ghc-master | ghc-9.8.1 |
# | macOS | ghc-master | ghc-9.8.1 |
# | windows | ghc-master | ghc-9.8.1 |
# +---------+-----------------+------------+
linux-ghc-master-9.8.1:
image: "ubuntu-22.04"
mode: "--ghc-flavor ghc-master"
resolver: "ghc-9.8.1"
stack-yaml: "stack-exact.yaml"
mac-ghc-master-9.8.1:
image: "macOS-latest"
mode: "--ghc-flavor ghc-master"
resolver: "ghc-9.8.1"
stack-yaml: "stack-exact.yaml"
windows-ghc-master-9.8.1:
image: "windows-latest"
mode: "--ghc-flavor ghc-master"
resolver: "ghc-9.8.1"
stack-yaml: "stack-exact.yaml"
# +---------+-----------------+------------+
# | OS | ghc-lib flavor | GHC |
# +=========+=================+============+
# | linux | ghc-9.10.1 | ghc-9.8.2 |
# | macOS | ghc-9.10.1 | ghc-9.8.2 |
# | windows | ghc-9.10.1 | ghc-9.8.2 |
# +---------+-----------------+------------+
linux-ghc-9.10.1-9.8.2:
image: "ubuntu-22.04"
mode: "--ghc-flavor ghc-9.10.1"
resolver: "ghc-9.8.2"
stack-yaml: "stack-exact.yaml"
mac-ghc-9.10.1-9.8.2:
image: "macOS-latest"
mode: "--ghc-flavor ghc-9.10.1"
resolver: "ghc-9.8.2"
stack-yaml: "stack-exact.yaml"
windows-ghc-9.10.1-9.8.2:
image: "windows-latest"
mode: "--ghc-flavor ghc-9.10.1"
resolver: "ghc-9.8.2"
stack-yaml: "stack-exact.yaml"
# +---------+-----------------+------------+
# | OS | ghc-lib flavor | GHC |
# +=========+=================+============+
# | linux | da-ghc-8.8.1 | ghc-8.8.1 |
# | windows | da-ghc-8.8.1 | ghc-8.8.1 |
# | macOS | da-ghc-8.8.1 | ghc-8.8.1 |
# +---------+-----------------+------------+
linux-da-ghc-8.8.1-8.8.1:
image: "ubuntu-22.04"
mode: "--da"
resolver: "nightly-2020-01-08"
stack-yaml: "stack.yaml"
windows-da-ghc-8.8.1-8.8.1:
image: "windows-latest"
mode: "--da"
resolver: "nightly-2020-01-08"
stack-yaml: "stack.yaml"
mac-da-ghc-8.8.1-8.8.1:
image: "macOS-latest"
mode: "--da"
resolver: "nightly-2020-01-08"
stack-yaml: "stack.yaml"
pool: {vmImage: '$(image)'}
steps:
# windows
- bash: |
if [ -d patches ]; then
/usr/bin/find patches -name "*.patch" -exec dos2unix {} \;
fi
condition: eq( variables['Agent.OS'], 'Windows_NT' )
# macOS
- bash: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install automake
condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: Install brew
- bash: |
curl -sSL https://get.haskellstack.org/ | sh -s - -f
displayName: install Stack
- bash: |
set -euo pipefail
version=$(curl -Is https://github.com/ndmitchell/hlint/releases/latest | grep location: | sed 's|.*/||' | tr -d '\n\r')
echo "VERSION: $version"
temp=$(mktemp -d)
curl -sSL https://github.com/ndmitchell/hlint/releases/download/$version/hlint-${version#v}-x86_64-linux.tar.gz > $temp/tarball
tar -xzf $temp/tarball -C$temp
hlint() (
echo
echo DEBUG: hlint "$@"
$temp/hlint-${version#v}/hlint "$@"
)
hlint CI.hs
hlint ghc-lib-gen
hlint examples/ghc-lib-test-utils/src
series=( GHC_8_8 GHC_8_10 GHC_9_0 GHC_9_2 GHC_9_4 GHC_9_6 GHC_9_8 GHC_9_10 )
for s in "${series[@]}"; do
hlint examples/ghc-lib-test-mini-hlint/src --cpp-include examples/ghc-lib-test-mini-hlint/extra-source-files --cpp-define "$s"
hlint examples/ghc-lib-test-mini-compile/src --cpp-include examples/ghc-lib-test-mini-compile/extra-source-files --cpp-define "$s"
done
displayName: run hlint
condition: eq( variables['Agent.OS'], 'Linux' )
- bash: |
GHCLIB_AZURE=1;export GHCLIB_AZURE
stack runhaskell --stack-yaml $(stack-yaml) --resolver $(resolver) --package extra --package optparse-applicative -- CI.hs $(mode) --stack-yaml $(stack-yaml) --resolver $(resolver)
displayName: build