-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enhancement: Create GitHub CI/CD workflow and/or client side commit hooks #893
Comments
Some tests (via workflow) are done but as for running On the other hand one can add a commit hook for their own that runs prior to committing. ... yes I brought this up before hence how I know about these things. Though of course that was some time ago so maybe things have changed. I guess we'll have to wait to see what Landon thinks. |
Agree.
That might be useful, @xexyl. Would that hook run |
Just as a reminder I did this once but you thought it might be the wrong time. Is it a good time now? I can look and see if I still have what I did or else rewrite it. BUT it might be possible to only have an example for people to use if they want to. Let me know what you think. |
It seems like now is the time. The code is reasonable stable. If you propose a pull request, we can try it out before we declare (i.e., tag) the current contents "version 1.2" and make it a formal release. |
Okay. Though like I said I don't know if it can be enforced. Which rule should it run? Obviously not release but maybe prep? |
I suggest the CI workflow test as much as possible. A quick glance at the Does |
BTW my apologies if I put anyone's nose out of joint. |
Of course you didn't! Don't think about it. It's a good suggestion too. It might be that one has to install it in their fork but I don't know. I am pretty sure that's how hooks work but maybe there's a way to do it so it's enforced. |
Well The release one cannot be put in because it forces one to have the right version of flex and bison but only people (Landon and me being the only ones .. at least so far?) working on the parser need that. It's suggested that one runs I also am aware of a situation where the state of my fork let the prep process work but Landon got errors. I don't remember the details: that was quite some time back and lots has happened since then (not just here but other things in life of course). But I don't really know much about GitHub workflows either. I just got home from the doctor a short bit ago and I am going to turn the laptop on shortly. I can look into it I think though there are some other things I need to take care of first. Please feel free to offer suggestions on how this might work! |
I'd prefer this as much of this as a GitHub workflow (vs a |
It is indeed. The question is whether it will work. If it's run on GitHub it won't have access to all the tools needed. There is a workflow but it doesn't run make prep or make test even and I am not sure how it could. But if it's possible I don't know how. Do you have any idea? Booting up laptop now and will take care of those other things then I will look at this. |
Well I just added to my https://github.com/SirWumpus/iocccsize repo a CI workflow, which is probably the simplest. I'm now trying to add one to https://github.com/SirWumpus/post4, which wants OpenJDK 17+ if possible which is a little more complex. Add to the fact that the Ubuntu gcc used for the workflow complains about stuff I've not had issue with before (printf formatting- actually had issues and fixed, but now its even more pedantic and annoying and have to revisit it - I keep telling myself |
It is possible to have tools added to the environment. I once had a to deal with Erlang testing. Based on the |
Can you add tools that are part of the repo? They have to be compiled by the Makefile. If that's possible that seems like a good idea; otherwise I don't know what to do. Is it? Did you find some documentation that can be looked at to do this? If there is documentation I can look into it and maybe figure it out. Thanks! |
Would you like me to take this task on (since I've touch it a little in the past)? It should allow you to get on with other things and give me something else to do other than "proof documentation" and raise tickets. |
If you'd like to you certainly could and it'd be helpful indeed. The right one to run is If you have any questions Landon or I can happily answer and if it proves to be a problem and you can link to some documentation I can tackle it later on. Thanks! |
Right then, assign it to me and I'll get stuck in. |
I of course cannot do that. Landon? |
As that time, the code was under significant development and did not pass tests. Moreover the test was under development as well. One could argue that the tests should have been ready from the start: that wasn't the case back then. :-) Comments for @SirWumpus
|
I of course said some of that. Indeed very few people need make release. And some of the other tools that make prep run might not be strictly necessary for everyone. I wonder very much also what the workflow might buy us. If it is not thought worth having them after all I can get the hooks I wrote and maybe SUGGEST people use them but not require them. That's also a possibility I guess. But I must go to sleep now. Can barely see. Good night! |
This repo does not have manifests, nor tarballs. Perhaps you are thinking of some other repo? |
`prep.sh` to reference `$MAKE` in place of `make`.
I wish it had some snowballs though!
Okay I'm not in Hobbiton and I replaced Sam with Cody but I'm in a part of the world that has awful temperatures but I'm not willing to say exactly where that is so it'll have to be Hobbiton :-) ... actually I haven't seen snow touch the ground here since the 1989-1990 winter or maybe it was the 1990-1991 winter ... and it was there for not even an hour and it was hardly any at all. I don't want it to snow but I'd certainly prefer colder weather than what we have now! |
And since I'm into 'The Ring Goes South' I might as well add another amusing thing Sam says:
.. okay I'll stop spouting LR references now :-) |
Okay last thing: I guess that 0ecac76 broke it. That's what seems to have changed and I know from the past that parallel builds do not work. I don't know why the file would do it. I would try it now but I must leave now. Sorry. .. although it worked earlier today? |
The |
Correct: before that change we were using deprecated test code. So it doesn't surprise that the older code failed to find issues. |
So was this suggestion of implementing workflows for CI and umm CodeQL worth the investment? I know you're trying to push towards an official release, sorry if I caused a significant delay. Didn't think it would take this long. |
It was worth it Anthony so don't worry about that. It's better to find problems sooner. .. I will reply to other comments later today or else tomorrow morning. |
With commit 1398372 we added As a result, it appears that the workflow was successful. |
That is wonderful. |
The |
Thank you. |
As soon as I saw that option in the build I knew it was the problem. Maybe I should have reported it earlier on. |
For what it's worth: the reason I replied is it seemed like you might have been questioning or doubting yourself with it (since it seemed to cause a problem[0]) and I know from personal experience what that kind of thing can feel like. I am not saying that is it but I wanted to make sure that you knew that I think it's a great thing you did and I really appreciate it too. I know Landon does also. I will actually use this when the jparse repo is populated as well! [0] I actually have experienced this kind of feeling a lot and I know it can feel quite awful so when I saw it I wanted to make sure to reply even though I was in the middle of something - just in case. Either way it's an excellent improvement and I really appreciate that you did it. I wouldn't have known how to do it and I was able to work on other things because of your help. I hope you weren't feeling this way of course but I felt I had to address it just in case. It's bedtime here. Hope you have a great night, the both of you! |
As for the last part: I can even take the blame for not addressing the fact that parallel building does not work. I never anticipated this would happen. For me I just figured 'okay - don't use Definitely not your fault anyway. Well sleep time for me. Good night! |
As far as Anyway it's good that this issue is solved. I hope to continue with where I left off a few hours ago though I might have to pause again not too long after that. It's been a frustrating day but I hope to finish that task and that would mean that issue could be closed in the other repo. |
With xexyl/jparse@0c9ba66 I just successfully set this up in the jparse repo for when the code is actually populated! It works great. I just had to put in the Makefile some rules that would simply exit 0 and that way it would work. All good. When the code is actually populated then we can worry about updating those rules to 'do the right thing' but for now it's all good. Thanks again Anthony! UPDATE 0
|
After I fixed an issue with Would it be good to have a slow version of I can do this if you think this is a good idea. What do you think, Landon? |
Couldn't you simple remove the generated files before |
I would have added them as dependencies to the |
Well there are two sets of files. One set is the backup files - that which we generate in case someone cannot use flex/bison. That is what I am referring to.
Well It's been a long time and I'm too tired even to check but I'm pretty sure that the Makefile tries to run flex/bison but if it cannot then the backup files are used. Does that make sense? If not I can try again with my apologies. It was a rough night. |
So .. what do you think @lcn2? Should I update the workflow to install flex and bison and then run It seems like it might be a good idea but if you can think of some reason it s should not be done I will not. |
That sounds like a reasonable idea. |
Okay to not cause problems I'll wait on the other pull request and then look into it. Hopefully that one is taken care of now though. |
However ... |
Okay the work for this is done (unless there is an error in the test.yml file but I would look at actions before opening a pull request .. or trying to) but until the other pull request is resolved I will not open a new one due to GitHub's issue with multiple pull requests if one is closed or problematic. |
Perhaps this will answer the problem of why the workflows are not running automatically ? Or maybe better put how to fix it so they will? I'm not sure: I didn't read it in detail but it talks about approving them (that's the entire point of it) and maybe automating it. Oddly they do run automatically in the other repo so why not this one? |
Ok. Reading workflow approval if there are changes made to a workflow submitted in a pull-request, then the repo owner must approve the changes before they will run; its a security thing against someone submitting something naughty within the workflow. The repo. owner can "configure workflow approval requirements", see above link as to where this is done. This is something @lcn2 will have to address. Have you offered him any chocolate frosted sugar bombs lately? Make your own Chocolate Frosted Sugar Bombshttps://wonderlandrecipes.com/2018/08/23/chocolate-frosted-sugar-bombs/ |
That was the impression I got.
Hahaha. No but my mum told me to tell him that if he was round here she'd make her famous Double-layered Chocolate Fudge Cake in 2020/ferguson1: the best chocolate cake ever!
I guess that Landon would want it enabled without having to entice him with chocolate: esp as he made an enquiry of how to make it happen and because the other repo does it already .. but it's a nice idea I guess. I mean who wouldn't want chocolate ? :-) .. quite a few people but there might be something wrong with them :-) (though it is possible there are some 'things wrong with me' and I love chocolate so maybe it's the other way round? :-) ). |
Well its question of how much @lcn2 trusts us. Can he enable it by user, group, or world permissions? I suspect it might be an all or nothing option, which means being very careful if new contributors come along. |
Hmm .. but wouldn't it depend on if the workflow was installed? Or perhaps he can enable on push only but the other one, on pull request, not doing it? I don't know. |
Each push to GitHub should run the Makefile test target (to ensure we only ever push working code) as part of a CI workflow.
Unclear if a CD workflow should be added (never done one) to regenerate manifests, tarballs, snowballs, etc.
The text was updated successfully, but these errors were encountered: