Cabbage Logo
Back to Cabbage Site

Automatic plugin export with CI/CD: Azure Pipeline workflow

Hi,

I spent the last few weeks automating my plugin distribution and I thought it would be great to share it with the community!

The steps and code below can automatically:

  • Export VST, VST3, AU in a CI/CD pipeline
  • Relink Csound so end users don’t have to install Csound on their machine
  • Codesign the VST, VST3 and AU exports
  • Create installers (including Presets/ folder), and synthesize the installers into a single .pkg file that will install every file at the right place and make sure the Presets folder has read/write rights
  • Codesign and notarize the installer

These steps were well explained in Rory’s tutorials, but I wanted to automate the process because my first plugin was very hard to maintain due to the complexity of the MacOS process and the need to support multiple OS (Windows and MacOS).
Please note these steps are for MacOS only for now, but I’ll edit this message to add Windows support as well in the future.

I am currently using Azure Pipeline to export and distribute my plugins, but these steps could be useful for GitHub Actions as well.

Environment setup

You need an Azure Devops account. The free tier account is quite generous so it’s a great way to start without having to spend any money on the tooling.

You also need a Developer ID Certificate, steps here:

Once you have your developer certificate, upload it in the Pipeline Library.
Make sure you also store your passwords here.


Once these variables/files are stored, your pipeline should be ready and you can switch to the next step.

Code

Since the files are quite massive, I decided to upload them in this repository: https://github.com/julienbeisel/cabbage_distribution/tree/main

They are not “ready to use” as you need to edit the fields and replace a few things:

  • Make sure you use your developer ID details (email, password, team id) and replace the dummy variable names in these files
  • This pipeline is used for my upcoming plugin called AudioShaper2, released by my company Nymano Audio. You can replace these values by your plugin/company name.
  • Make sure the paths I use are the one you’d like to use as well (eg: Presets are in the Music/ folder)

You can then use the files provided in the Github repo to run your Pipeline.

If there are no issues, the pipeline should be able to produce this artifact:

This process is quite complex, so feel free to ask me any questions if you need some help. I will edit this message when I improve the workflow to make sure the latest scripts are available here.

Next step for me: Add Windows export support (I need to find a Windows machine first).

I hope these resources will help some of you!

Julien/nymano

5 Likes

They absolutely will. This is gold :slight_smile:

1 Like

Hi @rorywalsh,

I’m trying to use the CLIConverter on Windows. I have access to a distant computer.

Any ideas why the following command doesn’t work? It looks like the paths are not parsed correctly.

C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master>"C:\Program Files\Cabbage/CLIConverter.exe" --export-VST="C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master/audioshaper2.csd"
Usage: CLIConverter --export-TYPE="name of csd file" --destination="some absolute or relative dir"
If you leave out the destination, exports will be placed into the same folder as the csd file

Un sous-répertoire ou un fichier C:\Program existe déjà.
Une erreur s’est produite lors du traitement de : C:\Program.
Un sous-répertoire ou un fichier Files\Cabbage\CLIConverter.exe\les\Cabbage\CLIConverter.exe--export-VST existe déjà.
Une erreur s’est produite lors du traitement de : Files\Cabbage\CLIConverter.exe\les\Cabbage\CLIConverter.exe--export-VST.
Un sous-répertoire ou un fichier C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master\audioshaper2.csd existe déjà.
Une erreur s’est produite lors du traitement de : C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master\audioshaper2.csd.
'cp' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

Here is an auto translation:

C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master>"C:\Program Files\Cabbage/CLIConverter.exe" --export-VST="C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master/audioshaper2.csd"
Usage: CLIConverter --export-TYPE="name of csd file" --destination="some absolute or relative dir"
If you leave out the destination, exports will be placed into the same folder as the csd file

A subdirectory or C:\Program file already exists.
An error has occurred while processing : C:\Program.
A subdirectory or file Files\Cabbage\CLIConverter.exe\les\Cabbage\CLIConverter.exe--export-VST already exists.
An error occurred while processing : Files\Cabbage\CLIConverter.exe\les\Cabbage\CLIConverter.exe--export-VST.
A subdirectory or file C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master\audioshaper2.csd already exists.
An error occurred while processing : C:\Users\Shadow\Documents\Transient-Shaper-Toolkit-master\Transient-Shaper-Toolkit-master\audioshaper2.csd.
cp' is not recognized as an internal or external command
or external command, an executable program or a command file.

I tried to tweak the paths, use relative paths, etc. but nothing works. I confirm I can use Cabbage to export the VST and it works fine.

Thanks!

I’ll take a look. I don’t think the cli till has been used much on Windows. I’ll let you know :+1:

Thanks Rory. I tried to move Cabbage at the root of C:// to check if the no spaces in the CLIConverter path would solve the issue. It removed an alert but “cp” isn’t available on Windows, so the export is still not working.

I am not experienced in C++, but I think modifying these lines could help:

The path could be surrounded by quotes to avoid issues with spaces breaking the command, and the cp command could be replaced by a native windows command, or be launched in Powershell.

That sounds right. And it would explain why it ran ok for me on my machine as I have those command line tools installed. The most robust solution would be to avoid calling any command line tools and simply copy the files directly in C++ instead. I’m traveling at the moment but I’ll try to get to this as soon as I can.

1 Like

@nymano I just pushed a fix for this now. It passes my tests. Can you try it when you get a chance :+1:

Hi Rory,

Thank you, I confirm it’s working well locally!
I spent too many hours trying to make it work in Azure Pipeline. I was able to install Cabbage silently in the Agent, I was able to move the csound files in the right folder, but the CLI command wasn’t working. After reviewing carefully your Installer.iss file, I figured out I also needed to set the Csound PATH variable. It’s now working as well!

I’ll create installers and test the plugins, after that I’ll update the first post of this topic. It could also be great to run pluginval, but I’ll save this task for later.

This is great news. I think this is one of the best contributions to the project is a long time :slight_smile:

1 Like