-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
163 lines (154 loc) · 7.07 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt)
#
# Copyright René Ferdinand Rivera Morell 2020-2021.
# Configuration for https://azure.microsoft.com/en-us/services/devops/pipelines/.
trigger:
# We limit when to run the builds to specific branches.
branches:
include:
- master
# And also limit to avoid building when CI files from other services change.
paths:
exclude:
- .circleci/*
- .cirrus.yml
- .drone.star
- .github/workflows/*
- .semaphore/*
- .travis.yml
- appveyor.yml
# There are many arrangements possible with Azure Pipelines stages. But our
# experimental needs are rather simple. Hence we only have a single stage
# to do our test builds in.
stages:
- stage: Test
jobs:
# We group the jobs based on platform as the scripts are usually specific
# to the platform and not the compiler.
- job: 'Linux'
strategy:
matrix:
GCC 10: { CXX: g++-10, PACKAGES: g++-10, VM_IMAGE: 'ubuntu-18.04' }
GCC 9: { CXX: g++-9, PACKAGES: g++-9, VM_IMAGE: 'ubuntu-18.04' }
GCC 8: { CXX: g++-8, PACKAGES: g++-8, VM_IMAGE: 'ubuntu-18.04' }
GCC 7: { CXX: g++-7, PACKAGES: g++-7, VM_IMAGE: 'ubuntu-18.04' }
GCC 6: { CXX: g++-6, PACKAGES: g++-6, VM_IMAGE: 'ubuntu-18.04' }
GCC 5: { CXX: g++-5, PACKAGES: g++-5, VM_IMAGE: 'ubuntu-18.04' }
GCC 4.9: { CXX: g++-4.9, PACKAGES: g++-4.9, VM_IMAGE: 'ubuntu-16.04' }
GCC 4.8: { CXX: g++-4.8, PACKAGES: g++-4.8, VM_IMAGE: 'ubuntu-16.04' }
GCC 4.7: { CXX: g++-4.7, PACKAGES: g++-4.7, VM_IMAGE: 'ubuntu-16.04' }
Clang 11: { CXX: clang++-11, PACKAGES: clang-11, LLVM_OS: bionic, LLVM_VER: 11, VM_IMAGE: 'ubuntu-18.04' }
Clang 10: { CXX: clang++-10, PACKAGES: clang-10, LLVM_OS: bionic, LLVM_VER: 10, VM_IMAGE: 'ubuntu-18.04' }
Clang 9: { CXX: clang++-9, PACKAGES: clang-9, LLVM_OS: bionic, LLVM_VER: 9, VM_IMAGE: 'ubuntu-18.04' }
Clang 8: { CXX: clang++-8, PACKAGES: clang-8, LLVM_OS: bionic, LLVM_VER: 8, VM_IMAGE: 'ubuntu-18.04' }
Clang 7: { CXX: clang++-7, PACKAGES: clang-7, LLVM_OS: bionic, LLVM_VER: 7, VM_IMAGE: 'ubuntu-18.04' }
Clang 6.0: { CXX: clang++-6.0, PACKAGES: clang-6.0, LLVM_OS: bionic, LLVM_VER: 6.0, VM_IMAGE: 'ubuntu-18.04' }
Clang 5.0: { CXX: clang++-5.0, PACKAGES: clang-5.0, LLVM_OS: bionic, LLVM_VER: 5.0, VM_IMAGE: 'ubuntu-18.04' }
Clang 4.0: { CXX: clang++-4.0, PACKAGES: clang-4.0, LLVM_OS: xenial, LLVM_VER: 4.0, VM_IMAGE: 'ubuntu-18.04' }
Clang 3.9: { CXX: clang++-3.9, PACKAGES: clang-3.9, LLVM_OS: xenial, LLVM_VER: 3.9, VM_IMAGE: 'ubuntu-18.04' }
Clang 3.8: { CXX: clang++-3.8, PACKAGES: clang-3.8, LLVM_OS: xenial, LLVM_VER: 3.8, VM_IMAGE: 'ubuntu-16.04' }
Clang 3.7: { CXX: clang++-3.7, PACKAGES: clang-3.7, LLVM_OS: xenial, VM_IMAGE: 'ubuntu-16.04' }
Clang 3.6: { CXX: clang++-3.6, PACKAGES: clang-3.6, LLVM_OS: xenial, VM_IMAGE: 'ubuntu-16.04' }
Clang 3.5: { CXX: clang++-3.5, PACKAGES: clang-3.5, LLVM_OS: xenial, VM_IMAGE: 'ubuntu-16.04' }
pool:
vmImage: $(VM_IMAGE)
steps:
# Two simple steps.. The install runs a helper script to do the install
# and any setup.
- bash: |
set -e
uname -a
./.ci_playground/linux-cxx-install.sh
displayName: Install Toolset
# And the compiler step just calls the compiler as specified in the
# matrix.
- bash: |
set -e
${CXX} --version
${CXX} ${CXXFLAGS} -v src/main.cpp
displayName: Compile
- job: 'macOS'
strategy:
matrix:
Xcode 12.3: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 12.3 }
Xcode 12.2: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 12.2 }
Xcode 12.1.1: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 12.1.1 }
Xcode 12.0.1: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 12.0.1 }
Xcode 11.7: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.7 }
Xcode 11.6: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.6 }
Xcode 11.5: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.5 }
Xcode 11.4.1: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.4.1 }
Xcode 11.3.1: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.3.1 }
Xcode 11.2.1: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.2.1 }
Xcode 11.1: { CXX: clang++, VM_IMAGE: 'macOS-10.15', XCODE_VERSION: 11.1 }
Xcode 10.3: { CXX: clang++, VM_IMAGE: 'macOS-10.14', XCODE_VERSION: 10.3 }
Xcode 10.2.1: { CXX: clang++, VM_IMAGE: 'macOS-10.14', XCODE_VERSION: 10.2.1 }
Xcode 10.1: { CXX: clang++, VM_IMAGE: 'macOS-10.14', XCODE_VERSION: 10.1 }
Xcode 10.0: { CXX: clang++, VM_IMAGE: 'macOS-10.14', XCODE_VERSION: 10.0 }
pool:
vmImage: $(VM_IMAGE)
steps:
- bash: |
set -e
uname -a
./.ci_playground/macos-xcode-install.sh
displayName: Install Toolset
# For consistent Xcode building we specify the sysroot to point to the
# symlink that xcode-install utility created. This was we always build
# with the specific SDK for the compiler being used.
- bash: |
set -e
${CXX} --version
${CXX} ${CXXFLAGS} -v --sysroot "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" src/main.cpp
displayName: Compile
- job: 'Windows'
strategy:
matrix:
VS 2019:
VSWHERE_VERSION: '[16.0,17.0)'
CXX: cl.exe
CXXFLAGS: /Femain
PLATFORM: x64
VM_IMAGE: 'windows-2019'
VS 2017:
VSWHERE_VERSION: '[15.0,16.0)'
CXX: cl.exe
CXXFLAGS: /Femain
PLATFORM: x64
VM_IMAGE: 'vs2017-win2016'
# Installing VS in general takes forever. But this is here as an
# example of what to specify for using choco to install VS.
# VS 2015:
# VSWHERE_LEGACY: '[14.0,15.0)'
# CXX: cl.exe
# CXXFLAGS: /Femain
# PLATFORM: x64
# CHOCO_VS_PACKAGE: VisualStudio2015Community
# VM_IMAGE: 'windows-latest'
pool:
vmImage: $(VM_IMAGE)
steps:
# For Visual Studio it's usually already install in CI. Which means that
# we usually don't need to install it. But in case we do we can use
# choco to do this.
- script: |
echo ">>>>>"
echo ">>>>> INSTALL TOOLSET .."
echo ">>>>>"
if not "%CHOCO_VS_PACKAGE%"=="" choco install %CHOCO_VS_PACKAGE% -packageParameters "--AdminFile .ci_playground/%CHOCO_VS_PACKAGE%.xml"
choco install vswhere
displayName: Install
# To compile we need to set up the CLI environment using the vcvarsall.bat
# script provided by Visual Studio.
- script: |
echo ">>>>>"
echo ">>>>> COMPILE, Setup .."
echo ">>>>>"
.ci_playground/windows-msvc-setup.cmd
echo ">>>>>"
echo ">>>>> COMPILE .."
echo ">>>>>"
"%CXX%" %CXXFLAGS% src/main.cpp
displayName: Compile