Skip to content

auval -stress defaults to 20 seconds (vs default 600) (#135) #227

auval -stress defaults to 20 seconds (vs default 600) (#135)

auval -stress defaults to 20 seconds (vs default 600) (#135) #227

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
env:
BINARY_NAME: pluginval
BUILD_TYPE: Release
BUILD_DIR: Builds
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPLAY: :0 # Running pluginval GUI on linux needs this
jobs:
build:
name: Pluginval Build
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
app: pluginval
test-binary: ./pluginval
container: ubuntu:22.04
- name: macOS
os: macos-12
app: pluginval.app
test-binary: pluginval.app/Contents/MacOS/pluginval
- name: Windows
os: windows-latest
app: pluginval.exe
test-binary: ./pluginval.exe
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- name: Configure Docker container
if: ${{ matrix.name == 'Linux' }}
shell: bash
run: |
# install workflow deps needed because we're on a bare ubuntu container
apt update && apt install -y software-properties-common
add-apt-repository ppa:git-core/ppa -y
apt install -y p7zip-full git wget gpg
apt purge --auto-remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ jammy main'
apt update
apt install -y sudo cmake curl tree
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Environment Variables
shell: bash
run: |
VERSION=$(cat VERSION)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "APP_DIR=${{ env.BUILD_DIR }}/${{ env.BINARY_NAME }}_artefacts/${{ env.BUILD_TYPE }}" >> $GITHUB_ENV
echo "ZIP_FILE_NAME=${{ env.BINARY_NAME }}_${{ matrix.name }}.zip" >> $GITHUB_ENV
echo "JUCE_SHA1=$(git rev-parse HEAD:modules/juce)" >> $GITHUB_ENV
echo "PLUGIN_BUILD_DIR=modules/juce/Builds" >> $GITHUB_ENV
# This needs to be absolute to make action/cache happy
WORKING_DIR=$(pwd)
echo "PLUGIN_CACHE_PATH=$WORKING_DIR/modules/juce/Builds/examples/Plugins" >> $GITHUB_ENV
- name: Install dependencies (Linux)
if: ${{ matrix.name == 'Linux' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev ladspa-sdk webkit2gtk-4.0 libgtk-3-dev xvfb
sudo /usr/bin/Xvfb $DISPLAY &
- name: Make VST2 SDK available
shell: bash
run: |
curl -O ${{ secrets.VST2_SDK_URL }}
7z x vstsdk2.4.zip
echo "VST2_SDK_DIR=$(pwd)/vstsdk2.4" >> $GITHUB_ENV
- name: Import Certificates
uses: apple-actions/import-codesign-certs@v3
if: ${{ matrix.name == 'macOS' }}
with:
p12-file-base64: ${{ secrets.DEV_CERT_APP }}
p12-password: ${{ secrets.CERT_PASSWORD }}
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: v2-${{ matrix.name }}-${{ env.BUILD_TYPE }}
- name: Configure
shell: bash
run: cmake -B ${{ env.BUILD_DIR }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" .
- name: Build
shell: bash
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} --parallel 4
- name: Run Pluginval Tests
working-directory: ${{ env.APP_DIR }}
shell: bash
run: |
pwd
ls -ahl
${{ matrix.test-binary }} --run-tests
- name: Cache JUCE example plugin binaries
id: cache-plugins
uses: actions/cache@v3
with:
path: ${{ env.PLUGIN_CACHE_PATH }}
# Increment the version in the key below to manually break plugin cache
key: v7-${{ runner.os }}-${{ env.JUCE_SHA1 }}
- name: Build JUCE example plugins
if: steps.cache-plugins.outputs.cache-hit != 'true'
working-directory: modules/juce
shell: bash
run: |
cmake -B Builds -DJUCE_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
# Full list of targets https://gist.github.com/sudara/05be084efa371f4e43e21eb19ce04c50
# Be sure to manually break the cache in the previous step if you want to add/remove plugins
cmake --build Builds --config Release --target DSPModulePluginDemo_All --target MultiOutSynthPlugin_All
- name: Validate JUCE Plugin examples (VST3)
shell: bash
run: |
# Paths must be single quoted for bash not to escape the Windows backslash character \ used in absolute paths
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --validate '${{ env.PLUGIN_CACHE_PATH }}/DSPModulePluginDemo_artefacts/Release/VST3/DSPModulePluginDemo.vst3'
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --validate '${{ env.PLUGIN_CACHE_PATH }}/MultiOutSynthPlugin_artefacts/Release/VST3/MultiOutSynthPlugin.vst3'
- name: Validate JUCE Plugin examples (AU)
shell: bash
continue-on-error: true
if: ${{ matrix.name == 'macOS' }}
run: |
# Move to ~/Library/Audio to be picked up as valid by macOS
# We can't depend on COPY_PLUGIN_AFTER_BUILD, as most of the time we read binaries from the plugin cache
mkdir -p ~/Library/Audio/Plug-Ins/Components/
cp -R ${{ env.PLUGIN_CACHE_PATH }}/DSPModulePluginDemo_artefacts/Release/AU/DSPModulePluginDemo.component ~/Library/Audio/Plug-Ins/Components/
killall -9 AudioComponentRegistrar # kick the AU registrar
${{ env.APP_DIR }}/${{ matrix.test-binary }} --strictness-level 10 --validate ~/Library/Audio/Plug-Ins/Components/DSPModulePluginDemo.component
- name: Codesign (macOS)
if: ${{ matrix.name == 'macOS' }}
run: codesign --force -s "${{ secrets.DEVELOPER_ID_APPLICATION}}" -v ${{ env.APP_DIR }}/${{ matrix.app }} --entitlements ${{ env.BUILD_DIR }}/${{ env.BINARY_NAME }}_artefacts/JuceLibraryCode/${{ env.BINARY_NAME }}.entitlements --deep --strict --options=runtime --timestamp
- name: "Notarize and staple (macOS)"
if: ${{ matrix.name == 'macOS' }}
working-directory: ${{ env.APP_DIR }}
run: |
7z a -tzip ${{ env.ZIP_FILE_NAME }} ${{ matrix.app }}
xcrun notarytool submit ${{ env.ZIP_FILE_NAME }} --apple-id ${{ secrets.NOTARIZATION_USERNAME }} --password ${{ secrets.NOTARIZATION_PASSWORD }} --team-id ${{ secrets.TEAM_ID }} --wait
xcrun stapler staple ${{ matrix.app }}
rm ${{ env.ZIP_FILE_NAME }}
- name: Create zip files
working-directory: ${{ env.APP_DIR }}
run: 7z a -aoa -tzip ${{ env.ZIP_FILE_NAME }} ${{ matrix.app }}
- name: Upload zip files
uses: actions/upload-artifact@v4
with:
name: ${{ env.ZIP_FILE_NAME }}
path: ${{ env.APP_DIR }}/${{ env.ZIP_FILE_NAME }}
# Create release for tagged refs
deploy:
if: contains(github.ref, 'tags/v')
needs: build
runs-on: ubuntu-latest
steps:
# Needed to grab CHANGELIST.md
- uses: actions/checkout@v3
- name: Get Artifacts
uses: actions/download-artifact@v3
with:
path: ./
- name: Display structure of downloaded files
run: ls -la
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELIST.md
draft: true
files: |
CHANGELIST.md/*
pluginval_Linux.zip/*
pluginval_macOS.zip/*
pluginval_Windows.zip/*