Cabbage Logo
Back to Cabbage Site

Is automating plugin exporting in the cloud possible?

I’ve seen the mention of a CLIConverter that can be used within Cabbage. Would it be possible to somehow install Cabbage’s CLI or whatever is used from the JUCE framework in GitHub Actions? I’m interested in whether plugin exporting for Windows, MacOS, and Linux can be automated from a public repository.

Edit: found this topic that says yes, it is possible.


How exactly would I start actually implementing this? Is it even worth it or should I stick to manual exporting on physical / virtual machines?

@nymano was looking into this recently. I’m surprised github didn’t appear in our brief discussion as its actions are quite comparable to the other systems mentioned. Anyway, I’m not sure how far he got, but to answer your question, yes it should be absolutely possible. Your action/pipeline would need to do this:

  • install Csound from the command line, easily done on MacOS and Linux - on Windows this is a little tricker as many of the installers UI driven. What I typically do there is zip the Csound install dir and put it somewhere online where my action/pipeline can access it, then I download, and unzip to the expected location
  • repeat the above steps for Cabbage
  • write a script that will look through one of your instrument folders and use the CLIConvertor command line tool to export your plugins - see here for details
  • finally move your exported plugins to your pipeline/action artefact directory

That’s it in theory, let us know how it goes :+1:

1 Like

Hi Rory,

It’s still on my todo list, and I’ll work on it for the V2 of my plugin.

@circuitdust feel free to reach out if you want some help, setting a public example repository would be very helpful for other developers. That’s what I’d like to do but I’m swamped right now.

Julien

That was what I had in mind too. After I get these two plugins finished, I am going to use one of them as a testing environment for setting up GitHub Actions. If I get it working, the workflow file can be copied into an example repo.

I am trying to set up Azure CI/CD pipelines, here is my current progress:

I followed the steps provided by Rory: Install Csound, install silently Cabbage, use CLIConverter to generate a VST.

The .yaml file is quite simple:

trigger:
- main

pool:
  vmImage: 'windows-2019'

steps:
- powershell: Invoke-WebRequest -Uri 'https://github.com/rorywalsh/cabbage/releases/download/v2.9.0/Cabbage64Setup-2.9.0.exe' -OutFile '$(Pipeline.Workspace)/Cabbage64Setup-2.9.0.exe'
- script: |
    pip install requests
    python --version
    python install_csound.py 
- powershell: Start-Process -FilePath "$(Pipeline.Workspace)/Cabbage64Setup-2.9.0.exe" -ArgumentList '/silent' -Wait
- script: '"C:/Program Files/Cabbage/CLIConverter.exe" --export-VST="$(Build.SourcesDirectory)/clip.csd" --destination="clip.vst"'

For the Csound installation I am using what Rory is using for the Cabbage Pipeline:

import requests
import zipfile

shouldVerifyDownload = True

url = "https://github.com/rorywalsh/cabbage/releases/download/v2.0.00/csound-windows_x64-6.16.0.zip"
r = requests.get(url, allow_redirects=True, verify=shouldVerifyDownload)
open("csound-windows_x64-6.16.0.zip", "wb").write(r.content)

with zipfile.ZipFile("csound-windows_x64-6.16.0.zip", "r") as zip_ref:
    zip_ref.extractall("C:/Program Files")

Everything is working until the CLIConverter command:

Starting: CmdLine
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.231.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents: shell
"C:/Program Files/Cabbage/CLIConverter.exe" --export-VST="D:\a\1\s/clip.csd" --destination="clip.vst"
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\63b6b034-bb27-4335-998a-09598a1508b9.cmd""
##[error]Cmd.exe exited with code '-1073741515'.
Finishing: CmdLine

If someone knows what could be wrong, it could be very helpful! I’ll continue to work on it in the meantime…

Julien/nymano

I’m just curious, but does that command for the CLI converter work locally when you try it?

I didn’t have the chance to try it (I only have access to a Mac right now), but it could be great to try it.

I think there might be an issue with the install in the Azure Pipeline (this is what the 1073741515 error might indicate), I need to investigate. It can be Csound or Cabbage, I need figure out how to check it.

How are installing Cabbage? I don’t think I ever got windows installers to run on Azure, so I just zipped the contents and put them online like I did for the Csound

I’m using this command:

powershell: Start-Process -FilePath “$(Pipeline.Workspace)/Cabbage64Setup-2.9.0.exe” -ArgumentList ‘/silent’ -Wait

It does succeed, but it might be safer to just mimic the installer and move the files myself… Because on Azure I can’t browse the environment/VM so I can’t know if everything is actually installed.

I know I can find CLIConverter.exe because when I edit the path used to call it the error is different, but I don’t know if the other Cabbage files are installed properly.

Btw, I wouldn’t use that build, I think the CLI convertor was only in its infancy back then. Better to get a new dev release, upload it somewhere and download/install that. :+1:

1 Like

Hi Rory,

FYI here is my current progress:

Windows: still stuck at the CLIConvertor step -> I will try to borrow a Windows computer to try it locally first

MacOS: I was able to :

  • Install Csound
  • Install Cabbage
  • Export the plugin
  • Relink/embed csound in the vst
  • Codesign the plugin
  • Create an installer

Using Azure Pipelines! And I can download the plugin and use it in Live with no issues.

It took me 2 days though :smiley:

I still don’t know if I should notarize the pkg in the Pipeline, but I didn’t have time to check if it was possible yet.

I’ll continue working on it in the next few days, and when it’s done I’ll try to release a guide or sample code to help other to it. The pipeline .yaml file is quite simple but it’s so tricky to make it work!

1 Like

That’s fantastic. Super super useful for anyone who doesn’t have access to a Mac for development and testing. The CLI stuff is definitely more thoroughly tested on Mac. If I get a chance I will test on a Windows machine soon to see that it works :+1:

Yes definitely! For MacOS development you still need to generate the certificates locally though, I don’t know if you can do everything in the cloud.

Also, this is my first time using Azure Pipelines so I still have a lot to learn. For example, there is no caching so every time the pipeline runs I re-install everything from scratch (including Cabbage download etc.), but it currently takes 1mn to create a VST using the clip.csd example.

Can’t wait to finish the Windows one as well so I can update my plugins more frequently!

1 Like

I think it’s worth zipping the contents as Rory said to avoid the hassle of performing an installation each time and test the rest of the workflow on Windows. I’ll see if I can get that zip uploaded to a test repo by the end of the week.

I have uploaded the Windows binaries of Cabbage here: https://github.com/niflheimmer/badhumors/releases/download/ignore/Cabbage-2.9.193-Windows.zip

It simply has Cabbage, the CLI tool, and everything else that isn’t the manual, examples, icons, or uninstall executable, which reduces the size from 255 MB to about 92.5 MB uncompressed.

I have yet to test the Github Actions workflow myself, but I am finishing up a plugin whose repo will serve as my playground for this. :grin:

1 Like