-
Notifications
You must be signed in to change notification settings - Fork 278
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
Switch MinGW CI to GHA #2019
Switch MinGW CI to GHA #2019
Conversation
Ah, looks like I was too eager on simplifying the appveyor script... Not too familiar w/ it, will fix up later. An none of the Windows workflows are being run on PR, any ideas why? |
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.
And I thought the Christmas had arrived early! Maybe you could mark the PR as draft until ready for review.
I'm not sure I can say anything useful about this as I am unfamiliar with GHA. It's good to see the code segmented and not a monolithic ugly little brute.
Question: When this is working, will it be triggered by the daily build with downloadable build artefacts?
This is just replacing existing "on PR" functionality and nothing else. |
Well, it's not working yet 😉 |
56cbaa5
to
fd21b42
Compare
Codecov Report
@@ Coverage Diff @@
## 0.27-maintenance #2019 +/- ##
=================================================
Coverage 46.36% 46.36%
=================================================
Files 146 146
Lines 23005 23005
Branches 11809 11809
=================================================
Hits 10666 10666
Misses 6689 6689
Partials 5650 5650
Continue to review full report at Codecov.
|
Fix appveyor
Should be ready now... A few observations:
|
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.
The unit test that's failing
is benign. The message concerns a string coming from the C-runtime library:
Which is: "Unknown error 9999 (errno = 9999)"
256
strError().c_str()
257
Which is: "Unknown error (errno = 9999)"
There's code somewhere to "massage and/or forgive" these differences. Its an issue in the test code, not exiv2.
I also see messages about "unsupported format". I thought the test harness ($ make unit_test) had code to pipe those ugly messages to /dev/null. Maybe that code isn't working on MinGW/msys2. Again, this is an issue with the test harness and not with the libexiv2.
I'm busy today and will investigate tomorrow. Let's see if Luis and/or Kev have other comments to make.
Thanks Robin, let's see if there are ideas... As I said, we can alternatively just drop down to Also, I left the same matrix as we have for MSVC (Release/Debug x shared/static), do we really want/need all of them? (We had [Release, Debug] x static) for the Fedora MinGW job, and Release + shared for the AppVeyor MinGW one...) Finally, what do you think about giving Cygwin migration to GHA a go as well? |
I think we should leave the code I don't have time today to investigate the two anomalies in unit_tests about Now that you've shown how to integrate the MinGW platform into the test harness, I'll do Cygwin/64 and follow your example. Can I add it to this PR (tomorrow) or submit a new PR (next week)? |
Agreed
I think I prefer we do it a step at a time to make it easier on ourselves. |
Right. I'll leave Cygwin/64 for next week (or later). Tomorrow I'll look at the |
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.
great contribution! 👏
My only question is about why we are keeping the appveyor pipeline.
IMHO I would keep it like you have done it. It is already implemented and I guarantee you that it will find subtle issues in the future. Furthermore it is not adding much additional processing time to the whole CI pipeline since the jobs are running in parallel. Better to be safe than sorry 😸 |
Regarding the failing test, I think we can simplify the test to be platform agnostic. Right now we are checking the exact string returned in each platform: TEST(strError, doNotRecognizeUnknownError)
{
errno = 9999;
bool useExactString{true};
#if defined(__MINGW__) || defined(__MSYS__) || defined(__CYGWIN__)
const char * expectedString = "Unknown error 9999 (errno = 9999)";
#elif defined(_WIN32)
const char * expectedString = "Unknown error (errno = 9999)";
#elif defined(__APPLE__)
const char * expectedString = "Unknown error: 9999 (errno = 9999)";
#elif defined(__sun__)
const char * expectedString = "Unknown error (errno = 9999)";
#elif defined(__FreeBSD__)
const char * expectedString = "Unknown error: 9999 (errno = 9999)";
#elif defined(__NetBSD__)
const char * expectedString = "Unknown error: 9999 (errno = 9999)";
#else
// On Alpine we get 'No error information (errno = 9999)' instead of 'Unknown error 9999 (errno = 9999)'
const char * expectedString = "(errno = 9999)";
useExactString = false;
#endif
if (useExactString) {
ASSERT_STREQ(expectedString, strError().c_str());
} else {
ASSERT_TRUE(strError().find(expectedString) != std::string::npos);
}
} Probably it was me who started to write the test like that. At this point, I do not see the value of checking for the exact string. TEST(strError, doNotRecognizeUnknownError)
{
ASSERT_TRUE(strError().find("(errno = 9999)") != std::string::npos);
} |
Even if we fixed this test, what I'm also worried about is the fact that CI passed when there was a failing case. |
Right, that's more important. I think the culprit of this situation is to use
Probably
We should probably first fix this situation (either in this PR or in a separate one). |
So the commit 11caec7 was unsuccessful, and more substantial changes to CMake on 0.27-maintenance would be needed. Maybe out of scope for this PR? |
I have created the issue #2022 to take care about this. And yes, I think it is out of scope for this PR. I will try to take care of #2022 in the next days. |
Thanks. Best to leave any test fixing as part of #2022 solution as well then. @clanmills Ok to merge as is then? You can then have a go at Cygwin on GHA on top of this... |
Great team-work. I'll merge. Luis will take care of #2022 and I'll look at Cygwin/64 next week. Thanks Very Much, Everybody. |
Thanks everyone. @kevinbackhouse Can probably cherry pick some stuff for main as well. |
Also removed all mentions of EXIV2_EXT, not used since 0.27.4...