53
53
54
54
name : ${{ matrix.name }}
55
55
runs-on : ${{ matrix.runs-on }}
56
- container : ${{ (matrix.compiler == 'gcc' && 'ubuntu:22.04') || matrix.container }}
56
+ container : ${{ matrix.container }}
57
57
env : ${{ matrix.env }}
58
58
permissions :
59
59
contents : write
86
86
ccflags : ${{ matrix.ccflags }}
87
87
cxx : ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
88
88
cxxflags : ${{ matrix.cxxflags }}
89
+ vcpkg-triplet : ${{ matrix.compiler == 'gcc' && 'x64-linux-static' || '' }}
89
90
90
91
- name : Install LLVM
91
92
id : llvm-install
@@ -137,9 +138,9 @@ jobs:
137
138
cmake-version : ' >=3.20'
138
139
cxxstd : ${{ matrix.cxxstd }}
139
140
cc : ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
140
- ccflags : ${{ matrix.ccflags }}
141
+ ccflags : ${{ matrix.cxxflags }}${{ ( matrix.compiler == 'gcc' && ' -static -static-libgcc -static-libstdc++ -static-libstdc++') || '' }}${{ ( matrix.asan && ' -static-libasan') || '' }}${{ ( matrix.tsan && ' -static-libtsan') || '' }}
141
142
cxx : ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
142
- cxxflags : ${{ matrix.cxxflags }}${{ ( matrix.compiler == 'gcc' && ' -static-libstdc++') || '' }}${{ ( matrix.asan && ' -static-libasan') || '' }}${{ ( matrix.tsan && ' -static-libtsan') || '' }}
143
+ cxxflags : ${{ matrix.cxxflags }}${{ ( matrix.compiler == 'gcc' && ' -static -static-libgcc -static-libstdc++ -static -libstdc++') || '' }}${{ ( matrix.asan && ' -static-libasan') || '' }}${{ ( matrix.tsan && ' -static-libtsan') || '' }}
143
144
generator : Ninja
144
145
toolchain : ${{ steps.package-install.outputs.vcpkg_toolchain || steps.package-install.outputs.vcpkg-toolchain }}
145
146
build-type : ${{ matrix.build-type }}
@@ -155,6 +156,8 @@ jobs:
155
156
package-generators : ${{ (runner.os == 'Windows' && '7Z ZIP WIX') || 'TGZ TXZ' }}
156
157
package-artifact : false
157
158
159
+ # The artifacts will be downloaded in the next jobs to
160
+ # create the releases.
158
161
- name : Upload GitHub Release Artifacts
159
162
if : ${{ matrix.is-main && matrix.compiler != 'clang' }}
160
163
uses : actions/upload-artifact@v3
@@ -171,7 +174,7 @@ jobs:
171
174
github_token : ${{ secrets.GITHUB_TOKEN }}
172
175
173
176
- name : Codecov
174
- if : ${{ matrix.coverage}}
177
+ if : ${{ matrix.coverage }}
175
178
uses : codecov/codecov-action@v3.1.4
176
179
with :
177
180
directory : ' ./build'
@@ -248,8 +251,9 @@ jobs:
248
251
249
252
name : Demos
250
253
timeout-minutes : 120
254
+ # We run the demos with ubuntu-22.04 to ensure
255
+ # the binary works on earlier versions of ubuntu.
251
256
runs-on : ubuntu-22.04
252
- container : ubuntu:23.04
253
257
254
258
permissions :
255
259
contents : write
@@ -297,6 +301,9 @@ jobs:
297
301
modules-exclude-paths : ' '
298
302
trace-commands : true
299
303
304
+ # Boost.URL has its own mrdocs.yml file. We go through the
305
+ # multi/single and adoc/html/xml formats and patch the
306
+ # mrdocs.yml file for each combination.
300
307
- name : Generate demos
301
308
run : |
302
309
set -x
@@ -319,13 +326,15 @@ jobs:
319
326
tar -cjf $(pwd)/demos.tar.gz -C $(pwd)/demos --strip-components 1 .
320
327
echo "demos_path=$(pwd)/demos.tar.gz" >> $GITHUB_ENV
321
328
329
+ # Upload the demos as artifacts, so we can see them in PRs.
322
330
- name : Upload demo artifacts
323
331
uses : actions/upload-artifact@v3
324
332
with :
325
333
name : demos
326
334
path : ${{ env.demos_path }}
327
335
retention-days : 1
328
336
337
+ # Upload the demos to the website when pushing to master, develop, or creating a tag.
329
338
- name : Update website demos
330
339
if : ${{ github.event_name == 'push' && (contains(fromJSON('["master", "develop"]'), github.ref_name) || startsWith(github.ref, 'refs/tags/')) }}
331
340
env :
@@ -345,6 +354,10 @@ jobs:
345
354
chmod 755 -R $(pwd)/demos
346
355
scp -r $(pwd)/demos/* ubuntu@dev-websites.cpp.al:$demo_dir/
347
356
357
+ # Create releases after being able to build the demos.
358
+ # When the releases overwrite the `master` or `develop` releases,
359
+ # GitHub might attempt to create a draft release which needs to
360
+ # be converted to a regular release manually.
348
361
releases :
349
362
needs : build
350
363
defaults :
0 commit comments