curl/.github/workflows
Viktor Szakats fe5225b5ea
cmake: optimize building examples in CI
In CI we want to ensure that examples build cleanly, but we don't want
to actually run them there. Meaning it's enough to just compile, but not
link them in CI. Saving time up to 2-4x (MSVC), and disk space up
to 1.2GB (or 8-70x).

Add a new cmake target that compiles all examples without linking them
into runnable binaries. Keep a full build for a single example to test
if it links correctly.

Also:
- CI: switch over all `curl-examples` targets to `curl-examples-build`
- GHA/linux-old: build examples in one of the cmake builds.

Result highlights:

Job                 | Bef. |  Bef. | Aft. | Aft. |
:------------------ | ---: | ----: | ---: |----: |
cygwin              |  15s |   9MB |  10s |  1MB |
msys                |  13s |   8MB |   7s |  1MB |
dl-mingw 15         |  39s |  113M |  34s |  2MB |
dl-mingw 9.5.0      |  49s | 115MB |  42s |  2MB |
dl-mingw 7.3.0      |  19s | 113MB |  14s |  2MB |
dl-mingw 6.4.0      |   9s |  12MB |   7s |  4MB |
Linux cross         |  19s |  28MB |  19s |  2MB |
MSVC UWP            |  65s | 374MB |   9s | 17MB |
MSVC x64            |  22s | 846MB |   9s | 17MB |
VS2010              |  48s | 105MB |  15s |  9MB |
VS2022 clang-cl     | 195s | 1.2GB |  51s | 20MB |
iOS Xcode           |   8s |       |   5s |      |
macOS LibreSSL      |  16s |       |  11s |      |
Linux aws-lc        |   3s |       |   1s |      |

Follow-up to dda251ef10 #18232

Closes #18209
2025-08-09 02:27:43 +02:00
..
appveyor-status.yml GHA: fix zizmor 1.10.0 warnings, update names 2025-06-30 18:38:56 +02:00
checkdocs.yml GHA: fix zizmor 1.10.0 warnings, update names 2025-06-30 18:38:56 +02:00
checksrc.yml GHA/checksrc: expand spellcheck, fix issues found 2025-07-21 16:09:01 +02:00
configure-vs-cmake.yml GHA: fix zizmor 1.10.0 warnings, update names 2025-06-30 18:38:56 +02:00
curl-for-win.yml GHA/curl-for-win: include CPU archs in job names 2025-08-06 00:38:51 +02:00
distcheck.yml cmake: ExternalProject test tidy-ups 2025-08-07 10:37:10 +02:00
fuzz.yml CI: skip CI builds that just touch Dockerfile 2025-07-02 18:28:24 -07:00
hacktoberfest-accepted.yml GHA: fix zizmor 1.10.0 warnings, update names 2025-06-30 18:38:56 +02:00
http3-linux.yml cmake: optimize building examples in CI 2025-08-09 02:27:43 +02:00
label.yml GHA: fix zizmor 1.10.0 warnings, update names 2025-06-30 18:38:56 +02:00
linux-old.yml cmake: optimize building examples in CI 2025-08-09 02:27:43 +02:00
linux.yml cmake: optimize building examples in CI 2025-08-09 02:27:43 +02:00
macos.yml cmake: optimize building examples in CI 2025-08-09 02:27:43 +02:00
non-native.yml cmake: optimize building examples in CI 2025-08-09 02:27:43 +02:00
windows.yml cmake: optimize building examples in CI 2025-08-09 02:27:43 +02:00