forked from CLIUtils/CLI11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
143 lines (135 loc) · 4.02 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
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
trigger:
- main
- "v*"
pr:
- main
- "v*"
variables:
cli11.single: ON
cli11.std: 14
cli11.build_type: Debug
cli11.options: -DCLI11_EXAMPLES_JSON=ON
CMAKE_BUILD_PARALLEL_LEVEL: 4
jobs:
- job: ClangTidy
variables:
CXX_FLAGS: >
-Werror -Wcast-align -Wfloat-equal -Wimplicit-atomic-properties
-Wmissing-declarations -Woverlength-strings -Wshadow
-Wstrict-selector-match -Wundeclared-selector -Wunreachable-code
-std=c++11
cli11.options: -DCLI11_CLANG_TIDY=ON -DCLI11_CLANG_TIDY_OPTIONS="-fix"
cli11.std: 11
cli11.single: OFF
CMAKE_BUILD_PARALLEL_LEVEL: 1
pool:
vmImage: "ubuntu-latest"
container: silkeh/clang:8
steps:
- template: .ci/azure-cmake.yml
- template: .ci/azure-build.yml
- script: git diff --exit-code --color
displayName: Check tidy
- job: CppLint
pool:
vmImage: "ubuntu-latest"
container: sharaku/cpplint:latest
steps:
- bash: cpplint --counting=detailed --recursive examples include/CLI tests
displayName: Checking against google style guide
# TODO: Fix macOS error and windows warning in c++17 mode
- job: Native
strategy:
matrix:
Linux14:
vmImage: "ubuntu-latest"
macOS17:
vmImage: "macOS-latest"
cli11.std: 17
macOS11:
vmImage: "macOS-latest"
cli11.std: 11
Windows17:
vmImage: "vs2017-win2016"
cli11.std: 17
Windows11:
vmImage: "vs2017-win2016"
cli11.std: 11
Windowslatest:
vmImage: "windows-2019"
cli11.std: 20
cli11.options: -DCMAKE_CXX_FLAGS="/std:c++latest /EHsc"
Linux17nortti:
vmImage: "ubuntu-latest"
cli11.std: 17
cli11.options: -DCMAKE_CXX_FLAGS="-fno-rtti"
pool:
vmImage: $(vmImage)
steps:
- template: .ci/azure-build.yml
- template: .ci/azure-test.yml
- job: Meson
pool:
vmImage: "ubuntu-latest"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.7"
- script: python3 -m pip install meson ninja
displayName: install meson
- script: mkdir tests/mesonTest/subprojects
displayName: generate test directories
- script: ln -s "$(pwd)" tests/mesonTest/subprojects/CLI11
displayName: generate CLI11 symlink
- script: meson build
displayName: Run meson to generate build
workingDirectory: tests/mesonTest
- script: ninja -C tests/mesonTest/build
displayName: Build with Ninja
- script: ./tests/mesonTest/build/main --help
displayName: Run help
- job: Docker
variables:
cli11.single: OFF
pool:
vmImage: "ubuntu-latest"
strategy:
matrix:
gcc9:
containerImage: gcc:9
cli11.std: 17
cli11.options: -DCMAKE_CXX_FLAGS="-Wstrict-overflow=5"
gcc11:
containerImage: gcc:11
cli11.std: 20
gcc8:
containerImage: gcc:8
cli11.std: 17
gcc4.8:
containerImage: gcc:4.8
cli11.std: 11
cli11.options:
clang3.4:
containerImage: silkeh/clang:3.4
cli11.std: 11
clang8:
containerImage: silkeh/clang:8
cli11.std: 14
cli11.options: -DCLI11_FORCE_LIBCXX=ON
clang8_17:
containerImage: silkeh/clang:8
cli11.std: 17
cli11.options: -DCLI11_FORCE_LIBCXX=ON
clang10_20:
containerImage: silkeh/clang:10
cli11.std: 20
cli11.options: -DCLI11_FORCE_LIBCXX=ON -DCMAKE_CXX_FLAGS=-std=c++20
container: $[ variables['containerImage'] ]
steps:
- template: .ci/azure-cmake.yml
- template: .ci/azure-build.yml
- template: .ci/azure-test.yml