RhinoScriptCompiler CI/CD Pipeline Issues

Hi there,

I’ve been trying to set up a CI/CD pipeline for our team so that they can push grasshopper and python scripts to a git repo and then have the repo automatically compile all the scripts into a valid Rhino Plugin and then deploy that to our modellers.

The issue is, the script compiler is hardcoded to build to the temp drive, which our build machine doesn’t have access to, and breaks the whole endeavor.

I see two solutions to this:

  • one is to allow local pathing for the temp directory in the RhinoScriptCompiler and testing it in a system account environment
  • two is, if the team is comfortable, just open sourcing the compiler so people can make changes as necessary

When (eventually, I presume) we can host our own internal package managers, this will be an important part of the code deployment process.

1 Like

@will - is this something you can help with?

I checked the RhinoScriptCompiler code and I found two references to the system temporary files directory – Path.GetTempPath() and CSharpCodeProvider (which apparently uses the system temp folder by default). In both cases, I wonder if manually setting the TMP and/or TEMP env var(s) would fix things. That seems to be the approach taken by others…

As for private package repositories, have you seen this?

1 Like

Cheers Will I’ll check that approach today.

Regarding private yak servers, see Dharman’s statement here (we’re both at the same firm) : Yak for private distribution? - #11 by dharman

Happy to elaborate on this further if you would like.

We can always change the code to use a different directory for temporary work if this approach doesn’t pan out.

Hey folks we’re going to take some time to test this properly on our end as a number of things could be causing issues - we’ll report back once we have identified what we think are any specific problems related to the exe itself.

General takeaway for now is, a version of the rhino compiler designed specifically for build machines would be a very cool thing to exist - would allow us to push .gh files to git and wrap all our hard work into shiny plugins for our team!

@chris.welch I tried setting up a GitHub Action that uses RhinoScriptCompiler.exe. With the benefit of debug builds, I found that all the errors happened when writing output – the design of the application expects an interactive terminal, but this isn’t the case when running CI builds. I fixed the errors and I’ll send a daily build when I have one, so you can try it out.

2 Likes

That would be fantastic Will, thank you very much!

The custom build that Will sent me worked perfectly on our build machine.

Now if only we had a private yak server to deploy this to :wink:

Fantastic. The updated RhinoScriptCompiler.exe will be included in next week’s Rhino 7.9 RC release.