| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- # LYNX's own effects and instruments as CLAP / VST3 (and on Linux LV2) plugins for other hosts: the optional download of a release
- # (rounds 180b and 188b, docs/PLUGIN_EXPORT.md). Every entry of src/plugin/plugins.def with built = 1 or 2 is in the one
- # CLAP; built = 2 also gets a VST3 of its own. Never inside the app's installer.
- #
- # Run by hand (workflow_dispatch, any branch) or by release.yml (workflow_call), which attaches the archives to the draft
- # release. Nothing here publishes anything.
- #
- # version the package label (input, or CMakeLists.txt's version + the commit)
- # windows-build (ubuntu) Zig cross build with LYNX_BUILD_PLUGINS=1, LYNX-Plugins-<label>-win-x64.zip
- # windows-check (windows) from that zip: plugexporttest on every plugin, pluginval (strictness 10) on each .vst3,
- # clap-validator on the .clap
- # linux (ubuntu 22.04 container, glibc 2.35) CMake + GCC 13, glibc check, the same three checks under Xvfb
- # with editor pictures, plugexporttest and lv2lint on each LV2 bundle (round 190pk),
- # LYNX-Plugins-<label>-linux-x86_64.tar.xz
- # macos (macos-15) CMake universal (arm64 + x86_64), ad hoc signature, the same three checks,
- # LYNX-Plugins-<label>-macos-universal.tar.xz
- # sums LYNX-Plugins-<label>-SHA256SUMS.txt over the three archives (artifact LYNX-Plugins-<label>-all)
- name: Plugins
- on:
- workflow_dispatch:
- workflow_call:
- inputs:
- label:
- description: 'package label (release.yml passes its own)'
- type: string
- default: ''
- permissions:
- contents: read
- env:
- ZIG_VERSION: 0.14.1
- ZIG_SHA256: 24aeeec8af16c381934a6cd7d95c807a8cb2cf7df9fa40d359aa884195c4716c
- JUCE_VERSION: 8.0.4
- JUCE_SHA256: 0effe9823a6fd8a4f98e5c08be7d308350e417b2d15dcf34011e778fefbbf005
- PLUGINVAL_VERSION: v1.0.4
- LV2LINT_COMMIT: 9661902c922650de99bd68e69ee0380d299aed3e # lv2lint 0.17.151, 2026-08-20 (round 190pk)
- CLAP_VALIDATOR: https://github.com/free-audio/clap-validator/releases/download/0.4.1/clap-validator-0.4.1-127-g152b982
- jobs:
- version:
- name: Version
- runs-on: ubuntu-24.04
- outputs:
- label: ${{ steps.version.outputs.label }}
- steps:
- - uses: actions/checkout@v5
- - name: Label
- id: version
- shell: bash
- env:
- INPUT_LABEL: ${{ inputs.label }}
- run: |
- version="$(sed -n 's/^project(LYNX VERSION \([0-9]*\.[0-9]*\.[0-9]*\(\.[0-9]*\)\{0,1\}\).*/\1/p' CMakeLists.txt)"
- [[ -n "$version" ]] || { echo "::error::no version in CMakeLists.txt"; exit 1; }
- label="${INPUT_LABEL:-$version-${GITHUB_SHA::7}}"
- echo "label=$label" >> "$GITHUB_OUTPUT"
- echo "LYNX plugins $label"
- windows-build:
- name: Windows x64 (build)
- needs: version
- runs-on: ubuntu-24.04
- env:
- LABEL: ${{ needs.version.outputs.label }}
- steps:
- - uses: actions/checkout@v5
- - name: Cache toolchain
- id: cache
- uses: actions/cache@v5
- with:
- path: ~/opt
- key: toolchain-zig${{ env.ZIG_VERSION }}-juce${{ env.JUCE_VERSION }}-${{ env.ZIG_SHA256 }}-${{ env.JUCE_SHA256 }}
- - name: Download Zig and JUCE
- if: steps.cache.outputs.cache-hit != 'true'
- shell: bash
- run: |
- mkdir -p ~/opt && cd ~/opt
- curl -fsSL -o zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-x86_64-linux-$ZIG_VERSION.tar.xz"
- echo "$ZIG_SHA256 zig.tar.xz" | sha256sum -c -
- tar xf zig.tar.xz && rm zig.tar.xz
- curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
- echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
- tar xzf juce.tar.gz && mv "JUCE-$JUCE_VERSION" "juce-$JUCE_VERSION" && rm juce.tar.gz
- - name: Build
- shell: bash
- run: |
- set -o pipefail
- # (round 190ov: memory and disk every 30 s in the log, to tell why a runner dies mid-build)
- ( while true; do echo "[runner] $(date +%T) mem used $(free -m | awk '/Mem/{print $3"/"$2}') MB, swap $(free -m | awk '/Swap/{print $3"/"$2}') MB, / free $(df -h / | awk 'NR==2{print $4}')"; sleep 30; done ) &
- # JOBS=2 (round 190ov, as round-build.yml since round 190of): with one compile per core the hosted runner ran out of
- # memory and died ("lost communication" / "shutdown signal") once the pack grew by 7 effects and LYNX Model
- LYNX_BUILD_PLUGINS=1 ZIG="$HOME/opt/zig-x86_64-linux-$ZIG_VERSION/zig" JUCE_DIR="$HOME/opt/juce-$JUCE_VERSION" OUT=build-win JOBS=2 \
- ./scripts/build-windows-zig.sh 2>&1 | grep -v '^1 warning generated\.$'
- - name: Package
- shell: bash
- run: |
- command -v 7zz > /dev/null || command -v 7z > /dev/null || { sudo apt-get update -q && sudo apt-get install -y -q 7zip; }
- ./scripts/package-plugins.sh windows build-win/plugins "$LABEL" dist
- mkdir -p tool && cp build-win/plugexporttest.exe tool/
- # (round 190pu: the .7z next to the zip must unpack to exactly the zip's files)
- mkdir z s && unzip -q "dist/LYNX-Plugins-$LABEL-win-x64.zip" -d z && "$(command -v 7zz || command -v 7z)" x -bso0 -bsp0 "dist/LYNX-Plugins-$LABEL-win-x64.7z" -os
- diff -r z s && echo ".7z and .zip hold the same files"
- ls -la dist
- - uses: actions/upload-artifact@v7
- with:
- name: LYNX-Plugins-${{ env.LABEL }}-win-x64
- path: dist/*
- if-no-files-found: error
- - uses: actions/upload-artifact@v7
- with:
- name: plugexporttest-windows
- path: tool/plugexporttest.exe
- if-no-files-found: error
- windows-check:
- name: Windows x64 (check)
- needs: [version, windows-build]
- runs-on: windows-2022
- env:
- LABEL: ${{ needs.version.outputs.label }}
- steps:
- - uses: actions/checkout@v5
- with:
- sparse-checkout: scripts
- - uses: actions/download-artifact@v8
- with:
- name: LYNX-Plugins-${{ env.LABEL }}-win-x64
- path: dist
- - uses: actions/download-artifact@v8
- with:
- name: plugexporttest-windows
- path: tool
- - name: Host test, pluginval, clap-validator (on what the zip holds)
- shell: bash
- env:
- LYNX_TEST_MODE: '1'
- run: |
- curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_Windows.zip" && unzip -q pv.zip -d pv
- curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o cv.zip "$CLAP_VALIDATOR-windows.zip" && unzip -q cv.zip -d cv
- for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done
- unzip -q "dist/LYNX-Plugins-$LABEL-win-x64.zip" -d pkg
- ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" tool/plugexporttest.exe pv/pluginval.exe "$(find cv -name 'clap-validator.exe' | head -1)" reports
- - uses: actions/upload-artifact@v7
- if: ${{ !cancelled() }}
- with:
- name: plugin-reports-windows
- path: reports/*
- linux:
- name: Linux x86_64
- needs: version
- runs-on: ubuntu-24.04
- container:
- image: ubuntu:22.04
- env:
- LABEL: ${{ needs.version.outputs.label }}
- DEBIAN_FRONTEND: noninteractive
- MAX_GLIBC: '2.35'
- steps:
- - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
- run: |
- # (round 190qd) Launchpad's PPA answered 503 on half the requests during the 0.1.31 release: apt retries
- echo 'Acquire::Retries "30";' > /etc/apt/apt.conf.d/80-lynx-retries
- apt-get update -q
- apt-get install -y -q --no-install-recommends ca-certificates curl git gnupg software-properties-common
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
- apt-get update -q
- apt-get install -y -q gcc-13 g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils unzip xz-utils \
- fonts-dejavu-core libasound2-dev libjack-jackd2-dev libx11-dev libxrandr-dev libxinerama-dev \
- libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev libcurl4 \
- lv2-dev liblilv-dev libxxhash-dev python3-pip
- - uses: actions/checkout@v5
- - name: JUCE (checksum verified)
- run: |
- git config --global --add safe.directory "$GITHUB_WORKSPACE"
- curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
- echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
- mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
- - name: Build
- run: |
- cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
- -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF
- cmake --build build --target lynx_plugins -- -k 0
- - name: Package
- run: ./scripts/package-plugins.sh linux build/plugins "$LABEL" dist
- - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
- run: |
- mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-linux-x86_64.tar.xz" -C pkg
- find pkg -type f \( -name '*.so' -o -name '*.clap' \) -print0 | xargs -0 -n1 ./scripts/check-linux-compat.sh
- # round 190pk: lv2lint (not packaged for Ubuntu) from its author's repository at a fixed commit, for the LV2 bundles
- - name: lv2lint
- run: |
- pip3 install -q meson
- # (rollup 0.1.33 step 31) a failed fetch is tried again, as the validators' downloads (5 tries, 10 s apart)
- for i in 1 2 3 4 5; do git clone -q https://git.open-music-kontrollers.ch/~hp/lv2lint "$RUNNER_TEMP/lv2lint-src" && break; rm -rf "$RUNNER_TEMP/lv2lint-src"; sleep 10; done
- git -C "$RUNNER_TEMP/lv2lint-src" checkout -q "$LV2LINT_COMMIT"
- cd "$RUNNER_TEMP/lv2lint-src"
- CC=gcc-13 meson setup build -Dbuild-tests=false -Donline-tests=disabled -Delf-tests=disabled -Dx11-tests=disabled \
- -Db_lto=false --prefix="$RUNNER_TEMP/lv2lint"
- meson install -C build
- "$RUNNER_TEMP/lv2lint/bin/lv2lint" -v
- - name: Host test, pluginval, clap-validator, lv2lint (on what the archive holds)
- shell: bash
- env:
- LYNX_TEST_MODE: '1'
- run: |
- curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_Linux.zip" && unzip -q pv.zip -d pv
- curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o cv.zip "$CLAP_VALIDATOR-ubuntu-22.04.zip" && unzip -q cv.zip -d cv
- for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the Linux zip holds a tarball)
- chmod +x pv/pluginval "$(find cv -name clap-validator -type f | head -1)"
- ls pkg/LYNX-Plugins-"$LABEL"/LV2/*.lv2/manifest.ttl # (the archive holds the LV2 bundles)
- export LV2LINT="$RUNNER_TEMP/lv2lint/bin/lv2lint" LV2_PATH=/usr/lib/lv2
- xvfb-run -a ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" build/plugexporttest pv/pluginval "$(find cv -name clap-validator -type f | head -1)" reports pictures
- - uses: actions/upload-artifact@v7
- with:
- name: LYNX-Plugins-${{ env.LABEL }}-linux-x86_64
- path: dist/*
- if-no-files-found: error
- - uses: actions/upload-artifact@v7
- if: ${{ !cancelled() }}
- with:
- name: plugin-reports-linux
- path: reports/*
- macos:
- name: macOS universal
- needs: version
- runs-on: macos-15
- env:
- LABEL: ${{ needs.version.outputs.label }}
- steps:
- - uses: actions/checkout@v5
- - name: Build dependencies
- run: brew list ninja > /dev/null 2>&1 || brew install ninja
- - name: JUCE (checksum verified)
- run: |
- curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
- echo "$JUCE_SHA256 juce.tar.gz" | shasum -a 256 -c -
- mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
- - name: Build (universal)
- run: |
- cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
- -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF
- # -j 2 on macOS (rollup 0.1.32 step 12): the macos-15 runner has 3 cores and 7 GB; three UI objects at once (clang peaks
- # 1.1-1.9 GB each) made it swap: single files took 17-41 min (seconds on Linux). Runner RAM, as round 190ov's Windows JOBS=2.
- cmake --build build --target lynx_plugins -- -k 0 -j 2
- lipo -info "build/plugins/LYNX Plugins.clap/Contents/MacOS/LYNX Plugins"
- - name: Package
- run: ./scripts/package-plugins.sh macos build/plugins "$LABEL" dist
- - name: Host test, pluginval, clap-validator (on what the zip holds)
- shell: bash
- env:
- LYNX_TEST_MODE: '1'
- run: |
- curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_macOS.zip" && unzip -q pv.zip -d pv
- curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o cv.zip "$CLAP_VALIDATOR-macos-universal.zip" && unzip -q cv.zip -d cv
- for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the zip may hold a tarball)
- mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-macos-universal.tar.xz" -C pkg
- codesign --verify --deep --strict "pkg/LYNX-Plugins-$LABEL/CLAP/LYNX Plugins.clap"
- cv_bin="$(find cv -name clap-validator -type f | head -1)"; chmod +x "$cv_bin"
- ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" build/plugexporttest "$(find pv -path '*Contents/MacOS/pluginval' -type f | head -1)" "$cv_bin" reports
- - uses: actions/upload-artifact@v7
- with:
- name: LYNX-Plugins-${{ env.LABEL }}-macos-universal
- path: dist/*
- if-no-files-found: error
- - uses: actions/upload-artifact@v7
- if: ${{ !cancelled() }}
- with:
- name: plugin-reports-macos
- path: reports/*
- sums:
- name: Checksums
- needs: [version, windows-check, linux, macos]
- runs-on: ubuntu-24.04
- env:
- LABEL: ${{ needs.version.outputs.label }}
- steps:
- - uses: actions/checkout@v5
- with:
- sparse-checkout: scripts
- - uses: actions/download-artifact@v8
- with:
- pattern: LYNX-Plugins-${{ env.LABEL }}-*
- path: dist
- merge-multiple: true
- - name: SHA256SUMS
- run: ./scripts/package-plugins.sh --sums "$LABEL" dist
- - uses: actions/upload-artifact@v7
- with:
- name: LYNX-Plugins-${{ env.LABEL }}-all
- path: dist/*
- if-no-files-found: error
|