-
Notifications
You must be signed in to change notification settings - Fork 42
Build VST3 for Linux #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||||||||||
| name: Build VST3 Linux | ||||||||||||||
|
|
||||||||||||||
| on: | ||||||||||||||
| push: | ||||||||||||||
| branches: ["**"] | ||||||||||||||
| pull_request: | ||||||||||||||
| workflow_dispatch: | ||||||||||||||
|
|
||||||||||||||
| jobs: | ||||||||||||||
| build: | ||||||||||||||
| strategy: | ||||||||||||||
| fail-fast: false | ||||||||||||||
| matrix: | ||||||||||||||
| include: | ||||||||||||||
| - arch: x86_64 | ||||||||||||||
| runner: ubuntu-24.04 | ||||||||||||||
| - arch: aarch64 | ||||||||||||||
| runner: ubuntu-24.04-arm | ||||||||||||||
|
|
||||||||||||||
| runs-on: ${{ matrix.runner }} | ||||||||||||||
| name: VST3 Linux ${{ matrix.arch }} | ||||||||||||||
|
|
||||||||||||||
| steps: | ||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||
|
|
||||||||||||||
| - name: Install dependencies | ||||||||||||||
| run: | | ||||||||||||||
| sudo apt-get update -qq | ||||||||||||||
| sudo apt-get install -y \ | ||||||||||||||
| cmake ninja-build build-essential pkg-config git \ | ||||||||||||||
| libfluidsynth-dev \ | ||||||||||||||
| libasound2-dev \ | ||||||||||||||
| libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev \ | ||||||||||||||
| libgl-dev libfreetype-dev libfontconfig1-dev \ | ||||||||||||||
| libharfbuzz-dev | ||||||||||||||
|
|
||||||||||||||
| - name: Cache JUCE | ||||||||||||||
| id: cache-juce | ||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||
| with: | ||||||||||||||
| path: /opt/JUCE | ||||||||||||||
| key: juce-7.0.12-${{ matrix.arch }} | ||||||||||||||
|
|
||||||||||||||
| - name: Clone and install JUCE | ||||||||||||||
| if: steps.cache-juce.outputs.cache-hit != 'true' | ||||||||||||||
| run: | | ||||||||||||||
| git clone --depth 1 --branch 7.0.12 \ | ||||||||||||||
| https://github.com/juce-framework/JUCE.git /tmp/JUCE | ||||||||||||||
| cmake -B /tmp/JUCE/build -S /tmp/JUCE \ | ||||||||||||||
| -G Ninja \ | ||||||||||||||
| -DCMAKE_BUILD_TYPE=Release \ | ||||||||||||||
| -DCMAKE_INSTALL_PREFIX=/opt/JUCE \ | ||||||||||||||
| -DJUCE_BUILD_EXTRAS=OFF \ | ||||||||||||||
| -DJUCE_BUILD_EXAMPLES=OFF | ||||||||||||||
| cmake --build /tmp/JUCE/build --target install | ||||||||||||||
|
|
||||||||||||||
| - name: Configure CMake | ||||||||||||||
| run: | | ||||||||||||||
| cmake -B build -S . \ | ||||||||||||||
| -G Ninja \ | ||||||||||||||
| -DCMAKE_BUILD_TYPE=Release \ | ||||||||||||||
| -DCMAKE_PREFIX_PATH=/opt/JUCE \ | ||||||||||||||
| -DBUILD_SHARED_LIBS=ON \ | ||||||||||||||
| -DJUCE_COPY_PLUGIN_AFTER_BUILD=FALSE | ||||||||||||||
|
|
||||||||||||||
| - name: Build VST3 | ||||||||||||||
| run: cmake --build build --target JuicySFPlugin_VST3 --parallel | ||||||||||||||
|
|
||||||||||||||
| - name: Locate VST3 binary | ||||||||||||||
| id: locate | ||||||||||||||
| run: | | ||||||||||||||
| SO=$(find build -name "*.so" -path "*/VST3/*" | head -1) | ||||||||||||||
|
||||||||||||||
| SO=$(find build -name "*.so" -path "*/VST3/*" | head -1) | |
| SO=$(find build -name "*.so" -path "*/VST3/*" | head -1) | |
| if [ -z "$SO" ]; then | |
| echo "ERROR: No VST3 .so binary found under build matching */VST3/*" | |
| exit 1 | |
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -431,7 +431,7 @@ void FluidSynthModel::processBlock(AudioBuffer<float>& buffer, MidiBuffer& midiM | |
| 0, | ||
| nullptr, | ||
| buffer.getNumChannels(), | ||
| buffer.getArrayOfWritePointers()); | ||
| const_cast<float**>(buffer.getArrayOfWritePointers())); | ||
|
||
| } | ||
|
|
||
| int FluidSynthModel::getNumPrograms() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow installs/caches JUCE under
/opt/JUCEbut the subsequentcmake --build ... --target installis not run withsudo, and/optis typically not writable on GitHub-hosted runners. This will likely fail at install time (and cache restore/save can also fail due to permissions). Use a user-writable prefix (e.g.$HOME/.localor${{ github.workspace }}/.deps/JUCE) or run the install and any requiredchownsteps withsudoconsistently.