1# Use, modification, and distribution are
2# subject to the Boost Software License, Version 1.0. (See accompanying
3# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4#
5# Copyright Rene Rivera 2019-2020.
6
7trigger:
8  branches:
9    include:
10    - develop
11    - master
12    - feature/*
13pr:
14  branches:
15    include:
16    - develop
17
18variables:
19  AZP: 1
20  AZP_REPO_DIR: $(Build.Repository.LocalPath)
21  AZP_BRANCH: $(Build.SourceBranch)
22  AZP_BRANCH_NAME: $(Build.SourceBranchName)
23  AZP_COMMIT: $(Build.SourceVersion)
24  AZP_REPO: $(Build.Repository.Name)
25  AZP_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
26
27stages:
28
29- stage: Test
30  jobs:
31
32  - job: 'Linux'
33    strategy:
34      matrix:
35        GCC 10 (GNU): { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,2a cxxstd-dialect=gnu' }
36        GCC 10 (ISO): { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc, B2_ARGS: 'cxxstd=03,11,14,17,2a cxxstd-dialect=iso' }
37        GCC 10: { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc }
38        GCC 9: { CXX: g++-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc }
39        GCC 8: { CXX: g++-8, PACKAGES: g++-8, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc }
40        GCC 7: { CXX: g++-7, PACKAGES: g++-7, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc }
41        GCC 6: { CXX: g++-6, PACKAGES: g++-6, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc }
42        GCC 5: { CXX: g++-5, PACKAGES: g++-5, VM_IMAGE: 'ubuntu-18.04', TOOLSET: gcc }
43        GCC 4.9: { CXX: g++-4.9, PACKAGES: g++-4.9, VM_IMAGE: 'ubuntu-16.04', TOOLSET: gcc }
44        GCC 4.8: { CXX: g++-4.8, PACKAGES: g++-4.8, VM_IMAGE: 'ubuntu-16.04', TOOLSET: gcc }
45        GCC 4.7: { CXX: g++-4.7, PACKAGES: g++-4.7, VM_IMAGE: 'ubuntu-16.04', TOOLSET: gcc }
46        Clang 11: { CXX: clang++-11, PACKAGES: clang-11, LLVM_OS: bionic, LLVM_VER: 11, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
47        Clang 10: { CXX: clang++-10, PACKAGES: clang-10, LLVM_OS: bionic, LLVM_VER: 10, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
48        Clang 9: { CXX: clang++-9, PACKAGES: clang-9, LLVM_OS: bionic, LLVM_VER: 9, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
49        Clang 8: { CXX: clang++-8, PACKAGES: clang-8, LLVM_OS: bionic, LLVM_VER: 8, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
50        Clang 7: { CXX: clang++-7, PACKAGES: clang-7, LLVM_OS: bionic, LLVM_VER: 7, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
51        Clang 6.0: { CXX: clang++-6.0, PACKAGES: clang-6.0, LLVM_OS: bionic, LLVM_VER: 6.0, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
52        Clang 5.0: { CXX: clang++-5.0, PACKAGES: clang-5.0, LLVM_OS: bionic, LLVM_VER: 5.0, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
53        Clang 4.0: { CXX: clang++-4.0, PACKAGES: clang-4.0, LLVM_OS: xenial, LLVM_VER: 4.0, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
54        Clang 3.9: { CXX: clang++-3.9, PACKAGES: clang-3.9, LLVM_OS: xenial, LLVM_VER: 3.9, VM_IMAGE: 'ubuntu-18.04', TOOLSET: clang }
55        Clang 3.8: { CXX: clang++-3.8, PACKAGES: clang-3.8, LLVM_OS: xenial, LLVM_VER: 3.8, VM_IMAGE: 'ubuntu-16.04', TOOLSET: clang }
56        Clang 3.7: { CXX: clang++-3.7, PACKAGES: clang-3.7, LLVM_OS: xenial, VM_IMAGE: 'ubuntu-16.04', TOOLSET: clang }
57        Clang 3.6: { CXX: clang++-3.6, PACKAGES: clang-3.6, LLVM_OS: xenial, VM_IMAGE: 'ubuntu-16.04', TOOLSET: clang }
58        Clang 3.5: { CXX: clang++-3.5, PACKAGES: clang-3.5, LLVM_OS: xenial, VM_IMAGE: 'ubuntu-16.04', TOOLSET: clang }
59    pool:
60      vmImage: $(VM_IMAGE)
61    steps:
62    - bash: |
63        set -e
64        uname -a
65        ./tools/ci/linux-cxx-install.sh
66      displayName: 'Install CXX'
67    - bash: |
68        set -e
69        pushd ${HOME}
70        wget -nv https://github.com/boostorg/build/archive/develop.tar.gz
71        tar -zxf develop.tar.gz
72        cd build-develop
73        CXX= ./bootstrap.sh
74        sudo ./b2 install
75        popd
76      displayName: 'Install B2'
77    - bash: |
78        set -e
79        CXX_PATH=`which ${CXX}`
80        echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
81        pushd test
82        b2 --verbose-test -a toolset=${TOOLSET} ${B2_ARGS} predef-info
83        b2 --debug-configuration -a toolset=${TOOLSET} ${B2_ARGS} predef predef-headers
84        popd
85      displayName: Test
86
87  - job: 'macOS'
88    strategy:
89      matrix:
90        Xcode 11.4.1:
91          TOOLSET: clang
92          CXX: clang++
93          XCODE_APP: /Applications/Xcode_11.4.1.app
94          VM_IMAGE: 'macOS-10.15'
95        Xcode 11.3.1:
96          TOOLSET: clang
97          CXX: clang++
98          XCODE_APP: /Applications/Xcode_11.3.1.app
99          VM_IMAGE: 'macOS-10.15'
100        Xcode 11.2.1:
101          TOOLSET: clang
102          CXX: clang++
103          XCODE_APP: /Applications/Xcode_11.2.1.app
104          VM_IMAGE: 'macOS-10.15'
105        Xcode 10.3:
106          TOOLSET: clang
107          CXX: clang++
108          XCODE_APP: /Applications/Xcode_10.3.app
109          VM_IMAGE: 'macOS-10.14'
110        Xcode 10.2.1:
111          TOOLSET: clang
112          CXX: clang++
113          XCODE_APP: /Applications/Xcode_10.2.1.app
114          VM_IMAGE: 'macOS-10.14'
115        Xcode 10.1:
116          TOOLSET: clang
117          CXX: clang++
118          XCODE_APP: /Applications/Xcode_10.1.app
119          VM_IMAGE: 'macOS-10.14'
120        Xcode 10.0:
121          TOOLSET: clang
122          CXX: clang++
123          XCODE_APP: /Applications/Xcode_10.app
124          VM_IMAGE: 'macOS-10.14'
125    pool:
126      vmImage: $(VM_IMAGE)
127    steps:
128    - bash: |
129        set -e
130        uname -a
131        sudo xcode-select -switch ${XCODE_APP}
132        which clang++
133        clang++ --version
134      displayName: 'Install CXX'
135    - bash: |
136        set -e
137        pushd ${HOME}
138        wget -nv https://github.com/boostorg/build/archive/develop.tar.gz
139        tar -zxf develop.tar.gz
140        cd build-develop
141        CXX= ./bootstrap.sh
142        sudo ./b2 install
143        popd
144      displayName: 'Install B2'
145    - bash: |
146        set -e
147        CXX_PATH=`which ${CXX}`
148        echo "using ${TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
149        pushd test
150        b2 --verbose-test -a toolset=${TOOLSET} ${B2_ARGS} predef-info
151        b2 --debug-configuration -a toolset=${TOOLSET} ${B2_ARGS} predef predef-headers
152        popd
153      displayName: Test
154
155  - job: 'Windows'
156    strategy:
157      matrix:
158        VS 2019:
159          TOOLSET: msvc
160          TOOLSET_VERSION: 14.2
161          B2_ARGS: address-model=32,64 cxxstd=14,latest
162          VM_IMAGE: 'windows-2019'
163        VS 2019 (UWP DESKTOP):
164          TOOLSET: msvc
165          TOOLSET_VERSION: 14.2
166          B2_ARGS: address-model=64 define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
167          VM_IMAGE: 'windows-2019'
168        VS 2019 (UWP PHONE):
169          TOOLSET: msvc
170          TOOLSET_VERSION: 14.2
171          B2_ARGS: address-model=64 define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
172          VM_IMAGE: 'windows-2019'
173        VS 2019 (UWP STORE):
174          TOOLSET: msvc
175          TOOLSET_VERSION: 14.2
176          B2_ARGS: address-model=64 define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_PC_APP
177          VM_IMAGE: 'windows-2019'
178        VS 2019 (UWP SERVER):
179          TOOLSET: msvc
180          TOOLSET_VERSION: 14.2
181          B2_ARGS: address-model=64 define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_SERVER
182          VM_IMAGE: 'windows-2019'
183        VS 2019 (UWP SYSTEM):
184          TOOLSET: msvc
185          TOOLSET_VERSION: 14.2
186          B2_ARGS: address-model=64 define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM
187          VM_IMAGE: 'windows-2019'
188        VS 2017:
189          TOOLSET: msvc
190          TOOLSET_VERSION: 14.1
191          VM_IMAGE: 'vs2017-win2016'
192        MinGW 8.1.0:
193          TOOLSET: gcc
194          VM_IMAGE: 'windows-2019'
195        MinGW 8.1.0 (UWP DESKTOP):
196          TOOLSET: gcc
197          B2_ARGS: define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
198          VM_IMAGE: 'windows-2019'
199        MinGW 8.1.0 (UWP STORE):
200          TOOLSET: gcc
201          B2_ARGS: define=_WIN32_WINNT=0x0A00 define=WINAPI_FAMILY=WINAPI_FAMILY_PC_APP
202          VM_IMAGE: 'windows-2019'
203    pool:
204      vmImage: $(VM_IMAGE)
205    steps:
206    - script: |
207        cd %BUILD_SOURCESDIRECTORY%/..
208        curl "https://github.com/boostorg/build/archive/develop.zip" -L -o b2.zip
209      displayName: Download B2
210    - task: ExtractFiles@1
211      inputs:
212        archiveFilePatterns: $(Build.SourcesDirectory)/../b2.zip
213        destinationFolder: $(Build.SourcesDirectory)/..
214        cleanDestinationFolder: false
215      displayName: Extract B2
216    - script: |
217        echo using %TOOLSET% ^: %TOOLSET_VERSION% ^; > %HOMEDRIVE%%HOMEPATH%/user-config.jam
218        cd %BUILD_SOURCESDIRECTORY%/../build-develop
219        cmd.exe /c bootstrap.bat
220      displayName: Install B2
221    - script: |
222        set BOOST_BUILD_PATH=%BUILD_SOURCESDIRECTORY%/../build-develop
223        cd %BUILD_SOURCESDIRECTORY%/test
224        %BUILD_SOURCESDIRECTORY%/../build-develop/b2.exe --verbose-test -a toolset=%TOOLSET% %B2_ARGS% predef-info
225        %BUILD_SOURCESDIRECTORY%/../build-develop/b2.exe --debug-configuration -a toolset=%TOOLSET% %B2_ARGS% predef predef-headers
226      displayName: Test
227