-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
98 lines (89 loc) · 2.54 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
variables:
configuration: Release
test_cmd_multi_cfg: './Build/bin/$(configuration)/Test'
test_cmd_single_cfg: './Build/bin/Test'
stages:
- stage: ClangFormat
jobs:
- job: ClangFormat
pool:
vmImage: Ubuntu-22.04
steps:
- script: |
mkdir Build
cd Build
cmake -G "Unix Makefiles" -DNR_CLANGFORMAT=ON ../
make clang_format
cd ../
git diff --exit-code $(Build.SourceVersion)
failOnStderr: true
displayName: 'Check code formatting'
- stage: Build
condition: succeeded('ClangFormat')
jobs:
- job: Build
variables:
toolset: ''
build_setup_cmd: ''
build_type: '-DCMAKE_BUILD_TYPE:STRING=$(configuration)'
strategy:
matrix:
Windows_vc142:
vmImage: windows-2019
generator: 'Visual Studio 16 2019'
toolset: '-T v142'
CXX: cl
build_type: ''
test_cmd: $(test_cmd_multi_cfg)
Windows_vc143:
vmImage: windows-2022
generator: 'Visual Studio 17 2022'
toolset: '-T v143'
CXX: cl
build_type: ''
test_cmd: $(test_cmd_multi_cfg)
Windows_clangcl:
vmImage: windows-2019
generator: 'Visual Studio 16 2019'
toolset: '-T ClangCL'
CXX: clang-cl
build_type: ''
test_cmd: $(test_cmd_multi_cfg)
Windows_gcc:
vmImage: windows-2019
build_setup_cmd: export PATH=/c/msys64/mingw64/bin:$PATH
generator: 'MinGW Makefiles'
CXX: g++
test_cmd: $(test_cmd_single_cfg)
Linux_gcc12:
vmImage: Ubuntu-22.04
generator: 'Unix Makefiles'
CXX: g++-12
test_cmd: $(test_cmd_single_cfg)
Linux_clang15:
vmImage: Ubuntu-22.04
generator: 'Unix Makefiles'
CXX: clang++-15
test_cmd: $(test_cmd_single_cfg)
macOS_clang:
vmImage: macOS-13
generator: 'Unix Makefiles'
CXX: clang++
test_cmd: $(test_cmd_single_cfg)
pool:
vmImage: $(vmImage)
steps:
- checkout: self
fetchDepth: 5
- bash: |
eval '$(build_setup_cmd)'
mkdir Build
cd Build
cmake -G "$(generator)" $(toolset) -DCMAKE_CXX_COMPILER=$(CXX) $(build_type) ../
cmake --build . --config $(configuration)
cd ../
failOnStderr: true
displayName: 'Build'
- bash: eval '$(test_cmd)'
displayName: 'Test'
condition: ne(variables['test_cmd'], '')