GHA: use vcpkg to install packages for MSVC jobs#13979
GHA: use vcpkg to install packages for MSVC jobs#13979talregev wants to merge 5 commits intocurl:masterfrom
Conversation
1d67ad3 to
75bc7ce
Compare
|
I am closing this PR because I want to debug the cache, and I don't want to always activate curl ci. I will do it on my own ci. |
a521870 to
8a0017d
Compare
|
on this line I must use double quotes. The ci will fail on single quotes |
acbd46e to
8817151
Compare
This comment was marked as resolved.
This comment was marked as resolved.
8817151 to
745a5e8
Compare
745a5e8 to
0b60eee
Compare
0b60eee to
80fd29d
Compare
|
Aside question: Few years ago I remember vcpkg was installing packages from source. Is this still true? On a cursory look the install command finished quickly that hinted this might no longer be the case. If so, do we need caching?
That's correct. (I wasn't suggesting single quotes in bash string with variables in them) On the other hand |
vcpkg still installing packages from source |
80fd29d to
39cab21
Compare
- change to VCPKG_TRIPLET_DIR
e650035 to
7072d1f
Compare
|
@vszakats Can you approve the PR? |
|
@vszakats Thank you! |
|
@bagder Can you take a look on this PR? |
|
Thank you @talregev, merged now! |
- cache on a per-package basis. Replace manual caching with a built-in solution. It shares cached package builds between jobs, e.g. libssh2 only builds once per platform (instead of once per job). Individual packages are built as needed (not the whole per-job tree). It also fixes the duplicate cache entry issues. Ref: https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache Follow-up to e26cbe2 #13979 Follow-up to cb22cfc #14077 - add BoringSSL job with ECH enabled. The first such job in the curl CI. - add LibreSSL job. - use vcpkg pre-installed on the runner image, instead of rolling our own. This is quicker, simpler and more robust. Follow-up to e26cbe2 #13979 - show pre-installed vcpkg and ports version. - drop `gsasl` dependency till it reaches the pre-installed vcpkg ports. - re-add `find .` to see the binaries generated. - simplify setting up `PATH`. - exclude failing tests for any job enabling WinIDN. - drop collecting and uploading log archives. We already dump CMake logs, and our build doesn't use Ninja. Rest of files weren't generated by the curl build. We don't aim to debug vcpkg package builds. Closes #14090
- move `curl --version` into separate step. - move configure log to separate step. Run on success, too. - add step with `curl_config.h` dump (full and brief/sorted). - make `autoreconf` a separate step. - add each job configuration a short name. - shorten job names. Dedupe/drop redundant info, introduce abbreviations: AM = autotools, CM = CMake, U = Unicode, R = Release, not -> `!`, etc. Instead of mentioning `debug`, mentioned when it's not. - simplify `PATH` forming for MSVC jobs. It's sufficient to add the release binary directory of vcpkg, the debug one is redundant. Follow-up to e26cbe2 #13979 - other minor tidy-ups. Closes #14116
Follow-up to f99c08d curl#14090 Follow-up to e26cbe2 curl#13979 Closes #xxxxx
SFTP/SCP tests were failing in CI with WinCNG libssh2 since we first added such job. With `curl: (67) Authentication failure`. The reason is that the default `ssh-keygen` RSA private key format changed to OpenSSH (RFC4716) in 2018. libssh2 does not support this format with some of its crypto backends. Fix it by generating keys explicitly in PEM format as necessary via the `-m` option. This format is universally recognized for RSA keys. 2018-08-24: https://www.openssh.com/txt/release-7.8: OpenSSH format becomes default 2010-08-23: https://www.openssh.com/txt/release-5.6: `-m` option first supported This fixed the auth issue, just to reveal a known flakiness issue in libssh2 + WinCNG, causing: ``` curl: (2) Failure establishing ssh session: -8, Unable to exchange encryption keys ``` Ref: https://github.com/curl/curl/actions/runs/14000494428/job/39205633258?pr=16781#step:15:1796 Tracked here: libssh2/libssh2#804 Mitigated in libssh2 tests by retrying them. Due to this, keep ignoring these test results. Also: - add an env to customize key format: `CURL_TEST_SSH_KEY_FORMAT` - display the generated format in the log. - GHA/linux: document the wolfSSH error code causing it to fail tests: ``` curl: (79) wolfssh SFTP connect error -1051 / WS_MATCH_KEY_ALGO_E / cannot match key algo with peer ``` Follow-up to 4911e7a #16735 Follow-up to 0ec72c1 #16672 Follow-up to e53523f #14859 Follow-up to e26cbe2 #13979 Closes #16781
SFTP/SCP tests were failing in CI with WinCNG libssh2 since we first added such job. With `curl: (67) Authentication failure`. The reason is that the default `ssh-keygen` RSA private key format changed to OpenSSH (RFC4716) in 2018. libssh2 does not support this format with some of its crypto backends. Fix it by generating keys explicitly in PEM format as necessary via the `-m` option. This format is universally recognized for RSA keys. 2018-08-24: https://www.openssh.com/txt/release-7.8: OpenSSH format becomes default 2010-08-23: https://www.openssh.com/txt/release-5.6: `-m` option first supported This fixed the auth issue, just to reveal a known flakiness issue in libssh2 + WinCNG, causing: ``` curl: (2) Failure establishing ssh session: -8, Unable to exchange encryption keys ``` Ref: https://github.com/curl/curl/actions/runs/14000494428/job/39205633258?pr=16781#step:15:1796 Tracked here: libssh2/libssh2#804 Mitigated in libssh2 tests by retrying them. Due to this, keep ignoring these test results. Also: - add an env to customize key format: `CURL_TEST_SSH_KEY_FORMAT` - display the generated format in the log. - GHA/linux: document the wolfSSH error code causing it to fail tests: ``` curl: (79) wolfssh SFTP connect error -1051 / WS_MATCH_KEY_ALGO_E / cannot match key algo with peer ``` Follow-up to 4911e7a curl#16735 Follow-up to 0ec72c1 curl#16672 Follow-up to e53523f curl#14859 Follow-up to e26cbe2 curl#13979 Closes curl#16781
You already have vcpkg in your msvc jobs in your ci. You didn't aware of it.
I refactor the vcpkg and add more libraries that can compile with curl.
I added cache that can be restore, and not building every library from scratch every PR, it will use the cache. (save ~7min on openssl and schannel build).