-
Notifications
You must be signed in to change notification settings - Fork 5
281 lines (265 loc) · 11.1 KB
/
Copy pathci.yml
File metadata and controls
281 lines (265 loc) · 11.1 KB
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
DEFAULT_DOXYGEN_VERSION: "1.17.0"
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bazel: [7.0.0, 8.0.0, rolling]
subdir:
[
base,
kwargs,
doxyfile,
doxylink,
latex,
nested,
custom,
awesome,
substitutions,
dependencies,
executable,
]
exclude:
# In substitution example we use `string_keyed_label_dict`, which is not supported in bazel 7.0.0
- bazel: 7.0.0
subdir: substitutions
# Incompatible versions of rules_python and bazel 7.0.0
- bazel: 7.0.0
subdir: dependencies
- bazel: 7.0.0
subdir: executable
- bazel: 7.0.0
subdir: doxylink
- bazel: 7.0.0
subdir: executable
- bazel: 7.0.0
subdir: plantuml
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Create .bazelversion file
working-directory: examples
run: echo "${{ matrix.bazel }}" > .bazelversion
shell: bash
- name: Build ${{ matrix.subdir }}
run: bazel build //${{ matrix.subdir }}:doxygen --action_env=DEFAULT_DOXYGEN_VERSION=$DEFAULT_DOXYGEN_VERSION
working-directory: examples
if: matrix.os != 'windows-latest'
- name: Build ${{ matrix.subdir }} (windows)
run: bazel build //${{ matrix.subdir }}:doxygen --action_env=DEFAULT_DOXYGEN_VERSION=$env:DEFAULT_DOXYGEN_VERSION
working-directory: examples
if: matrix.os == 'windows-latest'
- name: Check output
uses: andstor/file-existence-action@v3
with:
files: "examples/bazel-bin/${{ matrix.subdir }}/html/index.html"
fail: true
- name: Check doxygen version in produced index.html
run: grep "Doxygen $DEFAULT_DOXYGEN_VERSION" examples/bazel-bin/${{ matrix.subdir }}/html/index.html
shell: bash
tests-system-installation:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
subdir: [base]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install doxygen
uses: ssciwr/doxygen-install@v2
with:
version: "1.9.7"
- name: Enable use of system doxygen by decommenting the module extension line
uses: richardrigutins/replace-in-files@v2
with:
search-text: '# doxygen_extension.configuration(version = "0.0.0")'
replacement-text: doxygen_extension.configuration(version = "0.0.0")
files: examples/MODULE.bazel
- name: Build ${{ matrix.subdir }}
run: bazel build //${{ matrix.subdir }}:doxygen
working-directory: examples
- name: Check output
uses: andstor/file-existence-action@v3
with:
files: "examples/bazel-bin/${{ matrix.subdir }}/html/index.html"
fail: true
- name: Check doxygen version in produced index.html
run: grep 'Doxygen 1.9.7' examples/bazel-bin/${{ matrix.subdir }}/html/index.html
shell: bash
tests-multiple-installations:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bazel: [7.0.0, 8.0.0, rolling]
subdir: [base]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Create .bazelversion file
working-directory: examples
run: echo "${{ matrix.bazel }}" > .bazelversion
shell: bash
- name: Install doxygen
uses: ssciwr/doxygen-install@v2
- name: Enable use of windows doxygen by decommenting the module extension line
uses: richardrigutins/replace-in-files@v2
with:
search-text: '# doxygen_extension.configuration(version = "1.11.0", sha256 = "478fc9897d00ca181835d248a4d3e5c83c26a32d1c7571f4321ddb0f2e97459f", platform = "windows")'
replacement-text: doxygen_extension.configuration(version = "1.11.0", sha256 = "478fc9897d00ca181835d248a4d3e5c83c26a32d1c7571f4321ddb0f2e97459f", platform = "windows")
files: examples/MODULE.bazel
- name: Enable use of mac doxygen by decommenting the module extension line
uses: richardrigutins/replace-in-files@v2
with:
search-text: '# doxygen_extension.configuration(version = "1.12.0", sha256 = "6ace7dde967d41f4e293d034a67eb2c7edd61318491ee3131112173a77344001", platform = "mac")'
replacement-text: doxygen_extension.configuration(version = "1.12.0", sha256 = "6ace7dde967d41f4e293d034a67eb2c7edd61318491ee3131112173a77344001", platform = "mac-arm")
files: examples/MODULE.bazel
- name: Enable use linux doxygen by decommenting the module extension line
uses: richardrigutins/replace-in-files@v2
with:
search-text: '# doxygen_extension.configuration(version = "1.10.0", sha256 = "dcfc9aa4cc05aef1f0407817612ad9e9201d9bf2ce67cecf95a024bba7d39747", platform = "linux")'
replacement-text: doxygen_extension.configuration(version = "1.10.0", sha256 = "dcfc9aa4cc05aef1f0407817612ad9e9201d9bf2ce67cecf95a024bba7d39747", platform = "linux")
files: examples/MODULE.bazel
- name: Build ${{ matrix.subdir }}
run: bazel build //${{ matrix.subdir }}:doxygen
working-directory: examples
- name: Check output
uses: andstor/file-existence-action@v3
with:
files: "examples/bazel-bin/${{ matrix.subdir }}/html/index.html"
fail: true
- name: Check doxygen version in produced index.html (windows)
if: matrix.os == 'windows-latest'
run: grep 'Doxygen 1.11.0' examples/bazel-bin/${{ matrix.subdir }}/html/index.html
shell: bash
- name: Check doxygen version in produced index.html (mac)
if: matrix.os == 'macos-latest'
run: grep 'Doxygen 1.12.0' examples/bazel-bin/${{ matrix.subdir }}/html/index.html
shell: bash
- name: Check doxygen version in produced index.html (linux)
if: matrix.os == 'ubuntu-latest'
run: grep 'Doxygen 1.10.0' examples/bazel-bin/${{ matrix.subdir }}/html/index.html
shell: bash
tests-local-executable:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bazel: [7.0.0, 8.0.0, rolling]
subdir: [base]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Create .bazelversion file
working-directory: examples
run: echo "${{ matrix.bazel }}" > .bazelversion
shell: bash
- name: Install doxygen
uses: ssciwr/doxygen-install@v2
with:
version: "1.10.0"
- name: Copy binary to examples folder (windows)
if: matrix.os == 'windows-latest'
run: cp $(Get-Command doxygen).Source examples/doxygen.exe
- name: Copy binary to examples folder (mac, linux)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: cp $(which doxygen) examples/doxygen
- name: Enable use of local doxygen by decommenting the module extension line (windows)
uses: richardrigutins/replace-in-files@v2
if: matrix.os == 'windows-latest'
with:
search-text: '# doxygen_extension.configuration(executable = "@//:doxygen")'
replacement-text: doxygen_extension.configuration(executable = "@//:doxygen.exe")
files: examples/MODULE.bazel
- name: Export doxygen binary (windows)
uses: richardrigutins/replace-in-files@v2
if: matrix.os == 'windows-latest'
with:
search-text: '# exports_files(["doxygen"])'
replacement-text: exports_files(["doxygen.exe"])
files: examples/BUILD.bazel
- name: Enable use of local doxygen by decommenting the module extension line (mac, linux)
uses: richardrigutins/replace-in-files@v2
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
with:
search-text: '# doxygen_extension.configuration(executable = "@//:doxygen")'
replacement-text: doxygen_extension.configuration(executable = "@//:doxygen")
files: examples/MODULE.bazel
- name: Export doxygen binary (mac, linux)
uses: richardrigutins/replace-in-files@v2
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
with:
search-text: '# exports_files(["doxygen"])'
replacement-text: exports_files(["doxygen"])
files: examples/BUILD.bazel
- name: Build ${{ matrix.subdir }}
run: bazel build //${{ matrix.subdir }}:doxygen
working-directory: examples
- name: Check output
uses: andstor/file-existence-action@v3
with:
files: "examples/bazel-bin/${{ matrix.subdir }}/html/index.html"
fail: true
- name: Check doxygen version in produced index.html
run: grep 'Doxygen 1.10.0' examples/bazel-bin/${{ matrix.subdir }}/html/index.html
shell: bash
submodules:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bazel: [7.0.0, 8.0.0, rolling]
subdir: [root, submodule1, submodule2]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Create .bazelversion file
working-directory: examples
run: echo "${{ matrix.bazel }}" > .bazelversion
shell: bash
- name: Build submodules/${{ matrix.subdir }}
run: bazel build //:doxygen
working-directory: examples/submodules/${{ matrix.subdir }}
- name: Check output
uses: andstor/file-existence-action@v3
with:
files: examples/submodules/${{ matrix.subdir }}/bazel-bin/html/index.html
fail: true
- name: Check doxygen version in produced index.html
run: grep "Doxygen $DEFAULT_DOXYGEN_VERSION" examples/submodules/${{ matrix.subdir }}/bazel-bin/html/index.html
shell: bash
nested:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bazel: [7.0.0, 8.0.0, rolling]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Create .bazelversion file
working-directory: examples
run: echo "${{ matrix.bazel }}" > .bazelversion
shell: bash
- name: Build nested
run: bazel build //nested:doxygen_a //nested:doxygen_b
working-directory: examples/nested
- name: Check output (a)
uses: andstor/file-existence-action@v3
with:
files: examples/bazel-bin/nested/a/html/index.html
fail: true
- name: Check output (b)
uses: andstor/file-existence-action@v3
with:
files: examples/bazel-bin/nested/b/html/index.html
fail: true
- name: Check doxygen version in produced index.html (a)
run: grep "Doxygen $DEFAULT_DOXYGEN_VERSION" examples/bazel-bin/nested/a/html/index.html
shell: bash
- name: Check doxygen version in produced index.html (b)
run: grep "Doxygen $DEFAULT_DOXYGEN_VERSION" examples/bazel-bin/nested/b/html/index.html
shell: bash