Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Build Plugins

# Trigger builds on master branch pushes, version tags, and pull requests
on:
push:
branches: [ master, feat/gh-build ] # Temporarily add feature branch for testing
tags: [ 'v*' ] # Also trigger on version tags (v1.0.0, etc.)
pull_request:
branches: [ master ]

jobs:
# Build VST plugins for macOS using the native build process from README
build-macos:
runs-on: macos-latest

steps:
# Get the source code including vstgui submodule (required for VST plugins)
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive # Essential: pulls in vstgui dependency

# Install build dependencies using Homebrew
- name: Install dependencies
run: |
brew update
brew upgrade cmake # Ensure we have latest CMake for building

# Build using the same commands from README: cmake . && make
- name: Configure and Build
run: |
cmake .
make

# Run tests to ensure plugins work correctly
- name: Test
run: make test

# Package all .vst files into a zip for distribution
- name: Package artifacts
run: |
zip -r macos-plugins-${{ github.sha }}.zip */*.vst

# Store build artifacts for 30 days (and for release job to download)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-plugins
path: macos-plugins-*.zip
retention-days: 30 # Auto-cleanup after 30 days to save storage

# Build VST plugins for Windows using the PowerShell build script
build-windows:
runs-on: windows-latest
strategy:
matrix:
platform: [x86, x64]
config: [Release]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build
run: |
.\build.ps1 -Verbose ${{ matrix.platform }} ${{ matrix.config }}

- name: Test
run: ctest

# Package Windows plugins from the CMakeBuild output directory
- name: Package artifacts
run: |
Compress-Archive -Path "CMakeBuild/${{ matrix.platform }}/${{ matrix.config }}/*" -DestinationPath "windows-plugins-${{ matrix.platform }}-${{ github.sha }}.zip"

# Store artifacts separately for each platform (x86/x64)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows-plugins-${{ matrix.platform }}
path: windows-plugins-*.zip
retention-days: 30

# Create rolling releases on every master push with all platform builds
release:
needs: [build-macos, build-windows] # Wait for both platform builds to complete
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/feat/gh-build' # Allow testing on feature branch

steps:
# Download all the zip files created by the build jobs above
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

# Create a GitHub release with all platform builds attached
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: "build-${{ github.run_number }}" # Auto-incrementing build numbers
name: "Rolling Release - Build ${{ github.run_number }}"
files: artifacts/**/*.zip # Attach all platform zip files
body: |
## Smartelectronix Plugins - Rolling Release

**Build #${{ github.run_number }}** - Built from commit ${{ github.sha }}

**Commit**: ${{ github.event.head_commit.message }}

### Downloads:
- **macOS**: macos-plugins.zip
- **Windows x86**: windows-plugins-x86.zip
- **Windows x64**: windows-plugins-x64.zip

*This is a rolling release that gets updated on every push to master.*
draft: false
prerelease: true # Mark as prerelease since it's a rolling build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Built-in token for creating releases
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions Common/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ function(add_vstsdk VST_TARGET)
source_group("vst2.x" FILES ${VST_SOURCE})
source_group("Interfaces" FILES ${VST_INTERFACE})

# Fix for macOS C++11 narrowing error in VST SDK
if(APPLE)
set_source_files_properties(
${STEINBERG_DIR}/public.sdk/source/vst2.x/audioeffect.cpp
PROPERTIES COMPILE_FLAGS "-Wno-c++11-narrowing")
endif()

target_sources(${VST_TARGET} PUBLIC ${VST_SOURCE} ${VST_INTERFACE})
target_include_directories(${VST_TARGET} PUBLIC ${STEINBERG_DIR})

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Open source versions of all bram @ smartelectronix plugins. 20 Years after worki

You can find the original smartelectronix pages here: http://bram.smartelectronix.com

[![Build Plugins](https://github.com/bdejong/smartelectronix/actions/workflows/build.yml/badge.svg?branch=feat/gh-build)](https://github.com/bdejong/smartelectronix/actions/workflows/build.yml)


## Donations

http://paypal.me/BramdeJong
Expand Down
25 changes: 20 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ Param
$Configuration = 'Release',

[Parameter(Mandatory=$false, Position=3)]
[ValidateSet('Visual Studio 14 2015','Visual Studio 15 2017')]
[ValidateSet('Visual Studio 14 2015','Visual Studio 15 2017','Visual Studio 17 2022')]
[String]
$Generator = 'Visual Studio 14 2015',
$Generator = 'Visual Studio 17 2022',

[Parameter(Mandatory=$false)]
[Switch]
Expand All @@ -69,8 +69,23 @@ $targets | ForEach-Object {
# Setup
$treeDirectory = "CMakeBuild/$_"

if ($_ -eq "x64") {
$postfix = " Win64"
# Handle architecture for different VS versions
if ($Generator -eq "Visual Studio 17 2022") {
# VS 2022 uses -A flag for architecture
if ($_ -eq "x64") {
$archFlag = @("-A", "x64")
} else {
$archFlag = @("-A", "Win32")
}
$generatorName = $Generator
} else {
# VS 2015/2017 use old naming convention
if ($_ -eq "x64") {
$generatorName = "$Generator Win64"
} else {
$generatorName = $Generator
}
$archFlag = @()
}

# Generate project
Expand All @@ -79,7 +94,7 @@ $targets | ForEach-Object {
}

# Generate visual studio project files
cmake -E chdir $treeDirectory cmake -G "$Generator$postfix" ../../
cmake -E chdir $treeDirectory cmake -G $generatorName @archFlag ../../
if ($LASTEXITCODE -ne 0) { throw "cmake failed" }

# Build
Expand Down