R-macos / recipes

System for building static dependent libraries for CRAN packages
43 stars 15 forks source link

Add Github Action to test recipes #42

Open assignUser opened 1 year ago

assignUser commented 1 year ago

Hello!

This PR adds a workflow that can be used to test recipes when submitting changes or new additions. I based it on the one in feature/actions which was a great start and allowed me to quickly get the action going.

It has a manual mode that can be triggered via the gh actions UI (here once the workflow is merged) were select recipes to be build can be entered, or a build of all recipes can be triggered.

On pull_request and commits (to master) the workflow will determine the changed recipes and build only those.

s-u commented 1 year ago

Jacob, thanks. But can you clarify the purpose? As you saw the actions are intentionally in a separate branch because we don't want to actually run it since it takes way too long and thus there is no intention to merge this into the master branch. Besides, GHAs don't support the necessary hardware. So was the idea to improve the existing actions? If so what exactly is it you're trying to improve?

assignUser commented 1 year ago

But can you clarify the purpose?

Sure! I am looking at adding some recipes and don't have a mac. I saw the existing action, which was non functional due to deprecated runner tags etc. and decided to contribute an updated version that fixes the issues you have mentioned above:

As you saw the actions are intentionally in a separate branch because we don't want to actually run it since it takes way too long

I changed the action so it will check the changed recipes via git diff and only run those, e.g. here is a run for tiff and icu which takes <10min. This will of course go up with the number and complexity of dependencies built but I would think there would usually only be one recipe (+deps) changed/added per PR or commit so the runtime should okay.

If you don't want to run the action by default despite that feature it would still be possible to add this action to master but not have it run automatically. With workflow_dispatch the action can be triggered manually on-demand with inputs determening which recipes should be built.

Besides, GHAs don't support the necessary hardware

I assume you mean apple silcone? That is sadly true but will hopefully change "soon" (It is listed on the public github road map for q4 '23). But testing on intel mac beats not testing at all in my eyes and specifically on PRs should make it less work for you to test/review contributions.

So was the idea to improve the existing actions? If so what exactly is it you're trying to improve?

Yes, improve the action to make it easier to contribute working recipes that you have to spend less time on for manual checkout, test and review. I would of course be happy to integrate any changes or added features (e.g. the original action wasn't using build.sh so I kept it that way) you would like to see.

assignUser commented 10 months ago

@s-u any comment? If there is no interest I will close the PR.