Skip to content

Merge pull request #124 from 4ms/patch-cleanup #62

Merge pull request #124 from 4ms/patch-cleanup

Merge pull request #124 from 4ms/patch-cleanup #62

name: Build VCV Rack Plugin
on:
workflow_dispatch:
inputs:
linux_x64:
description: 'Build Linux x64 plugin'
required: true
default: false
type: boolean
win_x64:
description: 'Build Windows x64 plugin'
required: true
default: false
type: boolean
mac_x64:
description: 'Build Mac x64 plugin'
required: true
default: false
type: boolean
mac_arm64:
description: 'Build Mac arm64 plugin'
required: true
default: false
type: boolean
push:
tags:
- 'vcv-v[0-9]+.[0-9]+.[0-9]+'
branches:
- main
paths:
- 'shared/**'
- 'vcv/**'
- '!**.md' # Skip docs
- '!shared/svgextract' # Skip generator script (still run CI if generated files change)
- '!shared/gen_minblep' # Skip generator script (still run CI if generated files change)
- '!shared/tableGen' # Skip generator script (still run CI if generated files change)
env:
rack-sdk-version: latest
rack-plugin-toolchain-dir: /home/build/rack-plugin-toolchain
defaults:
run:
shell: bash
jobs:
build-lin-x64:
if: ${{ github.event_name == 'push' || inputs.linux_x64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: lin-x64
runs-on: ubuntu-latest
container:
image: ghcr.io/qno/rack-plugin-toolchain-win-linux
options: --user root
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build plugin
run: |
export PLUGIN_DIR=$GITHUB_WORKSPACE/vcv
pushd ${{ env.rack-plugin-toolchain-dir }}
make plugin-build-lin-x64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
name: lin-x64
build-win-x64:
if: ${{ inputs.win_x64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: win-x64
runs-on: ubuntu-latest
container:
image: ghcr.io/qno/rack-plugin-toolchain-win-linux
options: --user root
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build plugin
run: |
export PLUGIN_DIR=$GITHUB_WORKSPACE/vcv
pushd ${{ env.rack-plugin-toolchain-dir }}
make plugin-build-win-x64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
name: win-x64
build-mac-x64:
if: ${{ inputs.mac_x64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: mac_x64
runs-on: macos-12
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Get Rack-SDK
run: |
pushd $HOME
wget -O Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-x64.zip
unzip Rack-SDK.zip
- name: Build plugin
run: |
cd vcv
export RACK_DIR=$HOME/Rack-SDK
export CROSS_COMPILE=x86_64-apple-darwin
make dep
make dist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: vcv/dist/*.vcvplugin
name: mac-x64
build-mac-arm64:
if: ${{ inputs.mac_arm64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: mac_arm64
runs-on: macos-12
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Get Rack-SDK
run: |
pushd $HOME
wget -O Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-arm64.zip
unzip Rack-SDK.zip
- name: Build plugin
run: |
cd vcv
export RACK_DIR=$HOME/Rack-SDK
export CROSS_COMPILE=arm64-apple-darwin
make dep
make dist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: vcv/dist/*.vcvplugin
name: mac-arm64
publish:
if: startsWith(github.ref, 'refs/tags/vcv-v')
name: Publish plugin
runs-on: ubuntu-latest
needs: [build-lin-x64, build-win-x64, build-mac-x64, build-mac-arm64]
steps:
- uses: actions/download-artifact@v3
with:
path: _artifacts
- uses: FranzDiebold/github-env-vars-action@v2
- uses: softprops/action-gh-release@v1
with:
name: "Development Build: ${{ env.CI_REF_NAME }}"
body: "VCV plugin version as of tag ${{ env.CI_REF_NAME }}"
files: |
_artifacts/**/*.vcvplugin