cmake: separate target for examples, optimize CI, fix fallouts - #14906
Closed
vszakats wants to merge 9 commits into
Closed
cmake: separate target for examples, optimize CI, fix fallouts#14906vszakats wants to merge 9 commits into
vszakats wants to merge 9 commits into
Conversation
vszakats
marked this pull request as draft
September 14, 2024 00:42
Contributor
|
Analysis of PR #14906 at 8d031188: Test 3023 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Generated by Testclutch |
vszakats
force-pushed
the
cm-examples-target
branch
from
September 14, 2024 10:26
336b159 to
f766766
Compare
Member
Author
|
Yes, test 3023 started failing yesterday with mingw-w64 7.3.0. It's unrelated to this PR. |
vszakats
marked this pull request as ready for review
September 14, 2024 10:39
13 tasks
vszakats
added a commit
to curl/curl-for-win
that referenced
this pull request
Sep 14, 2024
Tiny speed-up (in the 'cmake generate' step) and less diskspace (1.5MB) after: curl/curl#14906
vszakats
force-pushed
the
cm-examples-target
branch
6 times, most recently
from
September 16, 2024 21:52
1be69d7 to
a88393a
Compare
Also make `CURL_EXAMPLES` default to `ON`. It means to generate the rules for examples by default, but to build them. An explicit `make curl-examples` (or ninja, etc) command is necessary to build them. This syncs behaviour with autotools, and also how both are building tests. It allows to move examples in separate CI steps to measure them and move them around to not slow down iteration. (After pending build speed-ups, building examples became the longest running part of a build.)
It's not entirely clear what is going on here, but go with the method already tried and tested with tests. It looks like the MSBuild generator doesn't like `EXCLUDE_FROM_ALL` in `add_subdirectory`? MSBuild fail: https://stackoverflow.com/questions/77975253/why-doesnt-this-cmake-custom-target-build-from-solution-file
Also replace MSVC macro hack with curl printf in `cookie_interface.c`.
vszakats
force-pushed
the
cm-examples-target
branch
from
September 20, 2024 21:50
a88393a to
f4b028c
Compare
vszakats
added a commit
that referenced
this pull request
Sep 22, 2024
- linux: bump up test parallelism for valgrind tests to `-j4` (from `-j2`). (EXPERIMENTAL) - linux: drop `apt-get update` for the default architecture on the GHA native runner. It makes prereq install steps complete faster. The runner image gets weekly updates, and that should be enough to guarantee fresh packages in most cases: https://github.com/actions/runner-images/commits/main/images/ubuntu/Ubuntu2204-Readme.md - aws-lc: use ninja with cmake. - aws-lc: build examples with cmake. - aws-lc: drop `apt update`. - aws-lc, wolfssl, linux32, http3-linux: move building examples to the last step. Follow-up to 45202cb #14906 - windows: formatting. Closes #14992
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- 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 dfdd978 curl#13491 Closes curl#14906
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- linux: bump up test parallelism for valgrind tests to `-j4` (from `-j2`). (EXPERIMENTAL) - linux: drop `apt-get update` for the default architecture on the GHA native runner. It makes prereq install steps complete faster. The runner image gets weekly updates, and that should be enough to guarantee fresh packages in most cases: https://github.com/actions/runner-images/commits/main/images/ubuntu/Ubuntu2204-Readme.md - aws-lc: use ninja with cmake. - aws-lc: build examples with cmake. - aws-lc: drop `apt update`. - aws-lc, wolfssl, linux32, http3-linux: move building examples to the last step. Follow-up to 45202cb curl#14906 - windows: formatting. Closes curl#14992
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move
docs/examplesbuilds under a separate target.Make
BUILD_EXAMPLESdefault toON. It means to generate the rulesfor
docs/examplesby 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 dfdd978 #13491