Skip to content

Add LV2 format and Linux builds #9

Add LV2 format and Linux builds

Add LV2 format and Linux builds #9

Workflow file for this run

name: Build
on:
push:
branches: [master]
tags: ['v*']
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libfreetype6-dev libx11-dev \
libxrandr-dev libxcursor-dev libxinerama-dev libwebkit2gtk-4.1-dev \
libcurl4-openssl-dev
- name: Install ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ runner.os }}-ccache
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build build --config Release
- name: Collect artifacts (macOS)
if: runner.os == 'macOS'
run: |
mkdir -p artifacts-vst3 artifacts-au artifacts-lv2
for dir in build/*/; do
found=$(find "$dir" -maxdepth 1 -name "*_artefacts" -type d 2>/dev/null)
[ -z "$found" ] && continue
release_dir="$found/Release"
[ -d "$release_dir/VST3" ] && cp -R "$release_dir/VST3"/*.vst3 artifacts-vst3/ 2>/dev/null || true
[ -d "$release_dir/AU" ] && cp -R "$release_dir/AU"/*.component artifacts-au/ 2>/dev/null || true
[ -d "$release_dir/LV2" ] && cp -R "$release_dir/LV2"/*.lv2 artifacts-lv2/ 2>/dev/null || true
done
- name: Collect artifacts (Linux)
if: runner.os == 'Linux'
run: |
mkdir -p artifacts-vst3 artifacts-lv2
for dir in build/*/; do
found=$(find "$dir" -maxdepth 1 -name "*_artefacts" -type d 2>/dev/null)
[ -z "$found" ] && continue
release_dir="$found"
[ -d "$release_dir/VST3" ] && cp -R "$release_dir/VST3"/*.vst3 artifacts-vst3/ 2>/dev/null || true
[ -d "$release_dir/LV2" ] && cp -R "$release_dir/LV2"/*.lv2 artifacts-lv2/ 2>/dev/null || true
done
- name: Collect artifacts (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path artifacts-vst3
Get-ChildItem -Path build -Recurse -Filter "*.vst3" -Directory | ForEach-Object {
Copy-Item -Path $_.FullName -Destination artifacts-vst3 -Recurse -Force
}
- name: Upload VST3 artifacts
uses: actions/upload-artifact@v4
with:
name: smartelectronix-${{ runner.os }}-VST3
path: artifacts-vst3/
- name: Upload AU artifacts
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: smartelectronix-macOS-AU
path: artifacts-au/
- name: Upload LV2 artifacts
if: runner.os != 'Windows'
uses: actions/upload-artifact@v4
with:
name: smartelectronix-${{ runner.os }}-LV2
path: artifacts-lv2/
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: all-artifacts
- name: Zip artifacts
run: |
cd all-artifacts
for dir in */; do
(cd "$dir" && zip -r "../../${dir%/}.zip" .)
done
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Smartelectronix Plugins ${{ github.ref_name }}
files: '*.zip'
generate_release_notes: true