DISTRHO Mini-Series
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.

360 lines
15KB

  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@v2
  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 "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  46. - uses: actions/upload-artifact@v2
  47. with:
  48. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  49. path: |
  50. bin/*
  51. linux-armhf:
  52. runs-on: ubuntu-20.04
  53. steps:
  54. - uses: actions/checkout@v2
  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 "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  84. - uses: actions/upload-artifact@v2
  85. with:
  86. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  87. path: |
  88. bin/*
  89. linux-i686:
  90. runs-on: ubuntu-20.04
  91. steps:
  92. - uses: actions/checkout@v2
  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 "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  120. - uses: actions/upload-artifact@v2
  121. with:
  122. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  123. path: |
  124. bin/*
  125. linux-x86_64:
  126. runs-on: ubuntu-20.04
  127. steps:
  128. - uses: actions/checkout@v2
  129. with:
  130. submodules: recursive
  131. - name: Set up dependencies
  132. run: |
  133. sudo apt-get update -qq
  134. 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
  135. - name: Build linux x86_64
  136. env:
  137. LDFLAGS: -static-libgcc -static-libstdc++
  138. run: |
  139. make features
  140. make WITH_LTO=true -j $(nproc)
  141. - name: Set sha8
  142. id: slug
  143. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  144. - uses: actions/upload-artifact@v2
  145. with:
  146. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  147. path: |
  148. bin/*
  149. macos-universal:
  150. runs-on: macos-10.15
  151. steps:
  152. - uses: actions/checkout@v2
  153. with:
  154. submodules: recursive
  155. - name: Fix up Xcode
  156. run: |
  157. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  158. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  159. - name: Build macOS universal
  160. env:
  161. 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
  162. 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
  163. LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
  164. run: |
  165. make features
  166. make NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
  167. ./dpf/utils/package-osx-bundles.sh
  168. - name: Set sha8
  169. id: slug
  170. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  171. - uses: actions/upload-artifact@v2
  172. with:
  173. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  174. path: |
  175. *-macOS.pkg
  176. bin/*
  177. !bin/*-ladspa.dylib
  178. !bin/*-dssi.dylib
  179. !bin/lv2
  180. !bin/vst2
  181. !bin/vst3
  182. win32:
  183. runs-on: ubuntu-20.04
  184. steps:
  185. - uses: actions/checkout@v2
  186. with:
  187. submodules: recursive
  188. - name: Fix GitHub's mess
  189. run: |
  190. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  191. sudo apt-get update -qq
  192. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  193. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  194. - name: Set up dependencies
  195. run: |
  196. sudo dpkg --add-architecture i386
  197. sudo apt-get update -qq
  198. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  199. - name: Build win32 cross-compiled
  200. env:
  201. CC: i686-w64-mingw32-gcc
  202. CXX: i686-w64-mingw32-g++
  203. EXE_WRAPPER: wine
  204. PKG_CONFIG: "false"
  205. WINEDEBUG: "-all"
  206. run: |
  207. make features
  208. make WITH_LTO=true -j $(nproc)
  209. - name: Set sha8
  210. id: slug
  211. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  212. - uses: actions/upload-artifact@v2
  213. with:
  214. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  215. path: |
  216. bin/*
  217. !bin/*-ladspa.dll
  218. !bin/*-dssi.dll
  219. win64:
  220. runs-on: ubuntu-20.04
  221. steps:
  222. - uses: actions/checkout@v2
  223. with:
  224. submodules: recursive
  225. - name: Fix GitHub's mess
  226. run: |
  227. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  228. sudo apt-get update -qq
  229. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  230. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  231. - name: Set up dependencies
  232. run: |
  233. sudo apt-get update -qq
  234. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  235. - name: Build win64 cross-compiled
  236. env:
  237. CC: x86_64-w64-mingw32-gcc
  238. CXX: x86_64-w64-mingw32-g++
  239. EXE_WRAPPER: wine
  240. PKG_CONFIG: "false"
  241. WINEDEBUG: "-all"
  242. run: |
  243. make features
  244. make WITH_LTO=true -j $(nproc)
  245. - name: Set sha8
  246. id: slug
  247. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  248. - uses: actions/upload-artifact@v2
  249. with:
  250. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  251. path: |
  252. bin/*
  253. !bin/*-ladspa.dll
  254. !bin/*-dssi.dll
  255. plugin-validation:
  256. runs-on: ubuntu-20.04
  257. steps:
  258. - uses: actions/checkout@v2
  259. with:
  260. submodules: recursive
  261. - name: Set up dependencies
  262. run: |
  263. # custom repos
  264. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  265. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  266. sudo apt-get update -qq
  267. # build-deps
  268. 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
  269. # runtime testing
  270. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  271. - name: Build plugins
  272. env:
  273. CFLAGS: -g
  274. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  275. LDFLAGS: -static-libgcc -static-libstdc++
  276. run: |
  277. make features
  278. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  279. - name: Validate LV2 ttl syntax
  280. run: |
  281. lv2_validate \
  282. /usr/lib/lv2/mod.lv2/*.ttl \
  283. /usr/lib/lv2/kx-meta/*.ttl \
  284. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  285. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  286. ./bin/*.lv2/*.ttl
  287. - name: Validate LV2 metadata and binaries
  288. run: |
  289. export LV2_PATH=/tmp/lv2-path
  290. mkdir ${LV2_PATH}
  291. cp -r bin/*.lv2 \
  292. /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 \
  293. ${LV2_PATH}
  294. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  295. - name: Test LADSPA plugins
  296. run: |
  297. for p in $(ls bin/ | grep ladspa.so); do \
  298. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  299. valgrind \
  300. --error-exitcode=255 \
  301. --leak-check=full \
  302. --track-origins=yes \
  303. --suppressions=./dpf/utils/valgrind-dpf.supp \
  304. /usr/lib/carla/carla-bridge-native ladspa ./bin/${p} "" 1>/dev/null; \
  305. done
  306. - name: Test DSSI plugins
  307. run: |
  308. for p in $(ls bin/ | grep dssi.so); do \
  309. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  310. valgrind \
  311. --error-exitcode=255 \
  312. --leak-check=full \
  313. --track-origins=yes \
  314. --suppressions=./dpf/utils/valgrind-dpf.supp \
  315. /usr/lib/carla/carla-bridge-native dssi ./bin/${p} "" 1>/dev/null; \
  316. done
  317. - name: Test LV2 plugins
  318. run: |
  319. export LV2_PATH=/tmp/lv2-path
  320. for p in $(lv2ls); do \
  321. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  322. valgrind \
  323. --error-exitcode=255 \
  324. --leak-check=full \
  325. --track-origins=yes \
  326. --suppressions=./dpf/utils/valgrind-dpf.supp \
  327. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  328. done
  329. - name: Test VST2 plugins
  330. run: |
  331. for p in $(find bin/ | grep -e vst.so -e '.*\.vst/.*\.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 vst2 ./${p} "" 1>/dev/null; \
  339. done
  340. - name: Test VST3 plugins
  341. run: |
  342. for p in $(ls bin/ | grep vst3); 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 vst3 ./bin/${p} "" 1>/dev/null; \
  350. done