setup-rhino3d - A GitHub Action for downloading and installing the latest published Rhino service release on Windows runners.
SimpleRhinoTest - A demonstrator of putting those two projects together to build and test a Rhino plugin. Includes a workflow for running automated testing with GitHub Actions.
We are looking for some feedback on how these projects could help your development experience.
Hello, I love the work you guys did, thanks!
Trying to unit test methods in a Rhino8 Grasshopper plugin with the SimpleRhinoTest, how would you need to set up a net7.0 Grasshopper Plugin .csproj before adding it as build/project dependency to test methods within (that include RhinoCommon and Grasshopper types)?
I keep running into Failed to create CoreCLR
Cheers Tim
This is amazing! thank you so much for putting the effort and sharing this, we really need some nice tools for CI with Rhino/Grasshopper. Many thanks!
I was wondering @fraguada@eirannejad if you have any recommendations to run tests in Python for both Rhino and Grasshopper in GitHub Actions. I was thinking to use you wonderful setup-rhino3d and run tests/scripts heedlessly via the RhinoInside or is there a better way? thanks
Rhino.Inside would be the way to do it. You’d need a token to get it loaded on a CI machine since it will be probably running on a windows server so just keep that in mind. rhinoinside on PyPI would be a good start to bootstrap rhino inside in your python 3 test process.
It would be great to be able to specify the major version to install (e.g. 6, 7, 8, wip).
Email does not seem to be technically required to download Rhino with your API. Making it optional would reduce friction.
README could clarify that a RHINO_TOKEN is required to run Rhino, but not really required to install it. This is relevant since install and run might be in different jobs or workflows. Or some workflows might not need to run at all, when they just install Rhino to get the DLLs for a plugin build.
An option to cache the install between jobs. In my tests, downloading and installing Rhino takes between 1 and 2 minutes on a windows2022 GitHub runner. It might be possible to reduce that with caching.
Setting the exact installed version (e.g. 8.11.24254.15001) as an action output. This can be used by workflows to setup caches that are invalidated when the version changes.
Being able to pin the action to specific versions (not just major). So, for example, pinning to 8.11.24254.15001 instead of 8 (I guess this would also require setting the release date as a parameter, since that’s required to get the download URL).
If you’re open to consider these, I can also open pull requests for them.
It supports the features I described above (more info in the readme). The action does caching, which changes time to get Rhino from 1-2 minutes to ~15 seconds if the cache is warm. It is actively tested for Rhino version from 6 to 9 WIP on Windows.
Thanks for the links! Separate from unit testing I’m thinking of some UI testing of a WPF-based Rhino Plugin. I think WinAppDriver would be a good tool for this, but are there ways that Rhino.Testing could improve my tests? I think having access to Rhino events during testing may be useful. I am guessing that this toolkit could be used alongside WinAppDriver for some fairly robust testing. Is this accurate?
So, if I understanded correctly, even I want to build my GH plugin with github action, McNeel will charge me for that because I need to use the compute-license?