plugins.yml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. # LYNX's own effects and instruments as CLAP / VST3 (and on Linux LV2) plugins for other hosts: the optional download of a release
  2. # (rounds 180b and 188b, docs/PLUGIN_EXPORT.md). Every entry of src/plugin/plugins.def with built = 1 or 2 is in the one
  3. # CLAP; built = 2 also gets a VST3 of its own. Never inside the app's installer.
  4. #
  5. # Run by hand (workflow_dispatch, any branch) or by release.yml (workflow_call), which attaches the archives to the draft
  6. # release. Nothing here publishes anything.
  7. #
  8. # version the package label (input, or CMakeLists.txt's version + the commit)
  9. # windows-build (ubuntu) Zig cross build with LYNX_BUILD_PLUGINS=1, LYNX-Plugins-<label>-win-x64.zip
  10. # windows-check (windows) from that zip: plugexporttest on every plugin, pluginval (strictness 10) on each .vst3,
  11. # clap-validator on the .clap
  12. # linux (ubuntu 22.04 container, glibc 2.35) CMake + GCC 13, glibc check, the same three checks under Xvfb
  13. # with editor pictures, plugexporttest and lv2lint on each LV2 bundle (round 190pk),
  14. # LYNX-Plugins-<label>-linux-x86_64.tar.xz
  15. # macos (macos-15) CMake universal (arm64 + x86_64), ad hoc signature, the same three checks,
  16. # LYNX-Plugins-<label>-macos-universal.tar.xz
  17. # sums LYNX-Plugins-<label>-SHA256SUMS.txt over the three archives (artifact LYNX-Plugins-<label>-all)
  18. name: Plugins
  19. on:
  20. workflow_dispatch:
  21. workflow_call:
  22. inputs:
  23. label:
  24. description: 'package label (release.yml passes its own)'
  25. type: string
  26. default: ''
  27. permissions:
  28. contents: read
  29. env:
  30. ZIG_VERSION: 0.14.1
  31. ZIG_SHA256: 24aeeec8af16c381934a6cd7d95c807a8cb2cf7df9fa40d359aa884195c4716c
  32. JUCE_VERSION: 8.0.4
  33. JUCE_SHA256: 0effe9823a6fd8a4f98e5c08be7d308350e417b2d15dcf34011e778fefbbf005
  34. PLUGINVAL_VERSION: v1.0.4
  35. LV2LINT_COMMIT: 9661902c922650de99bd68e69ee0380d299aed3e # lv2lint 0.17.151, 2026-08-20 (round 190pk)
  36. CLAP_VALIDATOR: https://github.com/free-audio/clap-validator/releases/download/0.4.1/clap-validator-0.4.1-127-g152b982
  37. jobs:
  38. version:
  39. name: Version
  40. runs-on: ubuntu-24.04
  41. outputs:
  42. label: ${{ steps.version.outputs.label }}
  43. steps:
  44. - uses: actions/checkout@v5
  45. - name: Label
  46. id: version
  47. shell: bash
  48. env:
  49. INPUT_LABEL: ${{ inputs.label }}
  50. run: |
  51. version="$(sed -n 's/^project(LYNX VERSION \([0-9]*\.[0-9]*\.[0-9]*\(\.[0-9]*\)\{0,1\}\).*/\1/p' CMakeLists.txt)"
  52. [[ -n "$version" ]] || { echo "::error::no version in CMakeLists.txt"; exit 1; }
  53. label="${INPUT_LABEL:-$version-${GITHUB_SHA::7}}"
  54. echo "label=$label" >> "$GITHUB_OUTPUT"
  55. echo "LYNX plugins $label"
  56. windows-build:
  57. name: Windows x64 (build)
  58. needs: version
  59. runs-on: ubuntu-24.04
  60. env:
  61. LABEL: ${{ needs.version.outputs.label }}
  62. steps:
  63. - uses: actions/checkout@v5
  64. - name: Cache toolchain
  65. id: cache
  66. uses: actions/cache@v5
  67. with:
  68. path: ~/opt
  69. key: toolchain-zig${{ env.ZIG_VERSION }}-juce${{ env.JUCE_VERSION }}-${{ env.ZIG_SHA256 }}-${{ env.JUCE_SHA256 }}
  70. - name: Download Zig and JUCE
  71. if: steps.cache.outputs.cache-hit != 'true'
  72. shell: bash
  73. run: |
  74. mkdir -p ~/opt && cd ~/opt
  75. curl -fsSL -o zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-x86_64-linux-$ZIG_VERSION.tar.xz"
  76. echo "$ZIG_SHA256 zig.tar.xz" | sha256sum -c -
  77. tar xf zig.tar.xz && rm zig.tar.xz
  78. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  79. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  80. tar xzf juce.tar.gz && mv "JUCE-$JUCE_VERSION" "juce-$JUCE_VERSION" && rm juce.tar.gz
  81. - name: Build
  82. shell: bash
  83. run: |
  84. set -o pipefail
  85. # (round 190ov: memory and disk every 30 s in the log, to tell why a runner dies mid-build)
  86. ( 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 ) &
  87. # JOBS=2 (round 190ov, as round-build.yml since round 190of): with one compile per core the hosted runner ran out of
  88. # memory and died ("lost communication" / "shutdown signal") once the pack grew by 7 effects and LYNX Model
  89. 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 \
  90. ./scripts/build-windows-zig.sh 2>&1 | grep -v '^1 warning generated\.$'
  91. - name: Package
  92. shell: bash
  93. run: |
  94. command -v 7zz > /dev/null || command -v 7z > /dev/null || { sudo apt-get update -q && sudo apt-get install -y -q 7zip; }
  95. ./scripts/package-plugins.sh windows build-win/plugins "$LABEL" dist
  96. mkdir -p tool && cp build-win/plugexporttest.exe tool/
  97. # (round 190pu: the .7z next to the zip must unpack to exactly the zip's files)
  98. 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
  99. diff -r z s && echo ".7z and .zip hold the same files"
  100. ls -la dist
  101. - uses: actions/upload-artifact@v7
  102. with:
  103. name: LYNX-Plugins-${{ env.LABEL }}-win-x64
  104. path: dist/*
  105. if-no-files-found: error
  106. - uses: actions/upload-artifact@v7
  107. with:
  108. name: plugexporttest-windows
  109. path: tool/plugexporttest.exe
  110. if-no-files-found: error
  111. windows-check:
  112. name: Windows x64 (check)
  113. needs: [version, windows-build]
  114. runs-on: windows-2022
  115. env:
  116. LABEL: ${{ needs.version.outputs.label }}
  117. steps:
  118. - uses: actions/checkout@v5
  119. with:
  120. sparse-checkout: scripts
  121. - uses: actions/download-artifact@v8
  122. with:
  123. name: LYNX-Plugins-${{ env.LABEL }}-win-x64
  124. path: dist
  125. - uses: actions/download-artifact@v8
  126. with:
  127. name: plugexporttest-windows
  128. path: tool
  129. - name: Host test, pluginval, clap-validator (on what the zip holds)
  130. shell: bash
  131. env:
  132. LYNX_TEST_MODE: '1'
  133. run: |
  134. 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
  135. curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o cv.zip "$CLAP_VALIDATOR-windows.zip" && unzip -q cv.zip -d cv
  136. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done
  137. unzip -q "dist/LYNX-Plugins-$LABEL-win-x64.zip" -d pkg
  138. ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" tool/plugexporttest.exe pv/pluginval.exe "$(find cv -name 'clap-validator.exe' | head -1)" reports
  139. - uses: actions/upload-artifact@v7
  140. if: ${{ !cancelled() }}
  141. with:
  142. name: plugin-reports-windows
  143. path: reports/*
  144. linux:
  145. name: Linux x86_64
  146. needs: version
  147. runs-on: ubuntu-24.04
  148. container:
  149. image: ubuntu:22.04
  150. env:
  151. LABEL: ${{ needs.version.outputs.label }}
  152. DEBIAN_FRONTEND: noninteractive
  153. MAX_GLIBC: '2.35'
  154. steps:
  155. - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
  156. run: |
  157. # (round 190qd) Launchpad's PPA answered 503 on half the requests during the 0.1.31 release: apt retries
  158. echo 'Acquire::Retries "30";' > /etc/apt/apt.conf.d/80-lynx-retries
  159. apt-get update -q
  160. apt-get install -y -q --no-install-recommends ca-certificates curl git gnupg software-properties-common
  161. add-apt-repository -y ppa:ubuntu-toolchain-r/test
  162. apt-get update -q
  163. apt-get install -y -q gcc-13 g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils unzip xz-utils \
  164. fonts-dejavu-core libasound2-dev libjack-jackd2-dev libx11-dev libxrandr-dev libxinerama-dev \
  165. libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev libcurl4 \
  166. lv2-dev liblilv-dev libxxhash-dev python3-pip
  167. - uses: actions/checkout@v5
  168. - name: JUCE (checksum verified)
  169. run: |
  170. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  171. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  172. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  173. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  174. - name: Build
  175. run: |
  176. cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
  177. -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF
  178. cmake --build build --target lynx_plugins -- -k 0
  179. - name: Package
  180. run: ./scripts/package-plugins.sh linux build/plugins "$LABEL" dist
  181. - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
  182. run: |
  183. mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-linux-x86_64.tar.xz" -C pkg
  184. find pkg -type f \( -name '*.so' -o -name '*.clap' \) -print0 | xargs -0 -n1 ./scripts/check-linux-compat.sh
  185. # round 190pk: lv2lint (not packaged for Ubuntu) from its author's repository at a fixed commit, for the LV2 bundles
  186. - name: lv2lint
  187. run: |
  188. pip3 install -q meson
  189. # (rollup 0.1.33 step 31) a failed fetch is tried again, as the validators' downloads (5 tries, 10 s apart)
  190. 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
  191. git -C "$RUNNER_TEMP/lv2lint-src" checkout -q "$LV2LINT_COMMIT"
  192. cd "$RUNNER_TEMP/lv2lint-src"
  193. CC=gcc-13 meson setup build -Dbuild-tests=false -Donline-tests=disabled -Delf-tests=disabled -Dx11-tests=disabled \
  194. -Db_lto=false --prefix="$RUNNER_TEMP/lv2lint"
  195. meson install -C build
  196. "$RUNNER_TEMP/lv2lint/bin/lv2lint" -v
  197. - name: Host test, pluginval, clap-validator, lv2lint (on what the archive holds)
  198. shell: bash
  199. env:
  200. LYNX_TEST_MODE: '1'
  201. run: |
  202. 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
  203. 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
  204. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the Linux zip holds a tarball)
  205. chmod +x pv/pluginval "$(find cv -name clap-validator -type f | head -1)"
  206. ls pkg/LYNX-Plugins-"$LABEL"/LV2/*.lv2/manifest.ttl # (the archive holds the LV2 bundles)
  207. export LV2LINT="$RUNNER_TEMP/lv2lint/bin/lv2lint" LV2_PATH=/usr/lib/lv2
  208. 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
  209. - uses: actions/upload-artifact@v7
  210. with:
  211. name: LYNX-Plugins-${{ env.LABEL }}-linux-x86_64
  212. path: dist/*
  213. if-no-files-found: error
  214. - uses: actions/upload-artifact@v7
  215. if: ${{ !cancelled() }}
  216. with:
  217. name: plugin-reports-linux
  218. path: reports/*
  219. macos:
  220. name: macOS universal
  221. needs: version
  222. runs-on: macos-15
  223. env:
  224. LABEL: ${{ needs.version.outputs.label }}
  225. steps:
  226. - uses: actions/checkout@v5
  227. - name: Build dependencies
  228. run: brew list ninja > /dev/null 2>&1 || brew install ninja
  229. - name: JUCE (checksum verified)
  230. run: |
  231. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  232. echo "$JUCE_SHA256 juce.tar.gz" | shasum -a 256 -c -
  233. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  234. - name: Build (universal)
  235. run: |
  236. cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
  237. -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF
  238. # -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
  239. # 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.
  240. cmake --build build --target lynx_plugins -- -k 0 -j 2
  241. lipo -info "build/plugins/LYNX Plugins.clap/Contents/MacOS/LYNX Plugins"
  242. - name: Package
  243. run: ./scripts/package-plugins.sh macos build/plugins "$LABEL" dist
  244. - name: Host test, pluginval, clap-validator (on what the zip holds)
  245. shell: bash
  246. env:
  247. LYNX_TEST_MODE: '1'
  248. run: |
  249. 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
  250. curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors -o cv.zip "$CLAP_VALIDATOR-macos-universal.zip" && unzip -q cv.zip -d cv
  251. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the zip may hold a tarball)
  252. mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-macos-universal.tar.xz" -C pkg
  253. codesign --verify --deep --strict "pkg/LYNX-Plugins-$LABEL/CLAP/LYNX Plugins.clap"
  254. cv_bin="$(find cv -name clap-validator -type f | head -1)"; chmod +x "$cv_bin"
  255. ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" build/plugexporttest "$(find pv -path '*Contents/MacOS/pluginval' -type f | head -1)" "$cv_bin" reports
  256. - uses: actions/upload-artifact@v7
  257. with:
  258. name: LYNX-Plugins-${{ env.LABEL }}-macos-universal
  259. path: dist/*
  260. if-no-files-found: error
  261. - uses: actions/upload-artifact@v7
  262. if: ${{ !cancelled() }}
  263. with:
  264. name: plugin-reports-macos
  265. path: reports/*
  266. sums:
  267. name: Checksums
  268. needs: [version, windows-check, linux, macos]
  269. runs-on: ubuntu-24.04
  270. env:
  271. LABEL: ${{ needs.version.outputs.label }}
  272. steps:
  273. - uses: actions/checkout@v5
  274. with:
  275. sparse-checkout: scripts
  276. - uses: actions/download-artifact@v8
  277. with:
  278. pattern: LYNX-Plugins-${{ env.LABEL }}-*
  279. path: dist
  280. merge-multiple: true
  281. - name: SHA256SUMS
  282. run: ./scripts/package-plugins.sh --sums "$LABEL" dist
  283. - uses: actions/upload-artifact@v7
  284. with:
  285. name: LYNX-Plugins-${{ env.LABEL }}-all
  286. path: dist/*
  287. if-no-files-found: error