-
Notifications
You must be signed in to change notification settings - Fork 148
/
azure-pipelines.yml
125 lines (107 loc) · 3.82 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
trigger:
- master
- dev
pr:
- dev
variables:
cpp_rest_sdk_version: 2.10.16
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
CENTOS7_DEBUG:
container_image: centos7:cpprestsdk_$(cpp_rest_sdk_version)
build_type: Debug
build_env_init: source scl_source enable devtoolset-4
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
variables:
- name: project_file
value: Microsoft.WindowsAzure.Storage\tests\Microsoft.WindowsAzure.Storage.UnitTests.v141.vcxproj
strategy:
maxParallel: 16
matrix:
VS2017:
vm_image: vs2017-win2016
platform: x64
configuration: Release
toolset: v141
VS2017_DEBUG:
vm_image: vs2017-win2016
platform: x64
configuration: Debug
toolset: v141
VS2017_WIN32:
vm_image: vs2017-win2016
platform: Win32
configuration: Release
toolset: v141
VS2019:
vm_image: windows-2019
platform: x64
configuration: Release
toolset: v142
pool:
vmImage: $(vm_image)
steps:
- 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
- task: MSBUILD@1
displayName: Build
inputs:
solution: $(project_file)
msbuildArguments: /p:OutDir=$(Build.BinariesDirectory)\ /p:PlatformToolset=$(toolset)
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