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.

379 lines
16KB

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