]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: separate target for examples, optimize CI, fix fallouts
authorViktor Szakats <commit@vsz.me>
Sat, 14 Sep 2024 00:21:33 +0000 (02:21 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 20 Sep 2024 21:53:33 +0000 (23:53 +0200)
commit45202cbba4bb3d12b4469063864b57d2f8765d9c
treef572efd1e89ef61b84d025ac0043b5325f4a9687
parentcaefaecaad0707a50ece7d230bdb89bd2217458d
cmake: separate target for examples, optimize CI, fix fallouts

- Move `docs/examples` builds under a separate target.

- Make `BUILD_EXAMPLES` default to `ON`. It means to generate the rules
  for `docs/examples` by default, but not build them. To build them,
  an explicit `make curl-examples` (or ninja, etc) command is necessary.
  This syncs behaviour with autotools, and also how both cmake and
  autotools are building tests.

- GHA: update cmake jobs to use the new way of building examples.

- GHA: move examples build step at the end of the job, after building
  and running tests. This allows to have build and test run results
  faster, and leave the seldom-changing examples build to the end.
  Building examples is the slowest build step with no practical way to
  make them fast.

- appveyor: enable building examples in two old-MSVC jobs.

- examples: fix examples to build cleanly with old MSVC versions.

- GHA/non-native: move example build log under a GHA foldable section.

- GHA/windows: move building examples into separate step for Linux cross
  jobs.

Follow-up to dfdd978f7c60224dffe2aac25b436dc0a5cd0186 #13491
Closes #14906
13 files changed:
.github/workflows/cygwin.yml
.github/workflows/linux.yml
.github/workflows/macos.yml
.github/workflows/non-native.yml
.github/workflows/windows.yml
CMakeLists.txt
appveyor.sh
appveyor.yml
docs/examples/CMakeLists.txt
docs/examples/cookie_interface.c
docs/examples/http2-serverpush.c
docs/examples/sendrecv.c
docs/examples/simplessl.c