-
Notifications
You must be signed in to change notification settings - Fork 178
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
Github Actions CI workflow #250
Conversation
This would compile ALL projects for each commit/PR Can this be limited to only changed projects? Or only the documentation if that is updated |
@NeroBurner This will not compile all projects, see example. |
Ist there in github actions something like rules:changes in gitlab? |
@NeroBurner similar to https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths which is used in this POC workflow |
There is a change in GitHub Actions which I was not aware of. It is possible to read matrix from json, which can be an output of another job. This led to a possibility of easy customization of build scripts. See previous 2 commits. |
Hi @drodin, as per #9 this is something we've been wanting for a long time. @bkotzz started work on #29 a while ago but work stopped due to other priorities. Of course we would like to make adding/updating packages easier and removing the need for a separate testing repo makes life a lot easier. Running the tests per updated project is exactly what we need. The matrix override is perfect since we need to log when certain packages have failing toolchains. I would like to have an easy way to port/copy over the old travis/appveyor YAMLs into the new matrix format so that we can effectively delete hunter-testing. Perhaps we can do that after this PR is merged. No more Another nice to have would be to build the documentation in Github actions too, so we can remove our Travis dependency. This is really great stuff, thank you for doing it! |
See 4d3bb34 for docs testing, it's a separate workflow, which runs on push/pull to master branch if any file in docs/** or examples/** has been changed (not sure if I had to include other paths here) example: |
@drodin is this ready to merge? We have some scripts to port over the hunter-testing YAMLs to this format, but they need a little work. We also need to update the docs to reflect this change. |
@rbsheth It's not ideal, see below. Though it's non-intrusive, so can be merged for live testing. These problems arise from a few projects which have components (f.e. Boost)
If commenting out a toolchain in a matrix serves only the purpose of determination which toolchains are failing there are better ways to log this:
ps: With 621c69c it's possible to manually start a test for any project from GitHub interface or through API call. |
I think we should support a set number of toolchains, and possibly deprecate older ones as new toolchains are adopted. The fact that toolchains can get outdated in the current scheme is a flaw not a feature IMO. Are there cases where we want to install new system packages for a package? I think that should be discouraged, and in the worst case can be added to the top level build script. As for only modifying the examples/ directory, I think we can manually run a test in that edge case. I can't remember the last time that happened. Does the boost build work with all its components? |
An example is the OCCT package which needs the |
@rbsheth Well ok this was not the best example ;) Another example - to define a system env variable, you'll have to copy and override matrix and the build script, changing one line (see Boost example) Ok. I've made an example test matrix override for Boost based on current travis/appveyour scripts - drodin-tests@3de5b97. You can see a test run here https://github.com/drodin-tests/hunter/actions/runs/229629184 Took just a bit more than an hour. Btw, I had to add python version to the matrix, see 1232674 |
@rbsheth While there is always a room for improvement, I think we need to finalize it on this stage.
|
98b3d69
to
a10097c
Compare
a10097c - is a documentation draft for GitHub Actions CI testing. I've took the liberty to decouple testing (including local) into separate section, with just one paragraph included in creating/updating section. |
Looking good! I will review this week and try to convert the older projects too. |
@rbsheth I've updated a Boost example ci override a bit, may be of help for converting older projects - see drodin@01de433 |
@drodin Thanks for the updates, I'm going to try merging this now. Let's see what happens! |
drodin@0cf945d cherry-picked into orphan branch |
|
@rbsheth pages should build correctly on the first tested packages, there is a sort of tested packages which is failing now |
Just a proposal for switching current testing from Travis/AppVeyor to GitHub Actions.
Work example:
On the plus side:
On the negative side:
harder per-package customization of test scriptsMost of the workflow file mimics Travis/AppVeyour scripts.
The hacky stuff:to pr.* branchor pull requestto the main branch, in both cases it is checked that at least one file in the cmake/projects/ path was modified.I couldn't find a way to discard a run on pull request to the main branch based on PR's head branch name, though it is possible to check and fail later...the branch name, which MUST follow pr.package-name notation, it is possible, though more complicated, to extract it fromchanged files listNot in the current commit:For packages that need additional system packages it is possible to read and install them from a list file in package dirFor packages like Boost which use more than one example dir there are different possibilities, depending on wether or not a clean environment is needed for each example buildCustomization of matrix and build scripts (this shouldn't be done for 90% of packages):
Would like to hear your thoughts and proposals.
Thank you.