DISTRHO glBars
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.

350 lines
14KB

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