forked from microsoft/verona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vsts-ci.yml
231 lines (186 loc) · 6.15 KB
/
.vsts-ci.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
resources:
- repo: self
jobs:
- job:
displayName: RT_Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Debug:
BuildType: Debug
Asan: Off
Release:
Asan: Off
BuildType: Release
ASAN-Debug:
BuildType: Debug
Asan: On
ASAN-Release:
BuildType: Release
Asan: On
steps:
- checkout: self
submodules: recursive
- script: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y ninja-build libc++-dev libc++abi-dev libc++abi1 libstdc++-7-dev llvm-6.0
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 100
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --set cc /usr/bin/clang
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
sudo update-alternatives --set c++ /usr/bin/clang++
displayName: 'Install Build Dependencies'
- task: CMake@1
displayName: 'CMake ../src/rt -GNinja -DUSE_ASAN=$(Asan) -DCMAKE_BUILD_TYPE=$(BuildType) -DCMAKE_CXX_FLAGS="-stdlib=libstdc++"'
inputs:
cmakeArgs: '../src/rt -GNinja -DUSE_ASAN=$(Asan) -DCMAKE_BUILD_TYPE=$(BuildType) -DCMAKE_CXX_FLAGS="-stdlib=libstdc++" -DVERONA_CI_BUILD=On'
- script: |
ninja
export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer
export ASAN_OPTIONS="alloc_dealloc_mismatch=0 symbolize=1"
ctest -j 4 -E "([1-9][0-9]00|[4-9]00)" --timeout 400 --output-on-failure
workingDirectory: build
failOnStderr: true
displayName: 'Compile & Test'
- job:
displayName: RT_Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Debug:
BuildType: Debug
Release:
BuildType: Release
steps:
- checkout: self
submodules: recursive
- task: CMake@1
displayName: 'CMake ../src/rt -G"Visual Studio 15 2017 Win64"'
inputs:
cmakeArgs: '../src/rt -G"Visual Studio 15 2017 Win64" -DVERONA_CI_BUILD=On'
- task: MSBuild@1
displayName: 'Build solution build/verona.sln'
inputs:
solution: build/verona.sln
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- script: 'ctest -j 4 -E "([1-9][0-9]00|[2-9]00|compile)" --timeout 400 --interactive-debug-mode 0 --output-on-failure'
workingDirectory: build
displayName: 'Run Ctest'
- job:
displayName: Format
pool:
vmImage: 'ubuntu-16.04'
steps:
- checkout: self
submodules: recursive
- script: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
sudo apt-get update
sudo apt-get install -y clang-format-6.0
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-6.0 100
displayName: 'Install Clang tools'
- task: CMake@1
displayName: 'CMake ..'
inputs:
cmakeArgs: '..'
- script: |
make clangformat
git diff $(Build.SourceVersion)
if [ "$(git diff $(Build.SourceVersion))" != "" ]; then exit 1; fi
workingDirectory: build
displayName: 'Clang-Format'
- script: |
grep -L "Copyright (c) Microsoft Corporation" `git ls-files -- '*.cpp' '*.cc' '*.h' '*.hh' '*.verona'| xargs`
displayName: 'Check Copyright'
- job:
displayName: Lang_MacOSX
pool:
vmImage: 'macOS-10.14'
strategy:
matrix:
Debug:
BuildType: Debug
Release:
BuildType: Release
steps:
- checkout: self
submodules: recursive
- script: |
sudo pip install wheel OutputCheck
displayName: Dependencies
- task: CMake@1
displayName: 'CMake .. -DCMAKE_BUILD_TYPE=$(BuildType) -DVERONA_CI_BUILD=On'
inputs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=$(BuildType) -DVERONA_CI_BUILD=On'
- script: |
make -j 4 install
workingDirectory: build
failOnStderr: true
displayName: 'Compile'
- script: |
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build
failOnStderr: true
displayName: 'Run compiler test suite'
- job:
displayName: Lang_Linux
pool:
vmImage: 'ubuntu-16.04'
steps:
- checkout: self
submodules: recursive
- script: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 15CF4D18AF4F7421
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
sudo apt-get install -y ninja-build ghc libghc-parsec3-dev libstdc++-7-dev
sudo pip install wheel OutputCheck
displayName: 'Install Build Dependencies'
- task: CMake@1
displayName: 'CMake'
inputs:
cmakeArgs: '.. -GNinja -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE="Debug" -DVERONA_CI_BUILD=On'
- script: 'ninja -v install'
displayName: 'Build'
workingDirectory: build
failOnStderr: true
- script: 'ctest --output-on-failure -j4'
displayName: 'Run compiler testsuite'
workingDirectory: build
- job:
displayName: Lang_Windows
pool:
vmImage: 'windows-latest'
strategy:
matrix:
Debug:
BuildType: Debug
Release:
BuildType: Release
steps:
- checkout: self
submodules: recursive
- script:
pip install OutputCheck
- task: CMake@1
displayName: 'CMake .. -G"Visual Studio 16 2019 " -A"x64"'
inputs:
cmakeArgs: '.. -G"Visual Studio 16 2019" -A"x64" -DVERONA_CI_BUILD=On'
- task: MSBuild@1
displayName: 'Build solution build/verona.sln'
inputs:
solution: build/INSTALL.vcxproj
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
failOnAlert: true
- script:
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build