-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add vcpkg ci #13963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vcpkg ci #13963
Conversation
tests/unit/unit2604.c
Outdated
return error == 0 ? CURLE_OK : TEST_ERR_FAILURE; | ||
if(error == 0) { | ||
return CURLE_OK; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong. What if error is not zero, what does it return then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It going to this line and return:
return (CURLcode)unitfail;
https://github.com/curl/curl/blob/master/tests/unit/curlcheck.h#L110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think should be the value?
Maybe this line:
https://github.com/curl/curl/blob/master/tests/unit/curlcheck.h#L110
should return TEST_ERR_FAILURE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I know what needed to be done. I understand my error.
I think I should call abort_test fail macro.
If you want to add directories and files for testing purposes, I think they should be put in |
I don't mind to add them to tests, but these are configs files that help building vcpkg configurations, and not tests files. |
039916b
to
efe4c94
Compare
I don't understand. Why do we want files added for building vcpkg configurations? We typically don't host files for building packages because they are usually best authored and maintained by the peeps who build and host those packages. |
It json files that tell which ports (libs) to build and it using on curl ci, and only the subset that fit for curl and by test or the configuration that needed for curl specific. This is the reason it add here to curl, so I moved them to tests as you suggested. |
8c69618
to
d82a125
Compare
Files needed for packaging curl aren't kept in the curl source repo; the files in packages/ are configs needed for even basic builds on a few platforms. I don't think vcpkg files belong here any more than Debian control files or RPM spec files, or a hundred similar config files. Making sure curl remains able to be packaged by vcpkg using CI jobs is something vcpkg people should be doing, but IMHO it's out of scope of the curl project. |
I am not package curl via vcpkg. This purpose of the ci is to build the latest libraries needed curl to test curl building with them, then test curl with the libraries with curl ci test. |
Ok, that makes a bit more sense. But what do these builds add that the existing ones don't already do, that get their dependencies with means other than vcpkg? Just using vcpkg doesn't add any value that I can see. |
I see the value of vcpkg for MSVC jobs to test with freely chosen dependencies. Serving as the MSVC equivalent of As for MSVC, what do you think of integrating vcpkg into the existing MSVC workflow in Can we use Why is it necessary to modify a unit test result? |
We use brew and apt to install a lot of dependencies for CI jobs. That's their purpose. I don't see that this newly built vcpkg in these CI jobs is actually used to install dependencies for builds. So why do we build it? |
What I meant is for MSVC jobs, there is no mechanism to install dependencies, like we're used to with MSYS2 solves this for mingw-w64. Cygwin also has it solved. So basically all platforms have a package manager of some kind, except MSVC, and vcpkg seems to plug that hole. For other targets, I don't see the benefit of vcpkg, in curl's context. |
The main different from apt (I am not sure about brew) that vcpkg bring you the latest library version that exist in vcpkg that usually the latest version library that exist. especially on the libraries that are very popular that curl are using.
It can be done to integrate vcpkg to windows.yml. but You have working ci, and before you commit to vcpkg, you should check it on sevral PRs and then can integrate it to one file after you see it working as you expected. Also this is work in progress, because you should also adapt cmake that will find all other libraries from vcpkg that curl needed that currently is not the case. for example zlib. So it better to have different ci that easily change / remove as you want. and over time to integrate one to another.
Yes I did. I refactor the ci files and remove the vcpkg folder entirely.
On windows on openssl build option, it create this compilation warning / error:
So I change the test file that it will be without unreachable code. I would like to have a feedback if I did the fix correctly, or how I can fix correctly that solve the unreachable code problem. Thank you on your feedback. Other tests on osx and windows are failing too, and I would like help how to fix them. |
9119af4
to
bb22d5e
Compare
For
I'd be happy with integrating as part of this PR. Not least, CI tests are CPU/time expensive and add flakyness. What do you think of making the two no-SSL (= not so useful) MSVC jobs in
Looking good, thanks!
Fair enough. Would you mind adding this to the commit/PR message? |
I think I will make a different PR for test fix. Do you want me to delete the ci for linux and osx? I am not sure I want to refactor windows.yml. It more time for me. I can make vcpkg-windows.yml more usefull ci. |
The Windows job fails test 1516 because the shell used there converts the |
@bagder Also interesting test that can fix easily: test 1013...[Compare curl --version with curl-config --protocols] On vcpkg-osx.yml secure transport option What is the missing smb smbs protocols? |
I prefer your #13979 over this PR. Left a bunch of reviews with mostly small things. |
Does this PR still have merit after #13979 was merged? |
I left this one open because there is a bug in osx that the tests 1013 and 1014 failed. |
NTLM and SMB were missing from the feature list for build using SecureTransport. Follow-up to 76a9c3c curl#3619 Reported-by: Tal Regev Bug: curl#13963 (comment) Closes #xxxxx
(I think it's safe to close this now.) |
Thank you for fixing the tests! |
NTLM was missing from the features list, and SMB/SMBS from the protocols list in SecureTransport builds. Follow-up to 76a9c3c #3619 Reported-by: Tal Regev Bug: #13963 (comment) Closes #14065
Add vcpkg ci. I bring you the power of vcpkg. It can build 3rd parties on many os, and can help build curl features and configuration. It can integrate with cmake.
I also add a cache that when it will be other PR and hit the same cache, it will automatic draw the last time compilation. leaving most of the ci time for compile curl and testing.
I also add an upload logs as artifact in case of failing, to see what cause the vpckg to fail.
vcpkg set to the latest, but it can changed. Also most of the time vpckg is stable, but it can have port fails. Usually vcpkg very responsive, especially in the very popular ports (packages) that needed for curl.
I added a tests. tests in osx and windows are fails, not sure why. Maybe I did something in my side. Maybe it can improve curl that way.
Note, I didn't add all the other features for curl because:
I fix one of the test. I hope I did it correctly, because on windows it complain that the last line is a dead code that cannot reach.
I will happy to read your feedback and your thoughts.