Skip to content

Commit

Permalink
Add Windows CI to Pipelines using vcpkg for dependencies; merge debug…
Browse files Browse the repository at this point in the history
… and release for other platforms.
  • Loading branch information
BillyONeal committed Oct 12, 2018
1 parent b9dd8ea commit f72d366
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 41 deletions.
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
227 changes: 186 additions & 41 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,143 @@
# 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: |
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
mkdir build.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build.debug'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
workingDirectory: 'build'
cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
- script: |
cd build.debug
ninja
displayName: 'Run ninja'
cd build.debug\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
configuration: 'Release'
- script: |
cd build.debug/Release/Binaries
./test_runner *test.so
displayName: 'Run Tests'
- job: Ubuntu_1604_Apt_Release
cd build.debug\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.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build'
cmakeArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
- script: |
cd build.debug\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
- script: |
cd build.debug\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.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build'
cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
- script: |
cd build.debug\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
configuration: 'Release'
- script: |
cd build.debug\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.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build'
cmakeArgs: '-A x64 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
- script: |
cd build.debug\Release\Binaries\Debug
.\test_runner.exe *testd.dll
displayName: 'Run tests, debug'
- task: MSBuild@1
inputs:
solution: 'build/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
- script: |
cd build.debug\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 +146,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

0 comments on commit f72d366

Please sign in to comment.