2019-09-11 05:50:41 +03:00
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
- dev
|
|
|
|
|
|
|
|
pr:
|
|
|
|
- dev
|
|
|
|
|
|
|
|
variables:
|
2020-03-03 06:08:39 +03:00
|
|
|
cpp_rest_sdk_version: 2.10.15
|
2019-09-11 05:50:41 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: build_test_linux
|
|
|
|
displayName: Build and Test on Linux
|
|
|
|
timeoutInMinutes: 240
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
maxParallel: 16
|
|
|
|
matrix:
|
|
|
|
UBUNTU1404:
|
|
|
|
container_image: ubuntu14.04:cpprestsdk_$(cpp_rest_sdk_version)
|
|
|
|
build_type: Release
|
|
|
|
UBUNTU1604:
|
|
|
|
container_image: ubuntu16.04:cpprestsdk_$(cpp_rest_sdk_version)
|
|
|
|
build_type: Release
|
|
|
|
UBUNTU1804:
|
|
|
|
container_image: ubuntu18.04:cpprestsdk_$(cpp_rest_sdk_version)
|
|
|
|
build_type: Release
|
|
|
|
UBUNTU1804_DEBUG:
|
|
|
|
container_image: ubuntu18.04:cpprestsdk_$(cpp_rest_sdk_version)
|
|
|
|
build_type: Debug
|
|
|
|
UBUNTU1804_I686:
|
|
|
|
container_image: ubuntu18.04.i686:cpprestsdk_$(cpp_rest_sdk_version)
|
|
|
|
build_type: Release
|
|
|
|
build_env_init: export CXXFLAGS=-m32
|
2020-03-03 06:08:39 +03:00
|
|
|
CENTOS7_DEBUG:
|
|
|
|
container_image: centos7:cpprestsdk_$(cpp_rest_sdk_version)
|
|
|
|
build_type: Debug
|
|
|
|
build_env_init: source scl_source enable devtoolset-4
|
2019-09-11 05:50:41 +03:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: azurecppsdkpipeline.azurecr.io/$(container_image)
|
|
|
|
endpoint: azure_docker_registry_connection
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- script: |
|
|
|
|
$(build_env_init)
|
|
|
|
cmake Microsoft.WindowsAzure.Storage/CMakeLists.txt -B$(Build.BinariesDirectory) -DCMAKE_BUILD_TYPE=$(build_type) -DBUILD_SAMPLES=ON -DBUILD_TESTS=ON
|
|
|
|
cmake --build $(Build.BinariesDirectory) -- -j$(nproc)
|
|
|
|
displayName: Build
|
|
|
|
|
|
|
|
- script: echo ${MAPPED_TEST_CONFIGURATION} > $(Build.BinariesDirectory)/Binaries/test_configurations.json
|
|
|
|
displayName: Copy Test Configuration
|
|
|
|
env:
|
|
|
|
MAPPED_TEST_CONFIGURATION: $(test_configuration)
|
|
|
|
|
|
|
|
- script: ./azurestoragetest $(excluded_testcases) $(retry_policy) --warning-message='##vso[task.logissue type=warning]'
|
|
|
|
workingDirectory: $(Build.BinariesDirectory)/Binaries
|
|
|
|
displayName: Run Tests
|
|
|
|
|
|
|
|
|
|
|
|
- job: build_test_windows
|
|
|
|
displayName: Build and Test on Windows
|
|
|
|
timeoutInMinutes: 300
|
|
|
|
|
2019-12-06 06:49:50 +03:00
|
|
|
variables:
|
|
|
|
- name: project_file
|
|
|
|
value: Microsoft.WindowsAzure.Storage\tests\Microsoft.WindowsAzure.Storage.UnitTests.v141.vcxproj
|
|
|
|
|
2019-09-11 05:50:41 +03:00
|
|
|
strategy:
|
|
|
|
maxParallel: 16
|
|
|
|
matrix:
|
2019-12-06 06:49:50 +03:00
|
|
|
VS2017:
|
|
|
|
vm_image: vs2017-win2016
|
2019-09-11 05:50:41 +03:00
|
|
|
platform: x64
|
|
|
|
configuration: Release
|
2019-12-06 06:49:50 +03:00
|
|
|
toolset: v141
|
|
|
|
VS2017_DEBUG:
|
|
|
|
vm_image: vs2017-win2016
|
2019-09-11 05:50:41 +03:00
|
|
|
platform: x64
|
|
|
|
configuration: Debug
|
2019-12-06 06:49:50 +03:00
|
|
|
toolset: v141
|
|
|
|
VS2017_WIN32:
|
|
|
|
vm_image: vs2017-win2016
|
2019-09-11 05:50:41 +03:00
|
|
|
platform: Win32
|
|
|
|
configuration: Release
|
2019-12-06 06:49:50 +03:00
|
|
|
toolset: v141
|
|
|
|
VS2019:
|
|
|
|
vm_image: windows-2019
|
|
|
|
platform: x64
|
|
|
|
configuration: Release
|
|
|
|
toolset: v142
|
2019-09-11 05:50:41 +03:00
|
|
|
|
|
|
|
pool:
|
2019-12-06 06:49:50 +03:00
|
|
|
vmImage: $(vm_image)
|
2019-09-11 05:50:41 +03:00
|
|
|
|
|
|
|
steps:
|
2019-12-06 06:49:50 +03:00
|
|
|
- powershell: |
|
|
|
|
Invoke-WebRequest -Uri https://codeload.github.com/microsoft/vcpkg/zip/master -OutFile vcpkg-master.zip
|
|
|
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
|
|
|
[System.IO.Compression.ZipFile]::ExtractToDirectory("vcpkg-master.zip", "C:\")
|
|
|
|
cd C:\vcpkg-master
|
|
|
|
.\bootstrap-vcpkg.bat
|
|
|
|
.\vcpkg install cpprestsdk[core]:x86-windows cpprestsdk[core]:x64-windows unittest-cpp:x86-windows unittest-cpp:x64-windows
|
|
|
|
.\vcpkg integrate install
|
|
|
|
displayName: Install Dependencies
|
|
|
|
|
2019-09-11 05:50:41 +03:00
|
|
|
- task: MSBUILD@1
|
|
|
|
displayName: Build
|
|
|
|
inputs:
|
|
|
|
solution: $(project_file)
|
2019-12-06 06:49:50 +03:00
|
|
|
msbuildArguments: /p:OutDir=$(Build.BinariesDirectory)\ /p:PlatformToolset=$(toolset)
|
2019-09-11 05:50:41 +03:00
|
|
|
platform: $(platform)
|
|
|
|
configuration: $(configuration)
|
|
|
|
|
|
|
|
- script: echo %MAPPED_TEST_CONFIGURATION% > $(Build.BinariesDirectory)\test_configurations.json
|
|
|
|
displayName: Copy Test Configuration
|
|
|
|
env:
|
|
|
|
MAPPED_TEST_CONFIGURATION: $(test_configuration)
|
|
|
|
|
|
|
|
- script: wastoretest.exe $(excluded_testcases) $(retry_policy) --warning-message="##vso[task.logissue type=warning]"
|
|
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
|
|
displayName: Run Tests
|