DPF with Max Gen
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.

406 lines
18KB

  1. name: build
  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-20.04
  15. steps:
  16. - uses: actions/checkout@v3
  17. with:
  18. submodules: recursive
  19. - name: Fix GitHub's mess
  20. run: |
  21. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  22. sudo apt-get update -qq
  23. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  24. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  25. - name: Set up dependencies
  26. run: |
  27. sudo dpkg --add-architecture arm64
  28. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  29. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-arm64.list
  30. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list
  31. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list
  32. sudo apt-get update -qq
  33. sudo apt-get install -yqq 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
  34. - name: Build linux arm64 cross-compiled
  35. env:
  36. CC: aarch64-linux-gnu-gcc
  37. CXX: aarch64-linux-gnu-g++
  38. LDFLAGS: -static-libgcc -static-libstdc++
  39. PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
  40. run: |
  41. make features
  42. make WITH_LTO=true -j $(nproc)
  43. - name: Set sha8
  44. id: slug
  45. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  46. - uses: actions/upload-artifact@v3
  47. with:
  48. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}
  49. path: |
  50. bin/*
  51. linux-armhf:
  52. runs-on: ubuntu-20.04
  53. steps:
  54. - uses: actions/checkout@v3
  55. with:
  56. submodules: recursive
  57. - name: Fix GitHub's mess
  58. run: |
  59. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  60. sudo apt-get update -qq
  61. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  62. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  63. - name: Set up dependencies
  64. run: |
  65. sudo dpkg --add-architecture armhf
  66. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  67. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list
  68. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list
  69. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list
  70. sudo apt-get update -qq
  71. sudo apt-get install -yqq 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
  72. - name: Build linux armhf cross-compiled
  73. env:
  74. CC: arm-linux-gnueabihf-gcc
  75. CXX: arm-linux-gnueabihf-g++
  76. LDFLAGS: -static-libgcc -static-libstdc++
  77. PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
  78. run: |
  79. make features
  80. make WITH_LTO=true -j $(nproc)
  81. - name: Set sha8
  82. id: slug
  83. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  84. - uses: actions/upload-artifact@v3
  85. with:
  86. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }}
  87. path: |
  88. bin/*
  89. linux-i686:
  90. runs-on: ubuntu-20.04
  91. steps:
  92. - uses: actions/checkout@v3
  93. with:
  94. submodules: recursive
  95. - name: Fix GitHub's mess
  96. run: |
  97. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  98. sudo apt-get update -qq
  99. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  100. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  101. - name: Set up dependencies
  102. run: |
  103. sudo dpkg --add-architecture i386
  104. sudo apt-get update -qq
  105. sudo apt-get install -yqq g++-i686-linux-gnu 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
  106. - name: Build linux i686
  107. env:
  108. CC: i686-linux-gnu-gcc
  109. CXX: i686-linux-gnu-g++
  110. CFLAGS: -m32
  111. CXXFLAGS: -m32
  112. LDFLAGS: -m32 -static-libgcc -static-libstdc++
  113. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  114. run: |
  115. make features
  116. make WITH_LTO=true -j $(nproc)
  117. - name: Set sha8
  118. id: slug
  119. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  120. - uses: actions/upload-artifact@v3
  121. with:
  122. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.SHA8 }}
  123. path: |
  124. bin/*
  125. linux-riscv64:
  126. runs-on: ubuntu-20.04
  127. steps:
  128. - uses: actions/checkout@v3
  129. with:
  130. submodules: recursive
  131. - name: Fix GitHub's mess
  132. run: |
  133. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  134. sudo apt-get update -qq
  135. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  136. sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  137. - name: Set up dependencies
  138. run: |
  139. sudo dpkg --add-architecture riscv64
  140. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  141. echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-riscv64.list
  142. echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list
  143. echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list
  144. sudo apt-get update -qq
  145. sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libcairo2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 liblo-dev:riscv64 libpulse-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static
  146. - name: Build linux riscv64 cross-compiled
  147. env:
  148. CC: riscv64-linux-gnu-gcc
  149. CXX: riscv64-linux-gnu-g++
  150. LDFLAGS: -static-libgcc -static-libstdc++
  151. PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
  152. run: |
  153. make features
  154. make WITH_LTO=true -j $(nproc)
  155. - name: Set sha8
  156. id: slug
  157. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  158. - uses: actions/upload-artifact@v3
  159. with:
  160. name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }}
  161. path: |
  162. bin/*
  163. linux-x86_64:
  164. runs-on: ubuntu-20.04
  165. steps:
  166. - uses: actions/checkout@v3
  167. with:
  168. submodules: recursive
  169. - name: Set up dependencies
  170. run: |
  171. sudo apt-get update -qq
  172. sudo apt-get install -yqq libasound2-dev libcairo2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  173. - name: Build linux x86_64
  174. env:
  175. LDFLAGS: -static-libgcc -static-libstdc++
  176. run: |
  177. make features
  178. make WITH_LTO=true -j $(nproc)
  179. - name: Set sha8
  180. id: slug
  181. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  182. - uses: actions/upload-artifact@v3
  183. with:
  184. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }}
  185. path: |
  186. bin/*
  187. macos-universal:
  188. runs-on: macos-11
  189. steps:
  190. - uses: actions/checkout@v3
  191. with:
  192. submodules: recursive
  193. - name: Build macOS universal
  194. env:
  195. 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
  196. 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
  197. LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
  198. run: |
  199. make features
  200. make NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
  201. ./dpf/utils/package-osx-bundles.sh
  202. - name: Set sha8
  203. id: slug
  204. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  205. - uses: actions/upload-artifact@v3
  206. with:
  207. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }}
  208. path: |
  209. *-macOS.pkg
  210. bin/*
  211. !bin/*-ladspa.dylib
  212. !bin/*-dssi.dylib
  213. !bin/lv2
  214. !bin/vst2
  215. !bin/vst3
  216. win32:
  217. runs-on: ubuntu-20.04
  218. steps:
  219. - uses: actions/checkout@v3
  220. with:
  221. submodules: recursive
  222. - name: Fix GitHub's mess
  223. run: |
  224. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  225. sudo apt-get update -qq
  226. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  227. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  228. - name: Set up dependencies
  229. run: |
  230. sudo dpkg --add-architecture i386
  231. sudo apt-get update -qq
  232. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  233. - name: Build win32 cross-compiled
  234. env:
  235. CC: i686-w64-mingw32-gcc
  236. CXX: i686-w64-mingw32-g++
  237. EXE_WRAPPER: wine
  238. PKG_CONFIG: "false"
  239. WINEDEBUG: "-all"
  240. run: |
  241. make features
  242. make WITH_LTO=true -j $(nproc)
  243. - name: Set sha8
  244. id: slug
  245. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  246. - uses: actions/upload-artifact@v3
  247. with:
  248. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}
  249. path: |
  250. bin/*
  251. !bin/*-ladspa.dll
  252. !bin/*-dssi.dll
  253. win64:
  254. runs-on: ubuntu-20.04
  255. steps:
  256. - uses: actions/checkout@v3
  257. with:
  258. submodules: recursive
  259. - name: Fix GitHub's mess
  260. run: |
  261. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  262. sudo apt-get update -qq
  263. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  264. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  265. - name: Set up dependencies
  266. run: |
  267. sudo apt-get update -qq
  268. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  269. - name: Build win64 cross-compiled
  270. env:
  271. CC: x86_64-w64-mingw32-gcc
  272. CXX: x86_64-w64-mingw32-g++
  273. EXE_WRAPPER: wine
  274. PKG_CONFIG: "false"
  275. WINEDEBUG: "-all"
  276. run: |
  277. make features
  278. make WITH_LTO=true -j $(nproc)
  279. - name: Set sha8
  280. id: slug
  281. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  282. - uses: actions/upload-artifact@v3
  283. with:
  284. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}
  285. path: |
  286. bin/*
  287. !bin/*-ladspa.dll
  288. !bin/*-dssi.dll
  289. plugin-validation:
  290. runs-on: ubuntu-20.04
  291. steps:
  292. - uses: actions/checkout@v3
  293. with:
  294. submodules: recursive
  295. - name: Set up dependencies
  296. run: |
  297. # custom repos
  298. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
  299. sudo dpkg -i kxstudio-repos_11.1.0_all.deb
  300. sudo apt-get update -qq
  301. # build-deps
  302. sudo apt-get install -yqq libasound2-dev libcairo2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  303. # runtime testing
  304. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb
  305. - name: Build plugins
  306. env:
  307. CFLAGS: -g
  308. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING
  309. LDFLAGS: -static-libgcc -static-libstdc++
  310. run: |
  311. make features
  312. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  313. - name: Validate LV2 ttl syntax
  314. run: |
  315. lv2_validate \
  316. /usr/lib/lv2/mod.lv2/*.ttl \
  317. /usr/lib/lv2/kx-meta/*.ttl \
  318. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  319. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  320. ./bin/*.lv2/*.ttl
  321. - name: Validate LV2 metadata and binaries
  322. run: |
  323. export LV2_PATH=/tmp/lv2-path
  324. mkdir ${LV2_PATH}
  325. cp -r bin/*.lv2 \
  326. /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 \
  327. ${LV2_PATH}
  328. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  329. - name: Test LADSPA plugins
  330. run: |
  331. for p in $(ls bin/ | grep ladspa.so); do \
  332. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  333. valgrind \
  334. --error-exitcode=255 \
  335. --leak-check=full \
  336. --track-origins=yes \
  337. --suppressions=./dpf/utils/valgrind-dpf.supp \
  338. /usr/lib/carla/carla-bridge-native ladspa ./bin/${p} "" 1>/dev/null; \
  339. done
  340. - name: Test DSSI plugins
  341. run: |
  342. for p in $(ls bin/ | grep dssi.so); do \
  343. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  344. valgrind \
  345. --error-exitcode=255 \
  346. --leak-check=full \
  347. --track-origins=yes \
  348. --suppressions=./dpf/utils/valgrind-dpf.supp \
  349. /usr/lib/carla/carla-bridge-native dssi ./bin/${p} "" 1>/dev/null; \
  350. done
  351. - name: Test LV2 plugins
  352. run: |
  353. export LV2_PATH=/tmp/lv2-path
  354. for p in $(lv2ls); do \
  355. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  356. valgrind \
  357. --error-exitcode=255 \
  358. --leak-check=full \
  359. --track-origins=yes \
  360. --suppressions=./dpf/utils/valgrind-dpf.supp \
  361. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  362. done
  363. - name: Test VST2 plugins
  364. run: |
  365. for p in $(find bin/ | grep -e vst.so -e '.*\.vst/.*\.so'); do \
  366. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  367. valgrind \
  368. --error-exitcode=255 \
  369. --leak-check=full \
  370. --track-origins=yes \
  371. --suppressions=./dpf/utils/valgrind-dpf.supp \
  372. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  373. done
  374. - name: Test VST3 plugins
  375. run: |
  376. for p in $(ls bin/ | grep vst3); do \
  377. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  378. valgrind \
  379. --error-exitcode=255 \
  380. --leak-check=full \
  381. --track-origins=yes \
  382. --suppressions=./dpf/utils/valgrind-dpf.supp \
  383. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  384. done
  385. - name: Test CLAP plugins
  386. run: |
  387. for p in $(ls bin/ | grep clap); do \
  388. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  389. valgrind \
  390. --error-exitcode=255 \
  391. --leak-check=full \
  392. --track-origins=yes \
  393. --suppressions=./dpf/utils/valgrind-dpf.supp \
  394. /usr/lib/carla/carla-bridge-native clap ./bin/${p} "" 1>/dev/null; \
  395. done