Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows CI to Pipelines using vcpkg for dependencies. #911

Merged
merged 1 commit into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Microsoft/vcpkg
219 changes: 178 additions & 41 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,135 @@
# CppRestSdk Azure Pipelines Configuration

jobs:
- job: Ubuntu_1604_Apt_Debug
- job: Windows_VS2017_x86
pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'vs2017-win2016'
steps:
- script: .\vcpkg\bootstrap-vcpkg.bat
displayName: Bootstrap vcpkg
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp
displayName: vcpkg install dependencies
- script: mkdir build.common
displayName: Make Build Directory
- task: CMake@1
inputs:
workingDirectory: 'build.common'
cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
- script: |
sudo apt-get install -y ppa-purge
sudo ppa-purge -y ppa:ondrej/php
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
displayName: Apt install dependencies
- script: mkdir build.debug
displayName: Make build.debug
cd build.common\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
configuration: 'Release'
- script: |
cd build.common\Release\Binaries\Release
.\test_runner.exe *test.dll
displayName: 'Run tests, release'
- job: Windows_VS2017_x64
pool:
vmImage: 'vs2017-win2016'
steps:
- script: .\vcpkg\bootstrap-vcpkg.bat
displayName: Bootstrap vcpkg
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp --triplet x64-windows
displayName: vcpkg install dependencies
- script: mkdir build.common
displayName: Make Build Directory
- task: CMake@1
inputs:
workingDirectory: 'build.debug'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
workingDirectory: 'build.common'
cmakeArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
- script: |
cd build.debug
ninja
displayName: 'Run ninja'
cd build.common\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
- script: |
cd build.debug/Release/Binaries
./test_runner *test.so
displayName: 'Run Tests'
- job: Ubuntu_1604_Apt_Release
cd build.common\Release\Binaries\Release
.\test_runner.exe *test.dll
displayName: 'Run tests, release'
- job: Windows_VS2015_x86
pool:
vmImage: 'vs2015-win2012r2'
steps:
- script: .\vcpkg\bootstrap-vcpkg.bat
displayName: Bootstrap vcpkg
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp
displayName: vcpkg install dependencies
- script: mkdir build.common
displayName: Make Build Directory
- task: CMake@1
inputs:
workingDirectory: 'build.common'
cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
- script: |
cd build.common\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
configuration: 'Release'
- script: |
cd build.common\Release\Binaries\Release
.\test_runner.exe *test.dll
displayName: 'Run tests, release'
- job: Windows_VS2015_x64
pool:
vmImage: 'vs2015-win2012r2'
steps:
- script: .\vcpkg\bootstrap-vcpkg.bat
displayName: Bootstrap vcpkg
- script: .\vcpkg\vcpkg.exe install zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp --triplet x64-windows
displayName: vcpkg install dependencies
- script: mkdir build.common
displayName: Make Build Directory
- task: CMake@1
inputs:
workingDirectory: 'build.common'
cmakeArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
- script: |
cd build.common\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
- script: |
cd build.common\Release\Binaries\Release
.\test_runner.exe *test.dll
displayName: 'Run tests, release'
- job: Ubuntu_1604_Apt
pool:
vmImage: 'Ubuntu 16.04'
steps:
Expand All @@ -33,57 +138,89 @@ jobs:
sudo ppa-purge -y ppa:ondrej/php
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
displayName: Apt install dependencies
- script: mkdir build.release
displayName: Make build.release
- script: |
mkdir build.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build.debug'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
- task: CMake@1
inputs:
workingDirectory: 'build.release'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
- script: |
cd build.debug
ninja
displayName: 'Run ninja, debug'
- script: |
cd build.debug/Release/Binaries
./test_runner *test.so
displayName: 'Run tests, debug'
- script: |
cd build.release
ninja
displayName: 'Run ninja'
displayName: 'Run ninja, release'
- script: |
cd build.release/Release/Binaries
./test_runner *test.so
displayName: 'Run Tests'
- job: MacOS_Debug
displayName: 'Run tests, release'

# vcpkg on Linux missing for now due to OpenSSL root certificates
# - job: Ubuntu_1604_Vcpkg_Debug
# pool:
# vmImage: 'Ubuntu 16.04'
# steps:
# - script: |
# ./vcpkg/bootstrap-vcpkg.sh
# ./vcpkg/vcpkg install zlib openssl boost-system boost-date-time boost-regex websocketpp boost-thread boost-filesystem boost-random boost-chrono
# displayName: Apt install dependencies
# - script: mkdir build.debug
# displayName: Make build.debug
# - task: CMake@1
# inputs:
# workingDirectory: 'build.debug'
# cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
# - script: |
# cd build.debug
# ninja
# displayName: 'Run ninja'
# - script: |
# cd build.debug/Release/Binaries
# ./test_runner *test.so
# displayName: 'Run Tests'
- job: MacOS
pool:
vmImage: 'macOS-10.13'
steps:
- script: brew install boost openssl ninja
displayName: Berw install dependencies
- script: mkdir build.debug
displayName: Make build.debug
displayName: Brew install dependencies
- script: |
mkdir build.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build.debug'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
- task: CMake@1
inputs:
workingDirectory: 'build.release'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
- script: |
cd build.debug
ninja
displayName: 'Run ninja'
displayName: 'Run ninja, debug'
- script: |
cd build.debug/Release/Binaries
./test_runner *test.dylib
displayName: 'Run Tests'
- job: MacOS_Release
pool:
vmImage: 'macOS-10.13'
steps:
- script: brew install boost openssl ninja
displayName: Berw install dependencies
- script: mkdir build.release
displayName: Make build.release
- task: CMake@1
inputs:
workingDirectory: 'build.release'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
displayName: 'Run tests, debug'
- script: |
cd build.release
ninja
displayName: 'Run ninja'
displayName: 'Run ninja, release'
- script: |
cd build.release/Release/Binaries
./test_runner *test.dylib
displayName: 'Run Tests'
displayName: 'Run tests, release'
1 change: 1 addition & 0 deletions vcpkg
Submodule vcpkg added at 29858b