Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .github/docker/linux-ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update \
&& wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > /usr/share/keyrings/llvm.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/llvm.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" > /etc/apt/sources.list.d/llvm.list \
&& apt-get update \
&& apt-get install -y clang-18 lld-18 ninja-build libstdc++-12-dev libasound2-dev libjack-jackd2-dev libcurl4-openssl-dev libx11-dev libxinerama-dev libxext-dev libxcomposite-dev libxcursor-dev libxrandr-dev libxrender-dev libfreetype6-dev libfontconfig1-dev libwebkit2gtk-4.1-dev libglu1-mesa-dev mesa-common-dev ladspa-sdk intel-oneapi-ipp-devel \
&& apt-get install -y clang-18 lld-18 ninja-build libstdc++-12-dev libasound2-dev libjack-jackd2-dev libcurl4-openssl-dev libx11-dev libxi-dev libxinerama-dev libxext-dev libxcomposite-dev libxcursor-dev libxrandr-dev libxrender-dev libfreetype6-dev libfontconfig1-dev libwebkit2gtk-4.1-dev libglu1-mesa-dev mesa-common-dev ladspa-sdk intel-oneapi-ipp-devel \
&& ln -sf /usr/bin/ld.lld-18 /usr/local/bin/ld.lld \
&& rm -rf /var/lib/apt/lists/*

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list

sudo apt-get update && sudo apt install libasound2-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.1-dev libglu1-mesa-dev xvfb ninja-build intel-oneapi-ipp-devel
sudo apt-get update && sudo apt install libasound2-dev libx11-dev libxi-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.1-dev libglu1-mesa-dev xvfb ninja-build intel-oneapi-ipp-devel
sudo /usr/bin/Xvfb $DISPLAY &

- name: Install IPP (Windows)
Expand All @@ -84,12 +84,12 @@ jobs:
run: brew install ninja osxutils

- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
submodules: recursive

- name: Cache the build
uses: mozilla-actions/sccache-action@v0.0.10
uses: mozilla-actions/sccache-action@v0.0.11

- name: Configure
run: cmake -B ${{ env.BUILD_DIR }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ matrix.extra-flags }} .
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:

- name: Pluginval
run: |
curl -LO "https://github.com/Tracktion/pluginval/releases/download/v1.0.3/pluginval_${{ runner.os }}.zip"
curl -LO "https://github.com/Tracktion/pluginval/releases/download/v1.0.4/pluginval_${{ runner.os }}.zip"
7z x pluginval_${{ runner.os }}.zip
${{ matrix.pluginval-binary }} --strictness-level 10 --verbose --validate "${{ env.VST3_PATH }}"

Expand Down Expand Up @@ -250,12 +250,12 @@ jobs:
uses: actions/download-artifact@v8

- name: Create Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
prerelease: true
# download-artifact puts these files in their own dirs...
# Using globs sidesteps having to pass the version around
files: |
*/*.exe
*/*.zip
*/*.dmg
*/*.pkg
2 changes: 1 addition & 1 deletion .github/workflows/linux-ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
packages: write
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Login to ghcr
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
Expand Down
13 changes: 10 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@ On macOS for universal binary: `-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"`

**CMake Modules**:
- `PamplejuceVersion.cmake` - Reads VERSION file, optional auto-bump patch level
- `Assets.cmake` - Auto-includes all files in assets/ as binary data
- `Tests.cmake` - Configures Catch2 test target
- `Benchmarks.cmake` - Configures Catch2 benchmark target
- `PamplejuceFunctions.cmake` - One include that defines the `pamplejuce_*` functions below (and turns off their legacy include-time behavior)
- `PamplejuceIPP.cmake` - Intel IPP integration (optional)

Target setup happens via explicit function calls in `CMakeLists.txt`, not at include time:
- `pamplejuce_add_assets()` - Includes all files in assets/ as binary data (from `Assets.cmake`)
- `pamplejuce_add_tests()` - Configures the Catch2 test target (from `Tests.cmake`)
- `pamplejuce_add_benchmarks()` - Configures the Catch2 benchmark target (from `Benchmarks.cmake`)
- `pamplejuce_shared_code_defaults()` - C++23, fast math (from `SharedCodeDefaults.cmake`)
- `pamplejuce_xcode_prettify()` - Xcode folder/scheme cleanup (from `XcodePrettify.cmake`)

Note: after `include(PamplejuceFunctions)`, a plain `include(Tests)` (or Assets, etc.) is a no-op - call the function instead.

**Test Discovery**: Uses `catch_discover_tests()` with `PRE_TEST` discovery mode for Xcode compatibility.

## Key Configuration
Expand Down
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ project(${PROJECT_NAME} VERSION ${CURRENT_VERSION})
# Log build environment info (after project() so compiler info is available)
include(PamplejuceLog)

# Defines the pamplejuce_* functions we call below (also fetches Catch2 at include time)
include(PamplejuceFunctions)

# JUCE is setup as a submodule in the /JUCE folder
# Locally, you must run `git submodule update --init --recursive` once
# and later `git submodule update --remote --merge` to keep it up to date
Expand Down Expand Up @@ -100,8 +103,8 @@ clap_juce_extensions_plugin(TARGET "${PROJECT_NAME}"
CLAP_ID "${BUNDLE_ID}"
CLAP_FEATURES audio-effect)

# Enable fast math, C++20 and a few other target defaults
include(SharedCodeDefaults)
# Enable fast math, C++23 and a few other target defaults
pamplejuce_shared_code_defaults()


# Manually list all .h and .cpp files for the plugin
Expand All @@ -113,10 +116,10 @@ file(GLOB_RECURSE SourceFiles CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/sou
target_sources(SharedCode INTERFACE ${SourceFiles})

# Adds a BinaryData target for embedding assets into the binary
include(Assets)
pamplejuce_add_assets()

# MacOS only: Cleans up folder and target organization on Xcode.
include(XcodePrettify)
pamplejuce_xcode_prettify()

# This is where you can set preprocessor definitions for JUCE and your plugin
target_compile_definitions(SharedCode
Expand Down Expand Up @@ -163,10 +166,10 @@ target_link_libraries("${PROJECT_NAME}" PRIVATE SharedCode)
include(PamplejuceIPP)

# Everything related to the tests target
include(Tests)
pamplejuce_add_tests()

# A separate target for Benchmarks (keeps the Tests target fast)
include(Benchmarks)
pamplejuce_add_benchmarks()

# Output some config for CI (like our PRODUCT_NAME)
include(GitHubENV)
2 changes: 1 addition & 1 deletion JUCE
Submodule JUCE updated 2750 files
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Pamplejuce is a ~~template~~ lifestyle for creating and building JUCE plugins in
Out-of-the-box, it:

1. Runs C++23
2. Uses JUCE 8.x as a git submodule (tracking develop).
2. Uses JUCE 9.x as a git submodule (tracking develop).
3. Uses CPM for dependency management.
3. Relies on CMake 3.25 and higher for cross-platform building.
4. Has [Catch2](https://github.com/catchorg/Catch2) v3.7.1 for the test framework and runner.
4. Has [Catch2](https://github.com/catchorg/Catch2) v3.8.1 for the test framework and runner.
5. Includes a `Tests` target and a `Benchmarks` target with examples to get started quickly.
6. Has [Melatonin Inspector](https://github.com/sudara/melatonin_inspector) installed as a JUCE module to help relieve headaches when building plugin UI.

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Benchmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TEST_CASE ("Boot performance")

// due to complex construction logic of the editor, let's measure open/close together
meter.measure ([&] (int /* i */) {
auto editor = plugin.createEditorIfNeeded();
auto editor = plugin.createEditorAndMakeActive();
plugin.editorBeingDeleted (editor);
delete editor;
return plugin.getActiveEditor();
Expand Down
2 changes: 1 addition & 1 deletion cmake
3 changes: 2 additions & 1 deletion source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ void PluginProcessor::setCurrentProgram (int index)
const juce::String PluginProcessor::getProgramName (int index)
{
juce::ignoreUnused (index);
return {};
// Steinberg's VST3 validator fails plugins whose single default program has no name
return "Default";
}

void PluginProcessor::changeProgramName (int index, const juce::String& newName)
Expand Down
6 changes: 6 additions & 0 deletions tests/PluginBasics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ TEST_CASE ("Plugin instance", "[instance]")
CHECK_THAT (testPlugin.getName().toStdString(),
Catch::Matchers::Equals ("Pamplejuce Demo"));
}

SECTION ("program name")
{
// Steinberg's VST3 validator fails plugins whose programs have no name
CHECK (testPlugin.getProgramName (0).isNotEmpty());
}
}


Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[[maybe_unused]] static void runWithinPluginEditor (const std::function<void (PluginProcessor& plugin)>& testCode)
{
PluginProcessor plugin;
const auto editor = plugin.createEditorIfNeeded();
const auto editor = plugin.createEditorAndMakeActive();

testCode (plugin);

Expand Down
Loading