DISTRHO Plugin Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

336 lines
14KB

  1. name: example-plugins
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. pull_request:
  7. branches:
  8. - '*'
  9. env:
  10. DEBIAN_FRONTEND: noninteractive
  11. HOMEBREW_NO_AUTO_UPDATE: 1
  12. jobs:
  13. linux-arm64:
  14. runs-on: ubuntu-18.04
  15. steps:
  16. - uses: actions/checkout@v2
  17. with:
  18. submodules: recursive
  19. - name: Set up dependencies
  20. run: |
  21. sudo dpkg --add-architecture arm64
  22. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  23. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-arm64.list
  24. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list
  25. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list
  26. sudo apt-get update -qq
  27. sudo apt-get install -yq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static
  28. # fix broken Ubuntu packages missing pkg-config file in multi-arch package
  29. sudo apt-get install -yq libasound2-dev libgl1-mesa-dev liblo-dev libpulse-dev libxcursor-dev libxrandr-dev
  30. sudo ln -s /usr/lib/aarch64-linux-gnu/liblo.so.7 /usr/lib/aarch64-linux-gnu/liblo.so
  31. sudo cp /usr/lib/x86_64-linux-gnu/pkgconfig/liblo.pc /usr/lib/aarch64-linux-gnu/pkgconfig/liblo.pc
  32. sudo sed -i "s/x86_64-linux-gnu/aarch64-linux-gnu/" /usr/lib/aarch64-linux-gnu/pkgconfig/liblo.pc
  33. - name: Build linux arm64 cross-compiled
  34. env:
  35. CC: aarch64-linux-gnu-gcc
  36. CXX: aarch64-linux-gnu-g++
  37. LDFLAGS: -static-libgcc -static-libstdc++
  38. run: |
  39. make features
  40. make -j $(nproc)
  41. - name: Set sha8
  42. id: slug
  43. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  44. - uses: actions/upload-artifact@v2
  45. with:
  46. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  47. path: |
  48. bin/*
  49. linux-armhf:
  50. runs-on: ubuntu-18.04
  51. steps:
  52. - uses: actions/checkout@v2
  53. with:
  54. submodules: recursive
  55. - name: Set up dependencies
  56. run: |
  57. sudo dpkg --add-architecture armhf
  58. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  59. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list
  60. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list
  61. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list
  62. sudo apt-get update -qq
  63. sudo apt-get install -yq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static
  64. # fix broken Ubuntu packages missing pkg-config file in multi-arch package
  65. sudo apt-get install -yq libasound2-dev libgl1-mesa-dev liblo-dev libpulse-dev libxcursor-dev libxrandr-dev
  66. sudo ln -s /usr/lib/arm-linux-gnueabihf/liblo.so.7 /usr/lib/arm-linux-gnueabihf/liblo.so
  67. sudo cp /usr/lib/x86_64-linux-gnu/pkgconfig/liblo.pc /usr/lib/arm-linux-gnueabihf/pkgconfig/liblo.pc
  68. sudo sed -i "s/x86_64-linux-gnu/arm-linux-gnueabihf/" /usr/lib/arm-linux-gnueabihf/pkgconfig/liblo.pc
  69. - name: Build linux armhf cross-compiled
  70. env:
  71. CC: arm-linux-gnueabihf-gcc
  72. CXX: arm-linux-gnueabihf-g++
  73. LDFLAGS: -static-libgcc -static-libstdc++
  74. run: |
  75. make features
  76. make -j $(nproc)
  77. - name: Set sha8
  78. id: slug
  79. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  80. - uses: actions/upload-artifact@v2
  81. with:
  82. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  83. path: |
  84. bin/*
  85. linux-x86:
  86. runs-on: ubuntu-18.04
  87. steps:
  88. - uses: actions/checkout@v2
  89. with:
  90. submodules: recursive
  91. - name: Set up dependencies
  92. run: |
  93. sudo dpkg --add-architecture i386
  94. sudo apt-get update -qq
  95. sudo apt-get install -yq g++-multilib libasound2-dev:i386 libcairo2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386
  96. - name: Build linux x86
  97. env:
  98. CFLAGS: -m32
  99. CXXFLAGS: -m32
  100. LDFLAGS: -m32 -static-libgcc -static-libstdc++
  101. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  102. run: |
  103. make features
  104. make -j $(nproc)
  105. - name: Set sha8
  106. id: slug
  107. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  108. - uses: actions/upload-artifact@v2
  109. with:
  110. name: ${{ github.event.repository.name }}-linux-x86-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  111. path: |
  112. bin/*
  113. linux-x86_64:
  114. runs-on: ubuntu-18.04
  115. steps:
  116. - uses: actions/checkout@v2
  117. with:
  118. submodules: recursive
  119. - name: Set up dependencies
  120. run: |
  121. sudo apt-get update -qq
  122. sudo apt-get install -yq libasound2-dev libcairo2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  123. - name: Build linux x86_64
  124. env:
  125. LDFLAGS: -static-libgcc -static-libstdc++
  126. run: |
  127. make features
  128. make -j $(nproc)
  129. - name: Set sha8
  130. id: slug
  131. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  132. - uses: actions/upload-artifact@v2
  133. with:
  134. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  135. path: |
  136. bin/*
  137. macos-universal:
  138. runs-on: macos-10.15
  139. steps:
  140. - uses: actions/checkout@v2
  141. with:
  142. submodules: recursive
  143. - name: Fix up Xcode
  144. run: |
  145. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  146. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  147. - name: Build macOS universal
  148. env:
  149. CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
  150. CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
  151. LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
  152. run: |
  153. make features
  154. make NOOPT=true -j $(sysctl -n hw.logicalcpu)
  155. ./utils/package-osx-bundles.sh
  156. - name: Set sha8
  157. id: slug
  158. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  159. - uses: actions/upload-artifact@v2
  160. with:
  161. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  162. path: |
  163. *-macOS.pkg
  164. bin/*
  165. !bin/*-ladspa.dylib
  166. !bin/*-dssi.dylib
  167. !bin/lv2
  168. !bin/vst2
  169. !bin/vst3
  170. win32:
  171. runs-on: ubuntu-18.04
  172. steps:
  173. - uses: actions/checkout@v2
  174. with:
  175. submodules: recursive
  176. - name: Set up dependencies
  177. run: |
  178. sudo dpkg --add-architecture i386
  179. sudo apt-get update -qq
  180. sudo apt-get install -yq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  181. - name: Build win32 cross-compiled
  182. env:
  183. CC: i686-w64-mingw32-gcc
  184. CXX: i686-w64-mingw32-g++
  185. EXE_WRAPPER: wine
  186. PKG_CONFIG: "false"
  187. WINEDEBUG: "-all"
  188. run: |
  189. make features
  190. make -j $(nproc)
  191. - name: Set sha8
  192. id: slug
  193. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  194. - uses: actions/upload-artifact@v2
  195. with:
  196. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  197. path: |
  198. bin/*
  199. !bin/*-ladspa.dll
  200. !bin/*-dssi.dll
  201. win64:
  202. runs-on: ubuntu-20.04
  203. steps:
  204. - uses: actions/checkout@v2
  205. with:
  206. submodules: recursive
  207. - name: Set up dependencies
  208. run: |
  209. sudo apt-get update -qq
  210. sudo apt-get install -yq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  211. - name: Build win64 cross-compiled
  212. env:
  213. CC: x86_64-w64-mingw32-gcc
  214. CXX: x86_64-w64-mingw32-g++
  215. EXE_WRAPPER: wine
  216. PKG_CONFIG: "false"
  217. WINEDEBUG: "-all"
  218. run: |
  219. make features
  220. make -j $(nproc)
  221. - name: Set sha8
  222. id: slug
  223. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  224. - uses: actions/upload-artifact@v2
  225. with:
  226. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  227. path: |
  228. bin/*
  229. !bin/*-ladspa.dll
  230. !bin/*-dssi.dll
  231. plugin-validation:
  232. runs-on: ubuntu-20.04
  233. steps:
  234. - uses: actions/checkout@v2
  235. with:
  236. submodules: recursive
  237. - name: Set up dependencies
  238. run: |
  239. # custom repos
  240. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  241. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  242. sudo apt-get update -qq
  243. # build-deps
  244. sudo apt-get install -yq libasound2-dev libcairo2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  245. # runtime testing
  246. sudo apt-get install -yq carla-git lilv-utils lv2-dev lv2lint valgrind
  247. - name: Build plugins
  248. env:
  249. CFLAGS: -g
  250. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  251. LDFLAGS: -static-libgcc -static-libstdc++
  252. run: |
  253. make features
  254. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  255. - name: Validate LV2 ttl syntax
  256. run: |
  257. lv2_validate \
  258. /usr/lib/lv2/mod.lv2/*.ttl \
  259. /usr/lib/lv2/kx-meta/*.ttl \
  260. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  261. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  262. ./bin/*.lv2/*.ttl
  263. - name: Validate LV2 metadata and binaries
  264. run: |
  265. export LV2_PATH=/tmp/lv2-path
  266. mkdir ${LV2_PATH}
  267. cp -r bin/*.lv2 \
  268. /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \
  269. ${LV2_PATH}
  270. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  271. - name: Test LADSPA plugins
  272. run: |
  273. for p in $(ls bin/ | grep ladspa.so); do \
  274. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  275. valgrind \
  276. --error-exitcode=255 \
  277. --leak-check=full \
  278. --track-origins=yes \
  279. --suppressions=./utils/valgrind-dpf.supp \
  280. /usr/lib/carla/carla-bridge-native ladspa ./bin/${p} "" 1>/dev/null; \
  281. done
  282. - name: Test DSSI plugins
  283. run: |
  284. for p in $(ls bin/ | grep dssi.so); do \
  285. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  286. valgrind \
  287. --error-exitcode=255 \
  288. --leak-check=full \
  289. --track-origins=yes \
  290. --suppressions=./utils/valgrind-dpf.supp \
  291. /usr/lib/carla/carla-bridge-native dssi ./bin/${p} "" 1>/dev/null; \
  292. done
  293. - name: Test LV2 plugins
  294. run: |
  295. export LV2_PATH=/tmp/lv2-path
  296. for p in $(lv2ls); do \
  297. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  298. valgrind \
  299. --error-exitcode=255 \
  300. --leak-check=full \
  301. --track-origins=yes \
  302. --suppressions=./utils/valgrind-dpf.supp \
  303. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  304. done
  305. - name: Test VST2 plugins
  306. run: |
  307. for p in $(ls bin/ | grep vst.so); do \
  308. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  309. valgrind \
  310. --error-exitcode=255 \
  311. --leak-check=full \
  312. --track-origins=yes \
  313. --suppressions=./utils/valgrind-dpf.supp \
  314. /usr/lib/carla/carla-bridge-native vst2 ./bin/${p} "" 1>/dev/null; \
  315. done
  316. - name: Test VST3 plugins
  317. run: |
  318. for p in $(ls bin/ | grep vst3); do \
  319. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  320. valgrind \
  321. --error-exitcode=255 \
  322. --leak-check=full \
  323. --track-origins=yes \
  324. --suppressions=./utils/valgrind-dpf.supp \
  325. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  326. done