Skip to content

v0.7

v0.7 #5

name: Build and Release PerceptoMap
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
BUILD_TYPE: Release
BUILD_DIR: build
jobs:
build:
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows
os: windows-latest
generator: "Visual Studio 17 2022"
artifact_path: PerceptoMap_artefacts/Release/VST3/PerceptoMap.vst3
zip_name: PerceptoMap_vst3_${{ github.ref_name }}_windows_x64.zip
- name: Linux
os: ubuntu-latest
generator: "Ninja"
artifact_path: PerceptoMap_artefacts/Release/VST3/PerceptoMap.vst3
zip_name: PerceptoMap_vst3_${{ github.ref_name }}_linux_x64.zip
- name: macOS x86
os: macos-13
generator: "Unix Makefiles"
artifact_path: PerceptoMap_artefacts/Release/VST3/PerceptoMap.vst3
zip_name: PerceptoMap_vst3_${{ github.ref_name }}_macOS_x64.zip
- name: macOS arm64
os: macos-latest
generator: "Unix Makefiles"
artifact_path: PerceptoMap_artefacts/Release/VST3/PerceptoMap.vst3
zip_name: PerceptoMap_vst3_${{ github.ref_name }}_macOS_arm.zip
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up MSBuild (Windows only)
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v2
- name: Install dependencies (Linux only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y \
build-essential \
ninja-build \
libasound2-dev \
libx11-dev \
libxext-dev \
libxinerama-dev \
libxrandr-dev \
libxcursor-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libfreetype6-dev \
libfontconfig1-dev \
libcurl4-openssl-dev \
libgtk-3-dev
- name: Configure CMake
run: >
cmake -B ${{ env.BUILD_DIR }}
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DVST3_GENERATE_MANIFEST=ON
-DCMAKE_GENERATOR="${{ matrix.generator }}"
- name: Build
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }}
- name: Zip Plugin (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$pluginPath = "${{ env.BUILD_DIR }}\${{ matrix.artifact_path }}"
if (!(Test-Path $pluginPath)) {
Write-Error "Plugin not found at expected path: $pluginPath"
exit 1
}
Compress-Archive -Path $pluginPath -DestinationPath "${{ env.BUILD_DIR }}\${{ matrix.zip_name }}"
- name: Zip Plugin (Unix)
if: matrix.os != 'windows-latest'
run: |
cd "${{ env.BUILD_DIR }}/${{ matrix.artifact_path }}/.."
zip -r ../../../${{ matrix.zip_name }} PerceptoMap.vst3
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.BUILD_DIR }}/${{ matrix.zip_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}