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.

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