-
Notifications
You must be signed in to change notification settings - Fork 24
Setup a CI to push generated bindings to a dedicated branch #60
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
Setup a CI to push generated bindings to a dedicated branch #60
Conversation
The idea looks good. What about adding Also, what if we somehow notify that there are new bindings? Is it possible to create an automatic issue in this repository? I am afraid that re-generated bindings will disappear silently in the notifications. |
Thanks, sounds good. Could you explain a bit more about the latter sentence? Do you mean
I think it's possible. Should it create a pull request, instead of a issue, when there are new bindings? Regarding notification, it seems it's also possible to notify on Discord: https://github.com/marketplace/actions/actions-for-discord. |
No no, it is just another trigger. We trigger on PR, you add cron (every 3 days), I suggest to also have
I was thinking about the following. If new bindings are generated, then we crate an issue saying: "The generated bindings have changed for these platforms" and some additional information (like diffs?), maybe the version of R and cargo used for generation. That way a maintainer can see there is an issue and decide what to do manually -- update bindings, publish new version to crates.io, ignore, etc. |
Ah, thanks for clarifying! Sorry, I didn't explain that this runs only on master and ignores pull requests (so I was a bit confused why pull request is related here but it's totally my fault...). You can see libR-sys/.github/workflows/test.yml Lines 281 to 282 in 4bc89ee
Then I think I get your point. Let's add |
I feel it might be a bit easier to use pull requests to include diffs, but I'll investigate both way. |
Here's example issue and pull request:
Looking at the actual diffs, I'm afraid this happens too often as there are such information like SVN revisions included. So, I'd stick with no issue or pull request for now. It's probably too complicated to handle programmatically. |
OK, let's see how it goes. |
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.
Fine by me. One issue we'll have to think through at some point is what to do with old bindings for older R versions that we're not covering anymore in our CI setup. Whenever a new R version is released, an old one drops out of coverage. Do we delete those bindings? Ideally we should, I think, since otherwise they can get out of sync with other changes in libR-sys.
Sorry, I forgot to answer this question on #57. I agree we should. Let's discuss this again on #57.
Thinking this again, maybe we can just ignore the devel bindings...? Let's revisit here when we need better mechanism to notify. |
Hmm, this fails because
|
@Ilia-Kosenkov libR-sys/.github/workflows/test.yml Lines 38 to 39 in 8fd988b
I already added an workaround for this (8fd988b), so this isn't very urgent, but I'd like to know the background. |
I am not sure, but I think we tested to make sure it works on the next MacOS version. I guess it can be removed. I am sorry that I did not write any comments, at that time we were just trying to add macos11 to get arm bindings. |
I see, then I'll create a pull request to update the runner. No worries. |
Related to #57
This pull request adds a job to gather the uploaded generated bindings and commit them to
generated_bindings
branch. We can create a pull request from that branch at any point we want to update the bindings. Of course we can commit this to the master branch, but I feel this should be done manually with checking the diffs by our eyes, at least at the moment.This does nothing if there's no diffs, and even if something goes wrong, this pushes to non-
master
, where no CI is set up. So, I believe this should be safe.This pull request adds a scheduled run setting. I use this on https://github.com/ggplot2-exts/gallery for a while and it works fine.
@Ilia-Kosenkov @clauswilke
Please let me know if there's any concern, or any topic to discuss.