This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
/
iotedge.yml
346 lines (329 loc) · 10.9 KB
/
iotedge.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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# Build IoT Edge v1
trigger: none
pr:
- master
jobs:
################################################################################
- job: submodules
################################################################################
displayName: Check submodules
pool:
vmImage: ubuntu-16.04
steps:
- checkout: self
clean: true
fetchDepth: 0
submodules: recursive
- script: |
sudo npm install -g check_submodules
check_submodules . master
displayName: Verify consistency of submodule references
################################################################################
- job: traceability
################################################################################
displayName: Check traceability
pool:
vmImage: vs2017-win2016
steps:
- task: DownloadBuildArtifacts@0
displayName: Get traceability tool
inputs:
buildType: specific
project: iotedge
pipeline: v1 Traceability Tool
buildVersionToDownload: latestFromBranch
branchName: refs/heads/master
downloadType: single
artifactName: traceability
downloadPath: $(System.DefaultWorkingDirectory)
parallelizationLimit: 8
- script: |
traceability\traceabilitytool.exe ^
-i "%cd%\v1" ^
-buildcheck ^
-e "%cd%\v1\deps;%cd%\v1\bindings\nodejs;%cd%\v1\bindings\dotnetcore\dotnet-core-binding"
displayName: Run it
################################################################################
- job: debian
################################################################################
displayName: Debian
pool:
vmImage: ubuntu-16.04
container: azureiotedge/v1-build-debian:latest
steps:
- task: DownloadBuildArtifacts@0
displayName: Get Node.js dynamic library for binding
inputs:
buildType: specific
project: iotedge
pipeline: v1 Node.js Library
buildVersionToDownload: latestFromBranch
branchName: refs/heads/master
downloadType: single
artifactName: nodejs-debian8
downloadPath: $(System.DefaultWorkingDirectory)
parallelizationLimit: 8
- script: |
export NODE_INCLUDE="$(pwd)/nodejs-debian8/inc"
export NODE_LIB="$(pwd)/nodejs-debian8/lib"
v1/tools/build.sh \
--run-unittests \
--enable-nodejs-binding \
--enable-java-binding \
--enable-dotnet-core-binding \
--enable-java-remote-modules \
--enable-nodejs-remote-modules
displayName: Run the build
- task: CopyFiles@2
displayName: Collect build logs
condition: always()
inputs:
SourceFolder: v1/deps
Contents: "**/build/?(output.txt|error.txt)"
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build logs
condition: always()
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: debian
Parallel: true
ParallelCount: 8
################################################################################
- job: intel_edison
################################################################################
displayName: Intel Edison
pool:
vmImage: ubuntu-16.04
container: azureiotedge/v1-build-intel-edison:latest
steps:
- script: |
v1/tools/inteledison_c.sh
displayName: Run the build
- task: CopyFiles@2
displayName: Collect build logs
condition: always()
inputs:
SourceFolder: v1/deps
Contents: "**/build/?(output.txt|error.txt)"
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build logs
condition: always()
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: intel_edison
Parallel: true
ParallelCount: 8
################################################################################
- job: raspberry_pi
################################################################################
displayName: Raspberry Pi
pool:
vmImage: ubuntu-16.04
container: azureiotedge/v1-build-raspberry-pi:latest
steps:
- script: |
set -e
cd v1
BUILD_ROOT=$(pwd)
COMPILER_PATH='/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin'
# Create a CMake toolchain file. See:
# https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-linux
cat <<EOM >toolchain-rpi.cmake
INCLUDE(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER $COMPILER_PATH/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER $COMPILER_PATH/arm-linux-gnueabihf-g++)
SET(PKG_CONFIG_EXECUTABLE arm-linux-gnueabihf-pkg-config CACHE PATH "" FORCE)
SET(CMAKE_FIND_ROOT_PATH $SYSROOT)
SET(CMAKE_SYSROOT $SYSROOT)
SET(ENV{PKG_CONFIG_PATH} $SYSROOT/usr/lib/arm-linux-gnueabihf/pkgconfig)
SET(ENV{PKG_CONFIG_SYSROOT_DIR} $SYSROOT)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
EOM
mkdir build
cd build
cmake \
-Ddependency_install_prefix=$BUILD_ROOT/install-deps \
-DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/toolchain-rpi.cmake \
-DCMAKE_BUILD_TYPE=Debug \
-Drun_e2e_tests=OFF \
-Drun_unittests=OFF \
-Denable_native_remote_modules=OFF \
-Drun_valgrind=OFF \
-Duse_mqtt=OFF \
$BUILD_ROOT
make --jobs=$(nproc)
displayName: Run the build
- task: CopyFiles@2
displayName: Collect build logs
condition: always()
inputs:
SourceFolder: v1/deps
Contents: "**/build/?(output.txt|error.txt)"
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build logs
condition: always()
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: raspberry_pi
Parallel: true
ParallelCount: 8
################################################################################
- job: ubuntu
################################################################################
displayName: Ubuntu
pool:
vmImage: ubuntu-16.04
steps:
- script: |
sudo apt-get update
# target libssl 1.0 until we can update our azure-iot-sdk-c dependency to
# a newer version that accepts libssl 1.1
libssl_version=$( \
apt-cache madison libssl-dev | \
grep -e "libssl-dev | 1.0" | \
head -1 | \
awk '{print $3}' \
)
sudo apt-get install -y --allow-downgrades \
libcurl4-openssl-dev \
uuid-dev \
libssl-dev=$libssl_version
displayName: Install prerequisites
- task: NodeTool@0
displayName: Downgrade Node.js to 8.x for remote modules
inputs:
versionSpec: 8.x
- task: DownloadBuildArtifacts@0
displayName: Get Node.js dynamic library for binding
inputs:
buildType: specific
project: iotedge
pipeline: v1 Node.js Library
buildVersionToDownload: latestFromBranch
branchName: refs/heads/master
downloadType: single
artifactName: nodejs-ubuntu1604
downloadPath: $(System.DefaultWorkingDirectory)
parallelizationLimit: 8
- script: |
export NODE_INCLUDE="$(pwd)/nodejs-ubuntu1604/inc"
export NODE_LIB="$(pwd)/nodejs-ubuntu1604/lib"
v1/tools/build.sh \
--run-unittests \
--enable-nodejs-binding \
--enable-java-binding \
--enable-dotnet-core-binding \
--enable-java-remote-modules \
--enable-nodejs-remote-modules
displayName: Run the build
- task: CopyFiles@2
displayName: Collect build logs
condition: always()
inputs:
SourceFolder: v1/deps
Contents: "**/build/?(output.txt|error.txt)"
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build logs
condition: always()
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: ubuntu
Parallel: true
ParallelCount: 8
################################################################################
- job: wind_river
################################################################################
displayName: Wind River Linux
pool:
vmImage: ubuntu-16.04
container: azureiotedge/v1-build-wind-river:latest
steps:
- script: |
v1/tools/windriver_linux_c.sh
displayName: Run the build
- task: CopyFiles@2
displayName: Collect build logs
condition: always()
inputs:
SourceFolder: v1/deps
Contents: "**/build/?(output.txt|error.txt)"
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build logs
condition: always()
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: wind_river
Parallel: true
ParallelCount: 8
################################################################################
- job: windows
################################################################################
displayName: Windows
pool:
vmImage: vs2017-win2016
steps:
- task: NuGetToolInstaller@0
displayName: Install NuGet tool
inputs:
versionSpec: 4.x
- task: UsePythonVersion@0
displayName: Install Python 2.7
inputs:
versionSpec: 2.7.x
addToPath: true
architecture: x64
- task: NodeTool@0
displayName: Downgrade Node.js to 8.x for remote modules
inputs:
versionSpec: 8.x
- task: DownloadBuildArtifacts@0
displayName: Get Node.js dynamic library for binding
inputs:
buildType: specific
project: iotedge
pipeline: v1 Node.js Library
buildVersionToDownload: latestFromBranch
branchName: refs/heads/master
downloadType: single
artifactName: nodejs-win2012r2
downloadPath: $(System.DefaultWorkingDirectory)
parallelizationLimit: 8
- script: |
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\VsDevCmd.bat" ^
-arch=x64 -host_arch=x64
set "NODE_INCLUDE=%cd%\\nodejs-win2012r2\\inc"
set "NODE_LIB=%cd%\\nodejs-win2012r2\\lib"
call v1\\tools\\build.cmd ^
--platform x64 ^
--run-unittests ^
--enable-nodejs-binding ^
--enable-java-binding ^
--enable-dotnet-binding ^
--enable-dotnet-core-binding ^
--enable-java-remote-modules ^
--enable-nodejs-remote-modules
displayName: Run the build
- task: CopyFiles@2
displayName: Collect build logs
condition: always()
inputs:
SourceFolder: v1/deps
Contents: "**/build/?(output.txt|error.txt)"
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish build logs
condition: always()
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: windows
Parallel: true
ParallelCount: 8