Skip to content

Commit e78353b

Browse files
authored
Pluginval integration (#89)
* Verify VST3 and AU versions * Simplify build * Fixed Windows local build * Added Linux local dev env(devcontainer) * Docs updated
1 parent 01e8f54 commit e78353b

File tree

17 files changed

+228
-244
lines changed

17 files changed

+228
-244
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu
2+
3+
RUN apt update
4+
RUN apt install -y git
5+
RUN apt install -y software-properties-common
6+
RUN apt install -y ca-certificates
7+
RUN apt install -y wget
8+
RUN apt install -y curl
9+
RUN apt install -y ssh
10+
RUN apt install -y sudo
11+
RUN apt install -y build-essential
12+
RUN apt install -y python3 python3-pip
13+
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin

.devcontainer/devcontainer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"image": "ubuntu:20.04"
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"forwardPorts": [
6+
3000
7+
]
38
}

.github/workflows/build.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,13 @@ jobs:
7171
- name: Upload build artifacts
7272
uses: actions/upload-artifact@v3
7373
with:
74-
name: macos
74+
name: macos-build
7575
path: build/Release/peakeater_artefacts/Release/DMG/*.dmg
76+
- name: Upload test artifacts
77+
uses: actions/upload-artifact@v3
78+
with:
79+
name: macos-test
80+
path: build/Release/peakeater_artefacts/Release/Pluginval/*.txt
7681

7782
windows:
7883
name: Windows
@@ -91,8 +96,13 @@ jobs:
9196
- name: Upload build artifacts
9297
uses: actions/upload-artifact@v3
9398
with:
94-
name: windows
99+
name: windows-build
95100
path: build/Release/peakeater_artefacts/Release/Archive/*.zip
101+
- name: Upload test artifacts
102+
uses: actions/upload-artifact@v3
103+
with:
104+
name: windows-test
105+
path: build/Release/peakeater_artefacts/Release/Pluginval/*.txt
96106

97107
linux:
98108
name: Linux
@@ -113,5 +123,10 @@ jobs:
113123
- name: Upload build artifacts
114124
uses: actions/upload-artifact@v3
115125
with:
116-
name: linux
126+
name: linux-build
117127
path: build/Release/peakeater_artefacts/Release/Archive/*.zip
128+
- name: Upload test artifacts
129+
uses: actions/upload-artifact@v3
130+
with:
131+
name: linux-test
132+
path: build/Release/peakeater_artefacts/Release/Pluginval/*.txt

.github/workflows/publish_release_draft.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- master
6-
6+
77
jobs:
88
build:
99
name: Build
@@ -27,17 +27,32 @@ jobs:
2727
- name: Download macOS build
2828
uses: actions/download-artifact@v3
2929
with:
30-
name: macos
30+
name: macos-build
31+
path: release
32+
- name: Download macOS test results
33+
uses: actions/download-artifact@v3
34+
with:
35+
name: macos-test
3136
path: release
3237
- name: Download Windows build
3338
uses: actions/download-artifact@v3
3439
with:
35-
name: windows
40+
name: windows-build
41+
path: release
42+
- name: Download Windows test results
43+
uses: actions/download-artifact@v3
44+
with:
45+
name: windows-test
3646
path: release
3747
- name: Download Linux build
3848
uses: actions/download-artifact@v3
3949
with:
40-
name: linux
50+
name: linux-build
51+
path: release
52+
- name: Download Linux test results
53+
uses: actions/download-artifact@v3
54+
with:
55+
name: linux-test
4156
path: release
4257
- name: Get release version
4358
id: get-version

.gitignore

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
# MacOS indexing files
22
.DS_Store
33

4+
# Various vscode logs
5+
/.vscode/*.log
6+
47
# Build dir
58
/build
69
/test/build
710

11+
# CMake workflow
812
CMakeUserPresets.json
913

10-
# Projucer auto-gen files
11-
/JuceLibraryCode
12-
13-
# Python cache
14-
Scripts/Release/__pycache__
15-
16-
# node
17-
node_modules
18-
19-
# Various vscode logs
20-
/.vscode/*.log
21-
2214
# Env
2315
.env
2416
config/.env

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"recommendations": [
33
"ms-vscode.cpptools",
44
"ms-python.python",
5+
"josetr.cmake-language-support-vscode",
56
"github.vscode-github-actions",
67
"shd101wyy.markdown-preview-enhanced",
78
"streetsidesoftware.code-spell-checker",

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,10 @@
159159
"zipresp"
160160
],
161161
"sonarlint.pathToCompileCommands": "${workspaceFolder}/build/Release/compile_commands.json",
162+
// Bandaid because occasinally git is not added to the Path which breaks just
163+
// Keep untill this resolved - https://github.com/casey/just/issues/1517
164+
// VS Code-only since it is installation issue which works fine on a CI
165+
"terminal.integrated.env.windows": {
166+
"Path": "${env:Path};C:\\Program Files\\Git\\bin"
167+
},
162168
}

CMakeLists.txt

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
cmake_minimum_required(VERSION 3.15)
22
project(${CMAKE_PROJECT_NAME} VERSION ${CMAKE_PROJECT_VERSION})
33

4-
# For this to work, the following ENV variables must be set:
5-
# - MACOS_APPLE_DEVELOPER_ID: Apple Developer ID(for ex. "Developer ID Application: John Doe (XXXXX6XX42)")
6-
option(CODESIGN "Codesign plugins and bundle(macOS only)" OFF)
4+
include(FetchContent)
5+
include(CTest)
76

87
# Export compile_commands.json
98
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
109

1110
find_package(JUCE CONFIG REQUIRED)
1211

13-
include(FetchContent)
1412
FetchContent_Declare(
1513
clap-juce-extensions
1614
GIT_REPOSITORY https://github.com/free-audio/clap-juce-extensions.git
@@ -95,64 +93,89 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
9593
juce::juce_recommended_lto_flags
9694
juce::juce_recommended_warning_flags)
9795

96+
# Where to store the result of the Pluginval run
97+
set(_PLUGINVAL_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}_artefacts/${CMAKE_BUILD_TYPE}/Pluginval")
98+
99+
# Adding targets for testing, signing and packaging which are very platform-specific
100+
# NOTE: only macOS supports signing at the moment
98101
if(APPLE)
99-
if(CODESIGN)
100-
if(NOT DEFINED ENV{MACOS_APPLE_DEVELOPER_ID})
101-
message(FATAL_ERROR "CODESIGN option is turned ON, but MACOS_APPLE_DEVELOPER_ID env variable is not defined")
102-
endif()
102+
# Test we haven't missed any compiler options. Makes sense only on macOS at the moment
103+
add_test(NAME CompileOptions COMMAND python3 ${PROJECT_SOURCE_DIR}/test/test_compile_options.py --compile_commands=${CMAKE_BINARY_DIR}/compile_commands.json)
104+
105+
# Marks as CFBundle. Setting this globally because:
106+
# 1. Without it, TARGET_BUNDLE_DIR won't work
107+
# 2. TARGET_BUNDLE_DIR is used while bundling, signing and testing for macOS
108+
set_target_properties(${CMAKE_PROJECT_NAME}_AU ${CMAKE_PROJECT_NAME}_CLAP ${CMAKE_PROJECT_NAME}_LV2 ${CMAKE_PROJECT_NAME}_VST3 PROPERTIES BUNDLE TRUE)
109+
110+
# Test VST3 and AU with Pluginval
111+
add_test(NAME Pluginval_VST3
112+
COMMAND pluginval --strictness-level 10 --verbose --skip-gui-tests --validate-in-process --output-dir ${_PLUGINVAL_OUT_DIR} $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_VST3>)
113+
add_test(NAME Pluginval_AU
114+
COMMAND pluginval --strictness-level 10 --verbose --skip-gui-tests --validate-in-process --output-dir ${_PLUGINVAL_OUT_DIR} $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_AU>)
103115

104-
# Codesign all plugins before we've bundled them
116+
# Optionally, codesign all plugins before we've bundled them(ensure it with tests)
117+
if(DEFINED ENV{MACOS_APPLE_DEVELOPER_ID})
105118
add_custom_command(TARGET ${CMAKE_PROJECT_NAME}_AU VERBATIM POST_BUILD
106119
COMMAND codesign --force -s $ENV{MACOS_APPLE_DEVELOPER_ID} -v $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_AU> --deep --strict --options=runtime --timestamp
107120
COMMENT "Codesigning AU")
121+
add_test(NAME Codesign_AU COMMAND codesign -dv --verify --verbose=4 $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_AU>)
122+
108123
add_custom_command(TARGET ${CMAKE_PROJECT_NAME}_CLAP VERBATIM POST_BUILD
109124
COMMAND codesign --force -s $ENV{MACOS_APPLE_DEVELOPER_ID} -v $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_CLAP> --deep --strict --options=runtime --timestamp
110125
COMMENT "Codesigning CLAP")
126+
add_test(NAME Codesign_CLAP COMMAND codesign -dv --verify --verbose=4 $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_CLAP>)
127+
111128
add_custom_command(TARGET ${CMAKE_PROJECT_NAME}_LV2 VERBATIM POST_BUILD # lv2 is special, sign only TARGET_FILE
112129
COMMAND codesign --force -s $ENV{MACOS_APPLE_DEVELOPER_ID} -v $<TARGET_FILE:${CMAKE_PROJECT_NAME}_LV2> --deep --strict --options=runtime --timestamp
113130
COMMENT "Codesigning LV2")
131+
add_test(NAME Codesign_LV2 COMMAND codesign -dv --verify --verbose=4 $<TARGET_FILE:${CMAKE_PROJECT_NAME}_LV2>)
132+
114133
add_custom_command(TARGET ${CMAKE_PROJECT_NAME}_VST3 VERBATIM POST_BUILD
115134
COMMAND codesign --force -s $ENV{MACOS_APPLE_DEVELOPER_ID} -v $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_VST3> --deep --strict --options=runtime --timestamp
116135
COMMENT "Codesigning VST3")
136+
add_test(NAME Codesign_VST3 COMMAND codesign -dv --verify --verbose=4 $<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_VST3>)
117137
endif()
118138

119139
# Build DMG
120140
set(_OSX_DMG_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}_artefacts/${CMAKE_BUILD_TYPE}/DMG")
121141
set(_OSX_DMG_FILE "${_OSX_DMG_DIR}/${CMAKE_PROJECT_NAME}-v${CMAKE_PROJECT_VERSION}-macOS-universal.dmg")
122-
123-
# macOS specific. Marks as CFBundle. Otherwise - TARGET_BUNDLE_DIR wouldn't work
124-
set_target_properties(${CMAKE_PROJECT_NAME}_AU ${CMAKE_PROJECT_NAME}_CLAP ${CMAKE_PROJECT_NAME}_LV2 ${CMAKE_PROJECT_NAME}_VST3 PROPERTIES BUNDLE TRUE)
125142
get_target_property(_LV2_OUT_DIR ${CMAKE_PROJECT_NAME}_LV2 LIBRARY_OUTPUT_DIRECTORY) # Getting it like this since lv2 folder is not a bundle, so TARGET_BUNDLE_DIR wont work
126-
add_custom_target(dmg ALL
143+
add_custom_target(DMG ALL
144+
BYPRODUCTS ${_OSX_DMG_FILE}
127145
VERBATIM
128146
COMMAND ${CMAKE_COMMAND} -E make_directory ${_OSX_DMG_DIR}
129147
COMMAND dmgbuild -s ${PROJECT_SOURCE_DIR}/config/dmgbuild.py -D au=$<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_AU> -D clap=$<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_CLAP> -D lv2=${_LV2_OUT_DIR} -D vst3=$<TARGET_BUNDLE_DIR:${CMAKE_PROJECT_NAME}_VST3> "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}" ${_OSX_DMG_FILE}
130148
COMMENT "Building DMG")
131-
add_dependencies(dmg ${CMAKE_PROJECT_NAME}_AU ${CMAKE_PROJECT_NAME}_CLAP ${CMAKE_PROJECT_NAME}_LV2 ${CMAKE_PROJECT_NAME}_VST3)
149+
add_dependencies(DMG ${CMAKE_PROJECT_NAME}_AU ${CMAKE_PROJECT_NAME}_CLAP ${CMAKE_PROJECT_NAME}_LV2 ${CMAKE_PROJECT_NAME}_VST3)
132150

133-
if(CODESIGN)
134-
# Codesign, notarise and staple DMG
135-
add_custom_command(TARGET dmg VERBATIM POST_BUILD
151+
# Optionally, codesign, notarize and stable the DMG(ensure it with test)
152+
if(DEFINED ENV{MACOS_APPLE_DEVELOPER_ID})
153+
add_custom_command(TARGET DMG VERBATIM POST_BUILD
136154
COMMAND codesign --force -s $ENV{MACOS_APPLE_DEVELOPER_ID} -v ${_OSX_DMG_FILE} --deep --strict --options=runtime --timestamp
137155
COMMAND xcrun notarytool submit ${_OSX_DMG_FILE} --keychain-profile "APPLE_SIGN_PROFILE" --wait
138156
COMMAND xcrun stapler staple ${_OSX_DMG_FILE}
139157
COMMENT "Codesigning, notarizing and stapling DMG")
158+
add_test(NAME Codesign_DMG COMMAND codesign -dv --verify --verbose=4 ${_OSX_DMG_FILE})
140159
endif()
141160
else()
161+
# The way of getting path to .vst3 is tricky since actual bin is inside ARCHIVE_OUTPUT_DIRECTORY
162+
set(_VST3_BUNDLE "$<GENEX_EVAL:$<TARGET_PROPERTY:${CMAKE_PROJECT_NAME}_VST3,ARCHIVE_OUTPUT_DIRECTORY>>/${CMAKE_PROJECT_NAME}.vst3")
163+
# Getting it like this since lv2 folder is not a bundle, so TARGET_BUNDLE_DIR wont work
164+
get_target_property(_LV2_OUT_DIR ${CMAKE_PROJECT_NAME}_LV2 LIBRARY_OUTPUT_DIRECTORY)
165+
142166
# Archive everything into ZIP
143167
set(_ARCHIVE_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}_artefacts/${CMAKE_BUILD_TYPE}/Archive")
144168
set(_ARCHIVE_FILE "${_ARCHIVE_DIR}/${CMAKE_PROJECT_NAME}-v${CMAKE_PROJECT_VERSION}-${CMAKE_HOST_SYSTEM_NAME}-x86_64.zip")
145-
146-
# otherwise, TARGET_BUNDLE_DIR wouldn't work
147-
get_target_property(_LV2_OUT_DIR ${CMAKE_PROJECT_NAME}_LV2 LIBRARY_OUTPUT_DIRECTORY) # Getting it like this since lv2 folder is not a bundle, so TARGET_BUNDLE_DIR wont work
148169
add_custom_target(archive ALL
149170
VERBATIM
150171
COMMAND ${CMAKE_COMMAND} -E make_directory ${_ARCHIVE_DIR}
151-
COMMAND ${CMAKE_COMMAND} -E tar cf ${_ARCHIVE_FILE} --format=zip $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}_CLAP> ${_LV2_OUT_DIR} $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}_VST3>
172+
COMMAND ${CMAKE_COMMAND} -E tar cf ${_ARCHIVE_FILE} --format=zip $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}_CLAP> ${_LV2_OUT_DIR} ${_VST3_BUNDLE}
152173
COMMENT "Archiving everything")
153174
add_dependencies(archive ${CMAKE_PROJECT_NAME}_CLAP ${CMAKE_PROJECT_NAME}_LV2 ${CMAKE_PROJECT_NAME}_VST3)
154-
endif()
155175

156-
# Print available CMake targets for the debugging purpose
157-
get_property(target_names DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS)
158-
message(DEBUG " Available CMake targets are: ${target_names}")
176+
# Test VST3 with Pluginval(only non-macOS-specific format supported)
177+
# NOTE#1: Unlike macOS, TARGET_FILE_DIR is used because unlike macOS is a file here
178+
# NOTE#2: Only Windows supports GUI on a CI, thus check for it
179+
add_test(NAME Pluginval_VST3
180+
COMMAND pluginval --strictness-level 10 --verbose $<$<NOT:$<BOOL:${WIN32}>>:--skip-gui-tests> --validate-in-process --output-dir ${_PLUGINVAL_OUT_DIR} ${_VST3_BUNDLE})
181+
endif()

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Table of Contents
3030
- [Resizing](#resizing)
3131
- [VST3, AU, LV2 and CLAP Support](#vst3-au-lv2-and-clap-support)
3232
- [macOS, Windows and Linux Support](#available-on-all-major-platforms)
33+
- [Verified by Pluginval](#verified-by-pluginval)
3334
- [Installation](#installation)
3435
- [macOS](#macos)
3536
- [Windows](#windows)
@@ -151,6 +152,12 @@ You can use it on macOS, Windows or Linux.
151152

152153
> **Warning** Linux support is experimental and may be unstable.
153154
155+
### <a id="verified-by-pluginval"></a> Verified by Pluginval <img src="assets/pluginval.png" alt="Pluginval" height="20"/>
156+
157+
> pluginval is a cross-platform plugin validator and tester application. It is designed to be used by both plugin and host developers to ensure stability and compatibility between plugins and hosts. [GitHub Project Link](https://github.com/Tracktion/pluginval/tree/develop)
158+
159+
VST3 and AU versions are verified by [Tracktion Pluginval](https://www.tracktion.com/develop/pluginval) for all platforms. Maximum possible strictness level 10 is used. For macOS and Linux - Headless Mode is being used and GUI Mode is used for Windows. Starting from v0.6.5, you may find proofs of Pluginval verification in the "Assets" section on the Release page(*.txt files are split by platform and plugin format).
160+
154161
<!-- INSTALLATION -->
155162

156163
## Installation
@@ -211,8 +218,12 @@ Extract the zip and copy the plugin in a format of your choice into the folder w
211218
- [Just](https://github.com/casey/just) 1.13.0+
212219
- [Python](https://www.python.org) 3.11.4+
213220
- [Brew](https://brew.sh) 4.0.23+(macOS only)
221+
- [C++ Build Tools for Visual Studio 2022](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)(Windows only)
214222
- [Chocolatey](https://chocolatey.org) 1.4.0+(Windows only)
215223

224+
> **Note**<br />
225+
> It is recommended to use PowerShell on Windows
226+
216227
### Building
217228

218229
```sh
@@ -286,11 +297,3 @@ Distributed under the GPL-3.0 License. See [`LICENSE.md`](https://github.com/vvv
286297

287298
<!-- MARKDOWN LINKS & IMAGES -->
288299
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
289-
290-
[issues-shield]: https://img.shields.io/github/issues/vvvar/PeakEater?style=for-the-badge
291-
[issues-url]: https://github.com/vvvar/PeakEater/issues
292-
[license-shield]: https://img.shields.io/github/license/vvvar/PeakEater?style=for-the-badge
293-
[license-url]: https://github.com/vvvar/PeakEater/blob/master/LICENSE.md
294-
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
295-
[linkedin-url]: https://www.linkedin.com/in/vladyslav-voinov-5126a793/
296-
[product-screenshot]: assets/screenshots/main.png

assets/pluginval.png

2.62 KB
Loading

0 commit comments

Comments
 (0)