Conversation
|
Is this inline with what we need in the project? |
|
Haven't reviewed yet, but this sounds awesome. |
|
MacOS GCC, note line 339 in log: |
|
We also the need the banner for the build in README. I am wondering if we should limit builds to certain branches - I think it is probably not constructive in this context although I strongly prefer it in production because it might otherwise trigger unwanted deployments etc.. However, the old Travis CI setup did have two build types: one with just the latest few compilers and one that did the whole thing, but it took a long time and I only used it before making a release to check against regressions. It also depends on GH speed. I looked at the Ubuntu GH script. I strongly prefer Ninja for development, but I think Make is better for cross platform validation. I think the Travis build used Make. Ideally at least a few configurations would do both, but that might be overkill. So this is more thoughts than requirements. |
|
It is the ci-more branch where I add more test on Linux and macOS. There is something similar for Windows on Appveyor, but I think it stranded a bit because Appveyor changed their environment so I just chose the most important middle of the road builds there. |
|
Also, if you haven't already. C++ tests are important. There is only a single test that can be disabled, but I got a lot of bug reports from C++ users until someone contributed that test. This avoids small regressions that breaks C++ that I wouldn't normally check for. Note that C++ test just means a regular C test included in C++ file and compiled with g++ or clang in C++ mode. I'm not sure C++ pass all compiler versions, but at least the recent ones and possible some older that currently works. |
|
As to ci-more - if we keep that concept, I definitely would want only one version the GH script with branch detection within the script rather than merge controlled differences as it is today - that is very fragile. |
a8e7a8a to
d7f50b2
Compare
|
I have been away, but I will try to get some progress on this and look into the possible issues. Building with Currently the CI run is quite quick, but since it might grow if we add sanitizers or valgrind runs it might be a good idea to have a smaller workflow for PRs/commits and a thorough workflow for releases. |
|
Sounds good. I think it makes sense to make the default automatic build a little larger than minimal if it is fast enough, as long as it adds value. We are not hunting for regressions, but e.g. latest and typical gcc tend to differ sometimes. |
|
Maybe the large build can be scheduled weekly or something? |
|
Sure weekly works as well, this would be good if external analysis tools like https://scan.coverity.com/ is added later. |
|
Some updates to have a CI run of basic targets and a weekly run with a wider range.
Maybe there could be some more runs of windows in weekly.. Examples: |
|
This looks great. If we are going to switch from AppVeyor, we definitely need more 32 and 64 bit Windows builds weekly, down to at least MSVC 2013. Currently we go back to MSVC 2010, but I'm ready to drop that. As long as you keep the commits clean I think it is fine as is, but otherwise source code fixes should preferably be in a separate PR. Wish list: |
|
BTW: I assume you noticed the annotations in yourr weekly build example: |
|
32-bit is a good idea, I'm not sure the best way to get the -m32 flag in there though, maybe one should give cmake a toolchain file or something. I looked a bit at ARM but most are using own runners, but a cross-compilation seems to work which can be added. I'll see if I can fix some of the annotation as well, the used install-clang-helper gives most warnings. |
|
ARM is probably most interesting on an ARM OS where tests can also run. |
|
I looked at the build logs from ICC in your weekly example. There are warnings that do not surface in the build overview (annotations), for example: Also, it may be difficult to continue building with ICC, given the following from same build: |
|
Can you incorporate #217 (update CMake version) in this PR? Could easily add after, but it would be good to know that it works on all builds. |
|
Sure, I can add the CMake version update commit. The annotations issue are gone by replacing the used github-helper and fixating some run-on versions. Just fiddling with the 32bit builds now.. |
|
Current example runs: |
README.md
Outdated
| OS-X & Ubuntu: [](https://travis-ci.org/dvidelabs/flatcc) | ||
| Ubuntu, macOS and Windows: [](https://github.com/dvidelabs/flatcc/actions/workflows/ci.yml) | ||
| Windows: [](https://ci.appveyor.com/project/dvidelabs/flatcc) | ||
| [](https://github.com/dvidelabs/flatcc/actions/workflows/weekly.yml) |
There was a problem hiding this comment.
Missing a description for the weekly build I think.
There was a problem hiding this comment.
Well, I cannot see how it looks yet so I am just raising a potential concern, but I think it makes sense that all three builds have some text since otherwise it might see as if it is related to the Windows build, I guess. You could call extended build or something.
|
I assume that you are still looking at 32-bit build, but otherwise - there is no test running for gcc 32-bit, only a check for the ./bin/flatcc file if I read it correctly. I also made on comment on a missing description for the weekly build status in README. (EDIT: ah - now Github decided to show my comment on the README ...) |
|
But I won't stop you if you have something better for Windows. |
|
Ok, seemed that it was not possible to get any version anyway, but Can copy the job we have, and run on both images to get two VS versions at least. |
|
Also, you might want to update your initial PR comment since it isn't entirely up to date, yet rather specific. |
|
I have tested running builds on much older MSVC versions on GH actions, but it is a bit involved and some time ago, so I don't want to go into that for now. Also, it was not with CMake. But I have some material I can dig into. |
|
Perfect! |
|
Great, and thanks again for the huge effort. |
|
Unfortunately the weekend flew by.., but here is the changes:
Example of |
|
This looks good. Some quick observations: Windows has warnings in pparsefp, likely due to changes I made - these warnings are also hard to find in GH actions - appveyor is much better at destilling these. ci build seems to run Ubuntu 20, while this is relevant for some old test, we probably want to bump to 22 or so, if possible, for latest compiler tests? icc compiler warnings appear to be concentrated on a single const expression warning, so perhaps we can find and disable that warning? GCC 4.4 has the following warning: Overall, I think this is good enough to merge now, what do you think? |
|
You can see the Appveyor warnings here: Do you think GH Actions has some similar filter? |
|
Also, I think weekly.yml is currently set to build on push and pull requests. |
|
Ah, the warnings-tab in appveyor looks usable. I haven't seen any similar on GH Actions yet though.. The |
Also introduces a new build config for forced 32bit builds: > scripts/initbuild.sh make-32bit
aligned_alloc() seems not fully supported when using GCC on Mac, so use posix_memalign() instead. aligned_alloc() returns null in tests and https://en.cppreference.com/w/c/memory/aligned_alloc states: ".. not supported by the implementation causes the function to fail and return a null pointer"
semantics.c:1551:32: error: missing field 'len' initializer
fb_value_t index = { { { 0 } }, 0, 0 };
See https://reviews.llvm.org/D28148 and
related https://reviews.llvm.org/rL314838
So update to 2.8.12.2 (in Ubuntu 14.04) CentOS 7 has a way to install CMake3. This avoids the warning in newer CMakes: flatcc/CMakeLists.txt:5 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
|
I'm just thinking: I don't want weekly to run on PR because it takes too long for feedback, and trigger a lot of builds with frequent pushes, on other hand, it currently only takes 6 minutes to build, and I probably cannot trigger builds in PR branches since it is not my repo, or? Most of the time I would assume things are good if ci.yml is good, but there might be cases where portability is more of a concern. |
|
You are probably right, I've never attempted to run a workflow manually on a PR before, so it might be problematic. Not sure..cant find any examples describing it either. |
|
Any idea how to add the ci.yml build to PR checks? I had this for Travis and Appveyor, and recently just Appveyor, but I am a bit at a loss how to enable this with GH actions? |
|
Or is it already enabled for future PRs? I don't see it on existing PRs. |
|
I believe it's only triggered by events, like new PRs or changes/push in existing PRs.. |
|
So an update by committer or admin like this should make it run. |
|
OK, thanks, we'll see how it goes. |
Add Github CI and weekly builds to run tests with a range of different compilers and compiler versions on Ubuntu, Mac and Windows.
This PR includes: