Skip to content

Commit f72d366

Browse files
committed
Add Windows CI to Pipelines using vcpkg for dependencies; merge debug and release for other platforms.
1 parent b9dd8ea commit f72d366

File tree

3 files changed

+190
-41
lines changed

3 files changed

+190
-41
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vcpkg"]
2+
path = vcpkg
3+
url = https://github.com/Microsoft/vcpkg

azure-pipelines.yml

+186-41
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,143 @@
11
# CppRestSdk Azure Pipelines Configuration
22

33
jobs:
4-
- job: Ubuntu_1604_Apt_Debug
4+
- job: Windows_VS2017_x86
55
pool:
6-
vmImage: 'Ubuntu 16.04'
6+
vmImage: 'vs2017-win2016'
77
steps:
8+
- script: .\vcpkg\bootstrap-vcpkg.bat
9+
displayName: Bootstrap vcpkg
10+
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp
11+
displayName: vcpkg install dependencies
812
- script: |
9-
sudo apt-get install -y ppa-purge
10-
sudo ppa-purge -y ppa:ondrej/php
11-
sudo apt-get install -y libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev brotli openssl libssl-dev ninja-build
12-
displayName: Apt install dependencies
13-
- script: mkdir build.debug
14-
displayName: Make build.debug
13+
mkdir build.debug
14+
mkdir build.release
15+
displayName: Make Build Directories
1516
- task: CMake@1
1617
inputs:
17-
workingDirectory: 'build.debug'
18-
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
18+
workingDirectory: 'build'
19+
cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
20+
- task: MSBuild@1
21+
inputs:
22+
solution: 'build/ALL_BUILD.vcxproj'
23+
maximumCpuCount: true
1924
- script: |
20-
cd build.debug
21-
ninja
22-
displayName: 'Run ninja'
25+
cd build.debug\Release\Binaries\Debug
26+
.\test_runner.exe *testd.dll
27+
displayName: 'Run tests, debug'
28+
- task: MSBuild@1
29+
inputs:
30+
solution: 'build/ALL_BUILD.vcxproj'
31+
maximumCpuCount: true
32+
configuration: 'Release'
2333
- script: |
24-
cd build.debug/Release/Binaries
25-
./test_runner *test.so
26-
displayName: 'Run Tests'
27-
- job: Ubuntu_1604_Apt_Release
34+
cd build.debug\Release\Binaries\Release
35+
.\test_runner.exe *test.dll
36+
displayName: 'Run tests, release'
37+
- job: Windows_VS2017_x64
38+
pool:
39+
vmImage: 'vs2017-win2016'
40+
steps:
41+
- script: .\vcpkg\bootstrap-vcpkg.bat
42+
displayName: Bootstrap vcpkg
43+
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp --triplet x64-windows
44+
displayName: vcpkg install dependencies
45+
- script: |
46+
mkdir build.debug
47+
mkdir build.release
48+
displayName: Make Build Directories
49+
- task: CMake@1
50+
inputs:
51+
workingDirectory: 'build'
52+
cmakeArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
53+
- task: MSBuild@1
54+
inputs:
55+
solution: 'build/ALL_BUILD.vcxproj'
56+
maximumCpuCount: true
57+
platform: 'x64'
58+
- script: |
59+
cd build.debug\Release\Binaries\Debug
60+
.\test_runner.exe *testd.dll
61+
displayName: 'Run tests, debug'
62+
- task: MSBuild@1
63+
inputs:
64+
solution: 'build/ALL_BUILD.vcxproj'
65+
maximumCpuCount: true
66+
platform: 'x64'
67+
configuration: 'Release'
68+
- script: |
69+
cd build.debug\Release\Binaries\Release
70+
.\test_runner.exe *test.dll
71+
displayName: 'Run tests, release'
72+
- job: Windows_VS2015_x86
73+
pool:
74+
vmImage: 'vs2015-win2012r2'
75+
steps:
76+
- script: .\vcpkg\bootstrap-vcpkg.bat
77+
displayName: Bootstrap vcpkg
78+
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp
79+
displayName: vcpkg install dependencies
80+
- script: |
81+
mkdir build.debug
82+
mkdir build.release
83+
displayName: Make Build Directories
84+
- task: CMake@1
85+
inputs:
86+
workingDirectory: 'build'
87+
cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
88+
- task: MSBuild@1
89+
inputs:
90+
solution: 'build/ALL_BUILD.vcxproj'
91+
maximumCpuCount: true
92+
- script: |
93+
cd build.debug\Release\Binaries\Debug
94+
.\test_runner.exe *testd.dll
95+
displayName: 'Run tests, debug'
96+
- task: MSBuild@1
97+
inputs:
98+
solution: 'build/ALL_BUILD.vcxproj'
99+
maximumCpuCount: true
100+
configuration: 'Release'
101+
- script: |
102+
cd build.debug\Release\Binaries\Release
103+
.\test_runner.exe *test.dll
104+
displayName: 'Run tests, release'
105+
- job: Windows_VS2015_x64
106+
pool:
107+
vmImage: 'vs2015-win2012r2'
108+
steps:
109+
- script: .\vcpkg\bootstrap-vcpkg.bat
110+
displayName: Bootstrap vcpkg
111+
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp --triplet x64-windows
112+
displayName: vcpkg install dependencies
113+
- script: |
114+
mkdir build.debug
115+
mkdir build.release
116+
displayName: Make Build Directories
117+
- task: CMake@1
118+
inputs:
119+
workingDirectory: 'build'
120+
cmakeArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
121+
- task: MSBuild@1
122+
inputs:
123+
solution: 'build/ALL_BUILD.vcxproj'
124+
maximumCpuCount: true
125+
platform: 'x64'
126+
- script: |
127+
cd build.debug\Release\Binaries\Debug
128+
.\test_runner.exe *testd.dll
129+
displayName: 'Run tests, debug'
130+
- task: MSBuild@1
131+
inputs:
132+
solution: 'build/ALL_BUILD.vcxproj'
133+
maximumCpuCount: true
134+
platform: 'x64'
135+
configuration: 'Release'
136+
- script: |
137+
cd build.debug\Release\Binaries\Release
138+
.\test_runner.exe *test.dll
139+
displayName: 'Run tests, release'
140+
- job: Ubuntu_1604_Apt
28141
pool:
29142
vmImage: 'Ubuntu 16.04'
30143
steps:
@@ -33,57 +146,89 @@ jobs:
33146
sudo ppa-purge -y ppa:ondrej/php
34147
sudo apt-get install -y libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev brotli openssl libssl-dev ninja-build
35148
displayName: Apt install dependencies
36-
- script: mkdir build.release
37-
displayName: Make build.release
149+
- script: |
150+
mkdir build.debug
151+
mkdir build.release
152+
displayName: Make Build Directories
153+
- task: CMake@1
154+
inputs:
155+
workingDirectory: 'build.debug'
156+
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
38157
- task: CMake@1
39158
inputs:
40159
workingDirectory: 'build.release'
41160
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
161+
- script: |
162+
cd build.debug
163+
ninja
164+
displayName: 'Run ninja, debug'
165+
- script: |
166+
cd build.debug/Release/Binaries
167+
./test_runner *test.so
168+
displayName: 'Run tests, debug'
42169
- script: |
43170
cd build.release
44171
ninja
45-
displayName: 'Run ninja'
172+
displayName: 'Run ninja, release'
46173
- script: |
47174
cd build.release/Release/Binaries
48175
./test_runner *test.so
49-
displayName: 'Run Tests'
50-
- job: MacOS_Debug
176+
displayName: 'Run tests, release'
177+
178+
# vcpkg on Linux missing for now due to OpenSSL root certificates
179+
# - job: Ubuntu_1604_Vcpkg_Debug
180+
# pool:
181+
# vmImage: 'Ubuntu 16.04'
182+
# steps:
183+
# - script: |
184+
# ./vcpkg/bootstrap-vcpkg.sh
185+
# ./vcpkg/vcpkg install zlib openssl boost-system boost-date-time boost-regex websocketpp boost-thread boost-filesystem boost-random boost-chrono
186+
# displayName: Apt install dependencies
187+
# - script: mkdir build.debug
188+
# displayName: Make build.debug
189+
# - task: CMake@1
190+
# inputs:
191+
# workingDirectory: 'build.debug'
192+
# cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
193+
# - script: |
194+
# cd build.debug
195+
# ninja
196+
# displayName: 'Run ninja'
197+
# - script: |
198+
# cd build.debug/Release/Binaries
199+
# ./test_runner *test.so
200+
# displayName: 'Run Tests'
201+
- job: MacOS
51202
pool:
52203
vmImage: 'macOS-10.13'
53204
steps:
54205
- script: brew install boost openssl ninja
55-
displayName: Berw install dependencies
56-
- script: mkdir build.debug
57-
displayName: Make build.debug
206+
displayName: Brew install dependencies
207+
- script: |
208+
mkdir build.debug
209+
mkdir build.release
210+
displayName: Make Build Directories
58211
- task: CMake@1
59212
inputs:
60213
workingDirectory: 'build.debug'
61214
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
215+
- task: CMake@1
216+
inputs:
217+
workingDirectory: 'build.release'
218+
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
62219
- script: |
63220
cd build.debug
64221
ninja
65-
displayName: 'Run ninja'
222+
displayName: 'Run ninja, debug'
66223
- script: |
67224
cd build.debug/Release/Binaries
68225
./test_runner *test.dylib
69-
displayName: 'Run Tests'
70-
- job: MacOS_Release
71-
pool:
72-
vmImage: 'macOS-10.13'
73-
steps:
74-
- script: brew install boost openssl ninja
75-
displayName: Berw install dependencies
76-
- script: mkdir build.release
77-
displayName: Make build.release
78-
- task: CMake@1
79-
inputs:
80-
workingDirectory: 'build.release'
81-
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
226+
displayName: 'Run tests, debug'
82227
- script: |
83228
cd build.release
84229
ninja
85-
displayName: 'Run ninja'
230+
displayName: 'Run ninja, release'
86231
- script: |
87232
cd build.release/Release/Binaries
88233
./test_runner *test.dylib
89-
displayName: 'Run Tests'
234+
displayName: 'Run tests, release'

vcpkg

Submodule vcpkg added at 29858b3

0 commit comments

Comments
 (0)