forked from PointCloudLibrary/pcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.azure-pipelines.yml
187 lines (186 loc) · 8.24 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
resources:
containers:
- container: env1604
image: pointcloudlibrary/env:16.04
- container: doc
image: pointcloudlibrary/doc
jobs:
- job: ubuntu1604
displayName: Ubuntu 16.04 Build
timeoutInMinutes: 0
pool:
vmImage: 'Ubuntu 16.04'
container: env1604
variables:
BUILD_DIR: '$(Agent.BuildDirectory)/build'
CMAKE_CXX_FLAGS: '-Wall -Wextra -Wabi -O2'
steps:
- script: |
mkdir $BUILD_DIR && cd $BUILD_DIR
cmake $(Build.SourcesDirectory) \
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
-DPCL_ONLY_CORE_POINT_TYPES=ON \
-DPCL_QT_VERSION=5 \
-DBUILD_simulation=ON \
-DBUILD_global_tests=ON \
-DBUILD_examples=ON \
-DBUILD_tools=ON \
-DBUILD_apps=ON \
-DBUILD_apps_3d_rec_framework=ON \
-DBUILD_apps_cloud_composer=ON \
-DBUILD_apps_in_hand_scanner=ON \
-DBUILD_apps_modeler=ON \
-DBUILD_apps_point_cloud_editor=ON
displayName: 'CMake Configuration'
- script: |
cd $BUILD_DIR
# Compiling some of the test targets with -j2 option leads to pipeline failures
# (presumably out of memory error). Thus we make them separately in a single
# thread mode. Their corresponding modules are built before with the -j2 mode
# to make the process faster.
cmake --build . -- -j2 pcl_filters pcl_registration
cmake --build . -- test_filters test_registration test_registration_api
cmake --build . -- -j2
displayName: 'Build Library'
- script: cd $BUILD_DIR && cmake --build . -- tests
displayName: 'Run Unit Tests'
- job: osx
displayName: macOS High Sierra
timeoutInMinutes: 0
pool:
vmImage: 'macOS-10.13'
variables:
BUILD_DIR: '$(Agent.BuildDirectory)/build'
GOOGLE_TEST_DIR: '$(Agent.WorkFolder)/googletest'
CMAKE_CXX_FLAGS: '-Wall -Wextra -Wabi -O2'
steps:
- script: |
brew install pkg-config qt5 libpcap brewsci/science/openni
brew install vtk --with-qt --without-python@2
brew install --only-dependencies pcl
git clone https://github.com/abseil/googletest.git $GOOGLE_TEST_DIR # the official endpoint changed to abseil/googletest
cd $GOOGLE_TEST_DIR && git checkout release-1.8.1
displayName: 'Install Dependencies'
- script: |
mkdir $BUILD_DIR && cd $BUILD_DIR
cmake $(Build.SourcesDirectory) \
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
-DGTEST_SRC_DIR="$GOOGLE_TEST_DIR/googletest" \
-DGTEST_INCLUDE_DIR="$GOOGLE_TEST_DIR/googletest/include" \
-DQt5Core_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Core \
-DQt5Gui_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Gui \
-DQt5Widgets_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Widgets \
-DQt5Concurrent_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Concurrent \
-DQt5OpenGL_DIR=/usr/local/opt/qt5/lib/cmake/Qt5OpenGL \
-DPCL_ONLY_CORE_POINT_TYPES=ON \
-DPCL_QT_VERSION=5 \
-DBUILD_simulation=ON \
-DBUILD_global_tests=ON \
-DBUILD_examples=ON \
-DBUILD_tools=ON \
-DBUILD_apps=ON \
-DBUILD_apps_3d_rec_framework=ON \
-DBUILD_apps_cloud_composer=ON \
-DBUILD_apps_in_hand_scanner=ON \
-DBUILD_apps_modeler=ON \
-DBUILD_apps_point_cloud_editor=ON
displayName: 'CMake Configuration'
- script: |
cd $BUILD_DIR
# Compiling some of the test targets with -j2 option leads to pipeline failures
# (presumably out of memory error). Thus we make them separately in a single
# thread mode. Their corresponding modules are built before with the -j2 mode
# to make the process faster.
cmake --build . -- -j2 pcl_filters pcl_registration
cmake --build . -- test_filters test_registration test_registration_api
cmake --build . -- -j2
displayName: 'Build Library'
- script: cd $BUILD_DIR && cmake --build . -- tests
displayName: 'Run Unit Tests'
- job: documentation
displayName: Generate Documentation
pool:
vmImage: 'Ubuntu 16.04'
container: doc
variables:
BUILD_DIR: '$(Agent.BuildDirectory)/build'
DOC_DIR: '$(Agent.BuildDirectory)/documentation'
steps:
- task: InstallSSHKey@0
inputs:
hostName: github.com
sshPublicKey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBh5Yrau/gguTfoNALxhVX77Pgz6y6UWoJRERMKR68ee [email protected]
sshKeySecureFile: id_ed25519
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
- script: |
mkdir $BUILD_DIR && cd $BUILD_DIR
cmake $(Build.SourcesDirectory) \
-DDOXYGEN_USE_SHORT_NAMES=OFF \
-DSPHINX_HTML_FILE_SUFFIX=php \
-DWITH_DOCS=ON \
-DWITH_TUTORIALS=ON
displayName: 'CMake Configuration'
- script: cd $BUILD_DIR && make doc tutorials advanced
displayName: 'Build Documentation'
- script: |
git config --global user.email "[email protected]"
git config --global user.name "PointCloudLibrary (via Azure Pipelines)"
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
git clone [email protected]:PointCloudLibrary/documentation.git $DOC_DIR
cd $DOC_DIR
cp -r $BUILD_DIR/doc/tutorials/html/* tutorials
cp -r $BUILD_DIR/doc/advanced/html/* advanced
cp -r $BUILD_DIR/doc/doxygen/html/* .
git add --all
git commit --amend --reset-author -m 'Documentation for commit $(Build.SourceVersion)' -q
git push --force
displayName: 'Push Generated Documentation To GitHub'
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
- job: vs2017
displayName: Windows VS2017 Build
timeoutInMinutes: 0
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
x86:
PLATFORM: 'x86'
ARCHITECTURE: 'x86'
GENERATOR: 'Visual Studio 15 2017'
x64:
PLATFORM: 'x64'
ARCHITECTURE: 'x86_amd64'
GENERATOR: 'Visual Studio 15 2017 Win64'
variables:
BUILD_DIR: '$(Agent.WorkFolder)\build'
VCPKG_DIR: '$(Agent.WorkFolder)\vcpkg'
VCVARSALL: '%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
CONFIGURATION: 'Release'
steps:
- script: |
git clone https://github.com/microsoft/vcpkg --depth 1 %VCPKG_DIR%
echo.set(VCPKG_BUILD_TYPE release)>> %VCPKG_DIR%\triplets\%PLATFORM%-windows.cmake
%VCPKG_DIR%\bootstrap-vcpkg.bat
%VCPKG_DIR%\vcpkg.exe version
displayName: 'Bootstrap vcpkg'
- script: |
%VCPKG_DIR%\vcpkg.exe install boost-system boost-filesystem boost-thread boost-date-time boost-iostreams boost-chrono boost-asio boost-dynamic-bitset boost-foreach boost-graph boost-interprocess boost-multi-array boost-ptr-container boost-random boost-signals2 eigen3 flann gtest qhull --triplet %PLATFORM%-windows
%VCPKG_DIR%\vcpkg.exe list
displayName: 'Install Dependencies'
- script: |
rmdir %VCPKG_DIR%\downloads /S /Q
rmdir %VCPKG_DIR%\packages /S /Q
displayName: 'Free up space'
- script: |
call "%VCVARSALL%" %ARCHITECTURE%
set PATH=%VCPKG_DIR%\installed\%PLATFORM%-windows\bin;%PATH%
mkdir %BUILD_DIR% && cd %BUILD_DIR%
cmake $(Build.SourcesDirectory) -G"%GENERATOR%" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_DIR%\scripts\buildsystems\vcpkg.cmake -DVCPKG_APPLOCAL_DEPS=ON -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON -DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=ON -DBUILD_global_tests=ON -DBUILD_tools=OFF -DBUILD_surface_on_nurbs=ON
displayName: 'CMake Configuration'
- script: cd %BUILD_DIR% && cmake --build . --config %CONFIGURATION%
displayName: 'Build Library'
- script: cd %BUILD_DIR% && ctest -C %CONFIGURATION% -V
displayName: 'Run Unit Tests'