This repository has been archived by the owner on Oct 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
azure-pipelines.yml
234 lines (217 loc) · 9.54 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
stages:
- stage:
displayName: Build
jobs:
# clang-format checker
- job: CheckClangFormat
displayName: Check clang-format
pool: {vmImage: 'ubuntu-16.04'}
container: 'wavm/clang-format-check:latest'
steps:
- script: |
find \
. \( -iname "*.h" -o -iname "*.cpp" \) \
-not -path "./ThirdParty/*" \
-not -path "./Include/WAVM/Inline/xxhash/*" \
| xargs clang-format-9 -i \
git diff --exit-code
# Win64 VS2017
- template: Build/azure-pipelines/windows-build-job-template.yml
parameters:
name: Win64_VS2017
vsVersion: '2017'
platform: 'x64'
llvmBuildBaseName: 'Win64'
llvmVersion: '9.x'
# Win64 VS2019
- template: Build/azure-pipelines/windows-build-job-template.yml
parameters:
name: Win64_VS2019
vsVersion: '2019'
platform: 'x64'
llvmBuildBaseName: 'Win64'
llvmVersion: '9.x'
# Win32 VS2019
- template: Build/azure-pipelines/windows-build-job-template.yml
parameters:
name: Win32_VS2019
vsVersion: '2019'
platform: 'x86'
llvmBuildBaseName: 'Win32'
llvmVersion: '9.x'
# Ubuntu 16.04 GCC
- template: Build/azure-pipelines/posix-build-job-template.yml
parameters:
name: Ubuntu1604_GCC
vmImage: 'ubuntu-16.04'
container: 'wavm/ubuntu16.04-builder:latest'
llvmBuildBaseName: 'Ubuntu1604'
llvmVersion: '9.x'
cpackGenerators: 'TGZ;DEB'
compiler: 'gcc'
# Ubuntu 16.04 Clang
- template: Build/azure-pipelines/posix-build-job-template.yml
parameters:
name: Ubuntu1604_Clang
vmImage: 'ubuntu-16.04'
container: 'wavm/ubuntu16.04-builder:latest'
llvmBuildBaseName: 'Ubuntu1604'
llvmVersion: '9.x'
cpackGenerators: 'TGZ;DEB'
compiler: 'clang'
# CentOS 7.0 Clang
- template: Build/azure-pipelines/posix-build-job-template.yml
parameters:
name: CentOS70_Clang
vmImage: 'ubuntu-16.04'
container: 'wavm/centos7.0-builder:latest'
llvmBuildBaseName: 'Centos70'
llvmVersion: '9.x'
cpackGenerators: 'TGZ;RPM'
compiler: 'clang'
# MacOS 10.14
- template: Build/azure-pipelines/posix-build-job-template.yml
parameters:
name: MacOS
vmImage: 'macOS-10.14'
llvmBuildBaseName: 'MacOS'
llvmVersion: '9.x'
cpackGenerators: 'TGZ'
compiler: 'appleClang'
toolchainInstallSteps:
- script: brew install ninja
displayName: Install Ninja
# Do some basic testing that the packaged builds install and work as expected.
- stage:
displayName: Test packages
jobs:
# Windows installer
- template: Build/azure-pipelines/test-package-job-template.yml
parameters:
name: 'WindowsInstaller'
matrix:
Windows2019: {vmImage: 'windows-2019', container: ''}
Windows2017: {vmImage: 'vs2017-win2016', container: ''}
examplesDir: 'C:\Program Files\WAVM\examples'
executable: 'C:\Program Files\WAVM\bin\wavm.exe'
artifactName: 'Win64_VS2019_LTO'
installSteps:
# Run the installer in silent mode. Since it's not a command-line app, we need to use
# "start /wait" to wait for it to complete.
- script: |
dir /s $(Build.ArtifactStagingDirectory) || exit 1
echo "PATH=%PATH%"
start /wait $(Build.ArtifactStagingDirectory)\wavm-package.exe /S || exit 1
dir /s "C:\Program Files\WAVM"
echo "PATH=%PATH%" || exit 1
displayName: Run installer
# DEB package
- template: Build/azure-pipelines/test-package-job-template.yml
parameters:
name: 'LinuxDEB'
matrix:
Ubuntu1604: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:ubuntu16.04'}
Ubuntu1804: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:ubuntu18.04'}
Ubuntu1904: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:ubuntu19.04'}
Debian9: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:debian9'}
Debian10: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:debian10'}
useContainer: true
examplesDir: '/usr/share/wavm/examples'
artifactName: 'Ubuntu1604_Clang_LTO'
installSteps:
- script: |
sudo apt-get install -y $(Build.ArtifactStagingDirectory)/wavm-package.deb || exit 1
echo "which wavm: `which wavm`" || exit 1
echo "ldd wavm:" || exit 1
ldd -v `which wavm` || exit 1
displayName: apt-get install
# RPM package
- template: Build/azure-pipelines/test-package-job-template.yml
parameters:
name: 'LinuxRPM'
matrix:
CentOS7x: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:centos7'}
CentOS70: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:centos7.0'}
Fedora29: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:fedora29'}
Fedora30: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:fedora30'}
Fedora31: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:fedora31'}
OpenSUSELeap150: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:opensuseleap15.0'}
OpenSUSELeap151: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:opensuseleap15.1'}
useContainer: true
examplesDir: '/usr/share/wavm/examples'
artifactName: 'CentOS70_Clang_LTO'
installSteps:
- script: |
sudo rpm -i $(Build.ArtifactStagingDirectory)/wavm-package.rpm || exit 1
echo "which wavm: `which wavm`" || exit 1
echo "ldd wavm:" || exit 1
ldd -v `which wavm` || exit 1
displayName: rpm install
# Linux archive
- template: Build/azure-pipelines/test-package-job-template.yml
parameters:
name: 'LinuxTGZ'
matrix:
CentOS7x: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:centos7'}
CentOS70: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-rpm:centos7.0'}
Ubuntu1604: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:ubuntu16.04'}
Ubuntu1804: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:ubuntu18.04'}
Ubuntu1904: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:ubuntu19.04'}
Debian8: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:debian8'}
Debian9: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:debian9'}
Debian10: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-deb:debian10'}
ArchLinux: {vmImage: 'ubuntu-16.04', container: 'wavm/package-tester-pacman:archlinux'}
useContainer: true
examplesDir: '/opt/wavm/share/wavm/examples'
executable: '/opt/wavm/bin/wavm'
artifactName: 'CentOS70_Clang_StaticLTO'
installSteps:
- script: |
sudo mkdir -p /opt/wavm || exit 1
sudo tar -xz -C /opt/wavm -f $(Build.ArtifactStagingDirectory)/wavm-package.tar.gz || exit 1
ldd -v /opt/wavm/bin/wavm || exit 1
displayName: Extract archive
# MacOS TGZ
- template: Build/azure-pipelines/test-package-job-template.yml
parameters:
name: 'MacOSTGZ'
matrix:
MacOS1013: {vmImage: 'macOS-10.13', container: ''}
MacOS1014: {vmImage: 'macOS-10.14', container: ''}
examplesDir: '/usr/local/share/wavm/examples'
artifactName: 'MacOS_StaticLTO'
installSteps:
- script: |
sudo tar -xz -C /usr/local -f $(Build.ArtifactStagingDirectory)/wavm-package.tar.gz
echo "which wavm: `which wavm`"
displayName: Extract archive
# Nightly build job
- stage:
displayName: Create nightly GitHub release
jobs:
- template: Build/azure-pipelines/release-job-template.yml
# Notify Discord of success or failure.
# AFAICT the Azure Pipelines succeeded() and failed() predicates aren't able to observe the
# result of other stages unless they are in the stage condition.
- stage:
displayName: Notify Discord (succeeded)
condition: succeeded()
jobs:
- job: NotifyDiscordSuccess
displayName: Notify Discord (succeeded)
pool: { vmImage: macOS-10.14 }
steps:
- bash: $(Build.SourcesDirectory)/Build/notify-discord.sh success $DISCORD_WEBHOOK_URL
displayName: Notify Discord
env: { DISCORD_WEBHOOK_URL: $(DISCORD_WEBHOOK_URL) }
- stage:
displayName: Notify Discord (failed)
condition: failed()
jobs:
- job: NotifyDiscordFailure
displayName: Notify Discord (failed)
pool: { vmImage: macOS-10.14 }
steps:
- bash: $(Build.SourcesDirectory)/Build/notify-discord.sh failure $DISCORD_WEBHOOK_URL
displayName: Notify Discord
env: { DISCORD_WEBHOOK_URL: $(DISCORD_WEBHOOK_URL) }