-
Notifications
You must be signed in to change notification settings - Fork 3
/
.azure.yml
178 lines (146 loc) · 3.96 KB
/
.azure.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
trigger:
branches:
include:
- main
tags:
include:
- '*'
stages:
- stage: Lint
jobs:
- job: 'Lint'
pool:
vmImage: ubuntu-20.04
steps:
- template: build/ci/setup.yml
parameters:
with_catch2: false
- script: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install -y clang-format-14
displayName: 'Dependencies'
- script: |
make style formatter=clang-format-14 check=1
displayName: 'Style'
- stage: Linux
dependsOn:
- Lint
jobs:
- template: build/ci/linux.yml
parameters:
toolchain: 'clang'
mode: 'debug'
arch: 'x86'
sanitize: 'address' # UndefinedBehaviorSanitizer fails to link on x86 clang.
- template: build/ci/linux.yml
parameters:
toolchain: 'clang'
mode: 'debug'
arch: 'x64'
coverage: '1'
sanitize: 'address,undefined'
- template: build/ci/linux.yml
parameters:
toolchain: 'clang'
mode: 'release'
arch: 'x86'
- template: build/ci/linux.yml
parameters:
toolchain: 'clang'
mode: 'release'
arch: 'x64'
- template: build/ci/linux.yml
parameters:
toolchain: 'gcc'
mode: 'debug'
arch: 'x86'
sanitize: 'address,undefined'
- template: build/ci/linux.yml
parameters:
toolchain: 'gcc'
mode: 'debug'
arch: 'x64'
sanitize: 'address,undefined'
- template: build/ci/linux.yml
parameters:
toolchain: 'gcc'
mode: 'release'
arch: 'x86'
- template: build/ci/linux.yml
parameters:
toolchain: 'gcc'
mode: 'release'
arch: 'x64'
- stage: macOS
dependsOn:
- Lint
jobs:
- template: build/ci/macos.yml
parameters:
mode: 'debug'
sanitize: 'address,undefined'
- template: build/ci/macos.yml
parameters:
mode: 'release'
- stage: Windows
dependsOn:
- Lint
jobs:
- template: build/ci/windows.yml
parameters:
mode: 'Debug'
arch: 'x86'
- template: build/ci/windows.yml
parameters:
mode: 'Debug'
arch: 'x64'
- template: build/ci/windows.yml
parameters:
mode: 'Release'
arch: 'x86'
- template: build/ci/windows.yml
parameters:
mode: 'Release'
arch: 'x64'
- stage: Complete
dependsOn:
- Linux
- macOS
- Windows
pool:
vmImage: ubuntu-20.04
jobs:
- job: 'Coverage'
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: current
downloadType: all
artifactName: coverage
downloadPath: $(System.ArtifactsDirectory)
displayName: Download
- script: |
bash <(curl -s https://codecov.io/bash) -f $(System.ArtifactsDirectory)/coverage/coverage
displayName: Upload
- job: 'Publish'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: current
downloadType: all
artifactName: libfly
downloadPath: $(System.ArtifactsDirectory)
displayName: Download
- task: GitHubRelease@0
inputs:
action: edit
tag: $(Build.SourceBranchName)
tagSource: 'Git tag'
gitHubConnection: trflynn89
repositoryName: trflynn89/libfly
assets: $(System.ArtifactsDirectory)/libfly/*
assetUploadMode: delete
displayName: Publish