-
Notifications
You must be signed in to change notification settings - Fork 625
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
CI: add Windows/MSYS2 package build/test #2681
Conversation
Can you please submit a pull to fix the WEXITSTATUS? I don't want to add MINGW unless someone is willing to maintain it as this would distract from progress on Linux; are you willing to do so? FWIW Freebsd is a similar example where it lacks consistent love - and also the CI system kept randomly failing, so had to get disabled. |
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.
As to the patch... please make a new action rather then the normal build one, as I don't want builds to fail until this is proven stable.
Please remove the unicode in action names.
Does msys2/PKGBUILD have to be there, would like to avoid more top-level directories.
I'm not a C guy... I could work around it with https://github.com/umarcor/verilator/commits/fix/WEXITSTATUS, but I don't think that's acceptable because of https://github.com/verilator/verilator/blob/master/src/V3Os.cpp#L53-L59. As far as I understand, even if WIFEXITED does not exist on MSYS2, it should be defined there...
I can help with my best effort. Tests will be run in hdl/MINGW-packages, so it's not critical to have CI added here. My main motivation for opening this PR was providing a reproducible example of the build issue, which you can easily see in a "known" environment (CI). So we can discuss the best approach for fixing it and have it checked straightaway.
Done. I renamed the existing workflow to 'Build Linux' and I added 'Build Windows'. I updated the badges/shields in the README accordingly.
Done.
It does not. I now moved it to |
MSYS2, just as Arch Linux, is a rolling release. Therefore, failures should be expected every once in a while, since compilers and dependencies are bumped regularly. However, it is mostly stable. I'd say there are about ~4 temporary breaks a year. |
This PR now includes a patch to fix the WEXITSTATUS issue. I picked the define from https://github.com/bminor/binutils-gdb/blob/master/gdbsupport/gdb_wait.h#L79-L85 (see December 10, 2020 8:38 AM). However, CI seems not to like my username. It works on the fork, tho: |
Can you please separate the WIF part (& username), that seems better a separate commit than CI stuff and will merge it first, appreciated. |
BTW should it be named "Build Linux"? We'll hopefully get OSX back up and perhaps FreeBSD, these could be under the same "Build Linux", though I suppose we could also break them up as separate actions too. Thoughts? |
Done: #2685.
It can be named whatever you want. Honestly, I changed it for the sake of discussion. As per #2682 (comment) and #2683 (comment), there are only two motivations for having different workflows:
Therefore, I think that having Therefore, I would propose one of the following solutions:
|
I'd probably lean towards your idea of having a normal build (Linux), and extended build Mac/Windows/FreeBSD). Also if we can get it fast enough would be nice to have coverage reports on all pull requests, but that probably is better as a separate task. |
cf24d79
to
f6475dd
Compare
I rebased on top of master and I renamed the workflows to 'Tests' and 'Extended Tests'. I updated the shields accordingly: https://github.com/umarcor/verilator/blob/ci/msys2/README.adoc. I believe this PR is now ready.
That will be something to be done on linux only I think. That's because I/O on Windows is much slower. In GHDL's repo, for example, Windows is 2-5 times slower when running the test suites: https://github.com/ghdl/ghdl/actions/runs/407405565 (4min linux vs 19min windows, or 15-17min linux vs 42min windows). |
f25a8d1
to
935b5a8
Compare
FWIW the name "Extended tests" is a bit unforunate as we already use that for the additional test suite under https://github.com/verilator/verilator_ext_tests |
I was about to update the MSYS2 packages to 4.204, but there seems to be some issue that prevents successful compilation on MINGW32: https://github.com/umarcor/verilator/runs/2858209508?check_suite_focus=true. However, building the current |
I'm good with any alternative naming. Anyway, note that maybe this PR won't be merged. That is, I'm good with having it permanently as an open PR, which I can bump every once in a while (when bumping in the MSYS2 repo fails). That allows reducing the CI usage in this org, and the traffic that maintainers of this repo need to handle. |
I believe that was fixed with 0c4d88b |
It was! Thank you so much 😉 |
Glad to hear the patch worked out. BTW I was raising the naming because these jobs show up in the web UI, even if they are just on a PR: https://github.com/verilator/verilator/actions Took me a while to figure out which one was which 😄 |
@gezalore, just let me know which name do you want to use instead. I will rename, and then I think the old one won't be shown. |
I tried updating the Verilator package in MSYS2 to 4.216, but I'm getting the following error:
https://github.com/verilator/verilator/runs/4425043216?check_suite_focus=true According to Lines 335 to 339 in ac05a77
Line 507 in ac05a77
|
I tried two solutions: Both of them allow building and do pass the testsuite. @wsnyder which should I submit as a fix? |
I pushed removing the const, thanks for reporting. |
e989eae
to
600f23a
Compare
While trying to update the Verilator package in MSYS2 (which is ~8 months behind), I found that compilation would fail.
In order to keep better track of this type of regressions, this PR adds MSYS2 testing to CI: https://github.com/verilator/verilator/actions/runs/411990309. A PKGBUILD recipe is added, which is similar to the upstream but builds the sources surrounding it, instead of downloading a tarball. Then, in one CI job a package is built and uploaded as an artifact. In a second job, the artifact is installed and tested, similarly to how any user would do in a clean environment.
GitHub Action msys2/setup-msys2 is used for setting up MSYS2 and for caching installed packages.
Currently, Linux jobs are failing because I need to add myself to the contributors list properly. However, this PR does not modify those at all.
The current build error on MSYS2 is the following: