Skip to content

fix: continue-on-error for Windows build + verify VST3 before collect #5

fix: continue-on-error for Windows build + verify VST3 before collect

fix: continue-on-error for Windows build + verify VST3 before collect #5

Workflow file for this run

name: Build Morph Plugin
on:
push:
branches: [main, master]
paths:
- 'Source/**'
- 'Libs/**'
- 'CMakeLists.txt'
- '.github/workflows/build-plugin.yml'
workflow_dispatch:
jobs:
# ── Mac (AU + VST3, Universal) ─────────────────────────────────────────────
build-mac:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Clone JUCE
run: git clone --depth=1 --branch=8.0.12 https://github.com/juce-framework/JUCE.git ../JUCE
- name: Configure (CMake)
run: |
cmake -B build-mac \
-DCMAKE_BUILD_TYPE=Release \
-DJUCE_PATH="$(pwd)/../JUCE" \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
- name: Build
run: cmake --build build-mac --config Release --parallel
- name: Collect artifacts
run: |
mkdir -p dist/mac
# VST3
find build-mac -name "*.vst3" -exec cp -R {} dist/mac/ \;
# AU component
find build-mac -name "*.component" -exec cp -R {} dist/mac/ \;
- name: Upload Mac artifacts
uses: actions/upload-artifact@v4
with:
name: Morph-Mac
path: dist/mac/
retention-days: 14
# ── Windows (VST3, x64) ────────────────────────────────────────────────────
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Clone JUCE
run: git clone --depth=1 --branch=8.0.12 https://github.com/juce-framework/JUCE.git ../JUCE
- name: Configure (CMake)
run: |
cmake -B build-win `
-G "Visual Studio 17 2022" -A x64 `
-DCMAKE_BUILD_TYPE=Release `
"-DJUCE_PATH=${{ github.workspace }}\..\JUCE"
- name: Build
# continue-on-error: juce_vst3_helper.exe post-build step can fail on CI
# (moduleinfo.json generation) even though the VST3 DLL compiled correctly.
continue-on-error: true
run: cmake --build build-win --config Release --parallel
- name: Collect VST3
run: |
$vst3 = Get-ChildItem -Path build-win -Filter "Morph.vst3" -Recurse -Directory | Select-Object -First 1
if (-not $vst3) { Write-Error "VST3 not found — compile failed"; exit 1 }
New-Item -ItemType Directory -Force -Path dist\win | Out-Null
Copy-Item -Path $vst3.FullName -Destination dist\win -Recurse
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: Morph-Windows
path: dist\win\
retention-days: 14
# ── Windows companion (Electron .exe installer) ───────────────────────────
build-companion-win:
runs-on: windows-2022
defaults:
run:
working-directory: CompanionWin
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install deps
run: npm install
- name: Build installer
run: npx electron-builder --win --x64 --publish=never
env:
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: WaterMorphHelper-Win-Setup
path: CompanionWin/dist/*.exe
retention-days: 14