plugins.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. # LYNX's own effects and instruments as CLAP / VST3 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, LYNX-Plugins-<label>-linux-x86_64.tar.xz
  14. # macos (macos-15) CMake universal (arm64 + x86_64), ad hoc signature, the same three checks,
  15. # LYNX-Plugins-<label>-macos-universal.tar.xz
  16. # sums LYNX-Plugins-<label>-SHA256SUMS.txt over the three archives (artifact LYNX-Plugins-<label>-all)
  17. name: Plugins
  18. on:
  19. workflow_dispatch:
  20. workflow_call:
  21. inputs:
  22. label:
  23. description: 'package label (release.yml passes its own)'
  24. type: string
  25. default: ''
  26. permissions:
  27. contents: read
  28. env:
  29. ZIG_VERSION: 0.14.1
  30. ZIG_SHA256: 24aeeec8af16c381934a6cd7d95c807a8cb2cf7df9fa40d359aa884195c4716c
  31. JUCE_VERSION: 8.0.4
  32. JUCE_SHA256: 0effe9823a6fd8a4f98e5c08be7d308350e417b2d15dcf34011e778fefbbf005
  33. PLUGINVAL_VERSION: v1.0.4
  34. CLAP_VALIDATOR: https://github.com/free-audio/clap-validator/releases/download/0.4.1/clap-validator-0.4.1-127-g152b982
  35. jobs:
  36. version:
  37. name: Version
  38. runs-on: ubuntu-24.04
  39. outputs:
  40. label: ${{ steps.version.outputs.label }}
  41. steps:
  42. - uses: actions/checkout@v5
  43. - name: Label
  44. id: version
  45. shell: bash
  46. env:
  47. INPUT_LABEL: ${{ inputs.label }}
  48. run: |
  49. version="$(sed -n 's/^project(LYNX VERSION \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' CMakeLists.txt)"
  50. [[ -n "$version" ]] || { echo "::error::no version in CMakeLists.txt"; exit 1; }
  51. label="${INPUT_LABEL:-$version-${GITHUB_SHA::7}}"
  52. echo "label=$label" >> "$GITHUB_OUTPUT"
  53. echo "LYNX plugins $label"
  54. windows-build:
  55. name: Windows x64 (build)
  56. needs: version
  57. runs-on: ubuntu-24.04
  58. env:
  59. LABEL: ${{ needs.version.outputs.label }}
  60. steps:
  61. - uses: actions/checkout@v5
  62. - name: Cache toolchain
  63. id: cache
  64. uses: actions/cache@v5
  65. with:
  66. path: ~/opt
  67. key: toolchain-zig${{ env.ZIG_VERSION }}-juce${{ env.JUCE_VERSION }}-${{ env.ZIG_SHA256 }}-${{ env.JUCE_SHA256 }}
  68. - name: Download Zig and JUCE
  69. if: steps.cache.outputs.cache-hit != 'true'
  70. shell: bash
  71. run: |
  72. mkdir -p ~/opt && cd ~/opt
  73. curl -fsSL -o zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-x86_64-linux-$ZIG_VERSION.tar.xz"
  74. echo "$ZIG_SHA256 zig.tar.xz" | sha256sum -c -
  75. tar xf zig.tar.xz && rm zig.tar.xz
  76. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  77. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  78. tar xzf juce.tar.gz && mv "JUCE-$JUCE_VERSION" "juce-$JUCE_VERSION" && rm juce.tar.gz
  79. - name: Build
  80. shell: bash
  81. run: |
  82. set -o pipefail
  83. LYNX_BUILD_PLUGINS=1 ZIG="$HOME/opt/zig-x86_64-linux-$ZIG_VERSION/zig" JUCE_DIR="$HOME/opt/juce-$JUCE_VERSION" OUT=build-win \
  84. ./scripts/build-windows-zig.sh 2>&1 | grep -v '^1 warning generated\.$'
  85. - name: Package
  86. shell: bash
  87. run: |
  88. ./scripts/package-plugins.sh windows build-win/plugins "$LABEL" dist
  89. mkdir -p tool && cp build-win/plugexporttest.exe tool/
  90. - uses: actions/upload-artifact@v7
  91. with:
  92. name: LYNX-Plugins-${{ env.LABEL }}-win-x64
  93. path: dist/*
  94. if-no-files-found: error
  95. - uses: actions/upload-artifact@v7
  96. with:
  97. name: plugexporttest-windows
  98. path: tool/plugexporttest.exe
  99. if-no-files-found: error
  100. windows-check:
  101. name: Windows x64 (check)
  102. needs: [version, windows-build]
  103. runs-on: windows-2022
  104. env:
  105. LABEL: ${{ needs.version.outputs.label }}
  106. steps:
  107. - uses: actions/checkout@v5
  108. with:
  109. sparse-checkout: scripts
  110. - uses: actions/download-artifact@v8
  111. with:
  112. name: LYNX-Plugins-${{ env.LABEL }}-win-x64
  113. path: dist
  114. - uses: actions/download-artifact@v8
  115. with:
  116. name: plugexporttest-windows
  117. path: tool
  118. - name: Host test, pluginval, clap-validator (on what the zip holds)
  119. shell: bash
  120. env:
  121. LYNX_TEST_MODE: '1'
  122. run: |
  123. curl -fsSL -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_Windows.zip" && unzip -q pv.zip -d pv
  124. curl -fsSL -o cv.zip "$CLAP_VALIDATOR-windows.zip" && unzip -q cv.zip -d cv
  125. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done
  126. unzip -q "dist/LYNX-Plugins-$LABEL-win-x64.zip" -d pkg
  127. ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" tool/plugexporttest.exe pv/pluginval.exe "$(find cv -name 'clap-validator.exe' | head -1)" reports
  128. - uses: actions/upload-artifact@v7
  129. if: ${{ !cancelled() }}
  130. with:
  131. name: plugin-reports-windows
  132. path: reports/*
  133. linux:
  134. name: Linux x86_64
  135. needs: version
  136. runs-on: ubuntu-24.04
  137. container:
  138. image: ubuntu:22.04
  139. env:
  140. LABEL: ${{ needs.version.outputs.label }}
  141. DEBIAN_FRONTEND: noninteractive
  142. MAX_GLIBC: '2.35'
  143. steps:
  144. - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
  145. run: |
  146. apt-get update -q
  147. apt-get install -y -q --no-install-recommends ca-certificates curl git gnupg software-properties-common
  148. add-apt-repository -y ppa:ubuntu-toolchain-r/test
  149. apt-get update -q
  150. apt-get install -y -q gcc-13 g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils unzip xz-utils \
  151. fonts-dejavu-core libasound2-dev libjack-jackd2-dev libx11-dev libxrandr-dev libxinerama-dev \
  152. libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev libcurl4
  153. - uses: actions/checkout@v5
  154. - name: JUCE (checksum verified)
  155. run: |
  156. git config --global --add safe.directory "$GITHUB_WORKSPACE"
  157. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  158. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  159. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  160. - name: Build
  161. run: |
  162. cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
  163. -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF
  164. cmake --build build --target lynx_plugins -- -k 0
  165. - name: Package
  166. run: ./scripts/package-plugins.sh linux build/plugins "$LABEL" dist
  167. - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
  168. run: |
  169. mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-linux-x86_64.tar.xz" -C pkg
  170. find pkg -type f \( -name '*.so' -o -name '*.clap' \) -print0 | xargs -0 -n1 ./scripts/check-linux-compat.sh
  171. - name: Host test, pluginval, clap-validator (on what the archive holds)
  172. shell: bash
  173. env:
  174. LYNX_TEST_MODE: '1'
  175. run: |
  176. curl -fsSL -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_Linux.zip" && unzip -q pv.zip -d pv
  177. curl -fsSL -o cv.zip "$CLAP_VALIDATOR-ubuntu-22.04.zip" && unzip -q cv.zip -d cv
  178. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the Linux zip holds a tarball)
  179. chmod +x pv/pluginval "$(find cv -name clap-validator -type f | head -1)"
  180. 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
  181. - uses: actions/upload-artifact@v7
  182. with:
  183. name: LYNX-Plugins-${{ env.LABEL }}-linux-x86_64
  184. path: dist/*
  185. if-no-files-found: error
  186. - uses: actions/upload-artifact@v7
  187. if: ${{ !cancelled() }}
  188. with:
  189. name: plugin-reports-linux
  190. path: reports/*
  191. macos:
  192. name: macOS universal
  193. needs: version
  194. runs-on: macos-15
  195. env:
  196. LABEL: ${{ needs.version.outputs.label }}
  197. steps:
  198. - uses: actions/checkout@v5
  199. - name: Build dependencies
  200. run: brew list ninja > /dev/null 2>&1 || brew install ninja
  201. - name: JUCE (checksum verified)
  202. run: |
  203. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  204. echo "$JUCE_SHA256 juce.tar.gz" | shasum -a 256 -c -
  205. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  206. - name: Build (universal)
  207. run: |
  208. cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE="$RUNNER_TEMP/juce" \
  209. -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF
  210. cmake --build build --target lynx_plugins -- -k 0
  211. lipo -info "build/plugins/LYNX Plugins.clap/Contents/MacOS/LYNX Plugins"
  212. - name: Package
  213. run: ./scripts/package-plugins.sh macos build/plugins "$LABEL" dist
  214. - name: Host test, pluginval, clap-validator (on what the zip holds)
  215. shell: bash
  216. env:
  217. LYNX_TEST_MODE: '1'
  218. run: |
  219. curl -fsSL -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_macOS.zip" && unzip -q pv.zip -d pv
  220. curl -fsSL -o cv.zip "$CLAP_VALIDATOR-macos-universal.zip" && unzip -q cv.zip -d cv
  221. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the zip may hold a tarball)
  222. mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-macos-universal.tar.xz" -C pkg
  223. codesign --verify --deep --strict "pkg/LYNX-Plugins-$LABEL/CLAP/LYNX Plugins.clap"
  224. cv_bin="$(find cv -name clap-validator -type f | head -1)"; chmod +x "$cv_bin"
  225. ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" build/plugexporttest "$(find pv -path '*Contents/MacOS/pluginval' -type f | head -1)" "$cv_bin" reports
  226. - uses: actions/upload-artifact@v7
  227. with:
  228. name: LYNX-Plugins-${{ env.LABEL }}-macos-universal
  229. path: dist/*
  230. if-no-files-found: error
  231. - uses: actions/upload-artifact@v7
  232. if: ${{ !cancelled() }}
  233. with:
  234. name: plugin-reports-macos
  235. path: reports/*
  236. sums:
  237. name: Checksums
  238. needs: [version, windows-check, linux, macos]
  239. runs-on: ubuntu-24.04
  240. env:
  241. LABEL: ${{ needs.version.outputs.label }}
  242. steps:
  243. - uses: actions/checkout@v5
  244. with:
  245. sparse-checkout: scripts
  246. - uses: actions/download-artifact@v8
  247. with:
  248. pattern: LYNX-Plugins-${{ env.LABEL }}-*
  249. path: dist
  250. merge-multiple: true
  251. - name: SHA256SUMS
  252. run: ./scripts/package-plugins.sh --sums "$LABEL" dist
  253. - uses: actions/upload-artifact@v7
  254. with:
  255. name: LYNX-Plugins-${{ env.LABEL }}-all
  256. path: dist/*
  257. if-no-files-found: error