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.

329 lines
15KB

  1. name: build
  2. on: [push, pull_request]
  3. env:
  4. CACHE_VERSION: 7
  5. PAWPAW_SKIP_LTO: 1
  6. PAWPAW_SKIP_FFTW: 1
  7. PAWPAW_SKIP_GLIB: 1
  8. PAWPAW_SKIP_LV2: 1
  9. PAWPAW_SKIP_SAMPLERATE: 1
  10. WITH_LTO: false
  11. jobs:
  12. linux:
  13. strategy:
  14. matrix:
  15. target: [aarch64, armhf, i386, riscv64, x86_64]
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - uses: actions/checkout@v3
  19. with:
  20. submodules: recursive
  21. - name: Set up cache
  22. uses: actions/cache@v3
  23. with:
  24. path: |
  25. ~/PawPawBuilds
  26. key: linux-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
  27. - name: Fix GitHub's mess
  28. run: |
  29. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  30. sudo apt-get update -qq
  31. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  32. sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  33. - name: Set up dependencies (aarch64)
  34. if: ${{ matrix.target == 'aarch64' }}
  35. run: |
  36. sudo dpkg --add-architecture arm64
  37. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  38. 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
  39. 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
  40. 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
  41. sudo apt-get update -qq
  42. sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 gperf meson qemu-user-static
  43. - name: Set up dependencies (armhf)
  44. if: ${{ matrix.target == 'armhf' }}
  45. run: |
  46. sudo dpkg --add-architecture armhf
  47. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  48. 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
  49. 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
  50. 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
  51. sudo apt-get update -qq
  52. sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf meson qemu-user-static
  53. - name: Set up dependencies (i386)
  54. if: ${{ matrix.target == 'i386' }}
  55. run: |
  56. sudo dpkg --add-architecture i386
  57. sudo apt-get update -qq
  58. sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 gperf meson
  59. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 libwine-dev:i386 wine-stable wine64-tools
  60. - name: Set up dependencies (riscv64)
  61. if: ${{ matrix.target == 'riscv64' }}
  62. run: |
  63. sudo dpkg --add-architecture riscv64
  64. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  65. 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
  66. 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
  67. 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
  68. sudo apt-get update -qq
  69. sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 gperf meson qemu-user-static
  70. - name: Set up dependencies (x86_64)
  71. if: ${{ matrix.target == 'x86_64' }}
  72. run: |
  73. sudo dpkg --add-architecture i386
  74. sudo apt-get update -qq
  75. sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf meson
  76. sudo apt-get install -yqq g++-multilib libx11-dev:i386
  77. sudo apt-get install -yqq binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 g++-mingw-w64-i686 g++-mingw-w64-x86-64 mingw-w64 wine-stable wine64-tools
  78. - name: Build extra dependencies
  79. run: |
  80. git clone --depth=1 https://github.com/DISTRHO/PawPaw.git
  81. ./PawPaw/bootstrap-cardinal.sh linux-${{ matrix.target }}
  82. - name: Build linux
  83. run: |
  84. source PawPaw/local.env linux-${{ matrix.target }}
  85. make features
  86. make NOOPT=true -j $(nproc)
  87. - name: Build linux x86_64 extra (part1)
  88. if: ${{ matrix.target == 'x86_64' }}
  89. run: |
  90. source PawPaw/local.env linux-${{ matrix.target }}
  91. make NOOPT=true all extra-posix32 extra-win32 extra-win64 extra-wine64 -j $(nproc)
  92. - name: Build linux x86_64 extra (part2)
  93. if: ${{ matrix.target == 'x86_64' }}
  94. run: |
  95. sudo apt-get install -yqq libwine-dev:i386
  96. source PawPaw/local.env linux
  97. make NOOPT=true extra-wine32 -j $(nproc)
  98. make CARLA_EXTRA_TARGETS=true NOOPT=true -j $(nproc)
  99. - name: Set sha8
  100. id: slug
  101. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  102. - uses: actions/upload-artifact@v3
  103. with:
  104. name: ${{ github.event.repository.name }}-linux-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  105. path: |
  106. bin/*
  107. macos:
  108. strategy:
  109. matrix:
  110. target: [intel, universal]
  111. runs-on: macos-11
  112. steps:
  113. - uses: actions/checkout@v3
  114. with:
  115. submodules: recursive
  116. - name: Set up cache
  117. uses: actions/cache@v3
  118. with:
  119. path: |
  120. ~/PawPawBuilds
  121. key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
  122. - name: Set up dependencies
  123. run: |
  124. brew install meson
  125. - name: Build extra dependencies
  126. run: |
  127. git clone --depth=1 https://github.com/DISTRHO/PawPaw.git
  128. ./PawPaw/bootstrap-cardinal.sh macos-${{ matrix.target }}
  129. - name: Build macOS
  130. run: |
  131. source PawPaw/local.env macos-${{ matrix.target }}
  132. make features
  133. make NOOPT=true -j $(sysctl -n hw.logicalcpu)
  134. ./dpf/utils/package-osx-bundles.sh
  135. - name: Set sha8
  136. id: slug
  137. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  138. - uses: actions/upload-artifact@v3
  139. with:
  140. name: ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  141. path: |
  142. *-macOS.pkg
  143. bin/*
  144. !bin/*-ladspa.dylib
  145. !bin/*-dssi.dylib
  146. !bin/clap
  147. !bin/lv2
  148. !bin/vst2
  149. !bin/vst3
  150. windows:
  151. strategy:
  152. matrix:
  153. target: [win32, win64]
  154. runs-on: ubuntu-22.04
  155. steps:
  156. - uses: actions/checkout@v3
  157. with:
  158. submodules: recursive
  159. - name: Set up cache
  160. uses: actions/cache@v3
  161. with:
  162. path: |
  163. ~/PawPawBuilds
  164. key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }}
  165. - name: Fix GitHub's mess
  166. run: |
  167. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  168. sudo dpkg --add-architecture i386
  169. sudo apt-get update -qq
  170. - name: Set up dependencies (win32)
  171. if: ${{ matrix.target == 'win32' }}
  172. run: |
  173. sudo apt-get install -yqq --allow-downgrades binutils-mingw-w64-i686 libc6:i386 libgcc-s1:i386 libstdc++6:i386 g++-mingw-w64-i686 gperf meson mingw-w64 wine-stable
  174. - name: Set up dependencies (win64)
  175. if: ${{ matrix.target == 'win64' }}
  176. run: |
  177. sudo apt-get install -yqq --allow-downgrades binutils-mingw-w64-x86-64 libc6:i386 libgcc-s1:i386 libstdc++6:i386 g++-mingw-w64-x86-64 gperf meson mingw-w64 wine-stable
  178. - name: Build extra dependencies
  179. run: |
  180. git clone --depth=1 https://github.com/DISTRHO/PawPaw.git
  181. ./PawPaw/bootstrap-cardinal.sh ${{ matrix.target }}
  182. - name: Build cross-compiled
  183. run: |
  184. source PawPaw/local.env ${{ matrix.target }}
  185. make features
  186. make CARLA_EXTRA_TARGETS=true NOOPT=true -j $(nproc)
  187. - name: Set sha8
  188. id: slug
  189. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  190. - uses: actions/upload-artifact@v3
  191. with:
  192. name: ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  193. path: |
  194. bin/*
  195. !bin/*-ladspa.dll
  196. !bin/*-dssi.dll
  197. source-tarball:
  198. runs-on: ubuntu-20.04
  199. steps:
  200. - uses: actions/checkout@v3
  201. with:
  202. submodules: recursive
  203. - name: Set up dependencies
  204. run: |
  205. sudo apt-get update -qq
  206. sudo apt-get install -yqq libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf
  207. - name: Create source tarball
  208. run: |
  209. make tarball
  210. - name: Set sha8 (non-release)
  211. if: startsWith(github.ref, 'refs/tags/') != true
  212. id: slug1
  213. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  214. - name: Set sha8 (release)
  215. if: startsWith(github.ref, 'refs/tags/')
  216. id: slug2
  217. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  218. - name: Set sha8
  219. id: slug
  220. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  221. - uses: actions/upload-artifact@v3
  222. with:
  223. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  224. path: |
  225. /home/runner/*.tar.xz
  226. /home/runner/*/*.tar.xz
  227. /home/runner/*/*/*.tar.xz
  228. - uses: softprops/action-gh-release@v1
  229. if: startsWith(github.ref, 'refs/tags/')
  230. with:
  231. tag_name: ${{ github.ref_name }}
  232. name: ${{ github.ref_name }}
  233. draft: false
  234. prerelease: false
  235. files: |
  236. /home/runner/*.tar.xz
  237. /home/runner/*/*.tar.xz
  238. /home/runner/*/*/*.tar.xz
  239. plugin-validation:
  240. runs-on: ubuntu-20.04
  241. steps:
  242. - uses: actions/checkout@v3
  243. with:
  244. submodules: recursive
  245. - name: Set up dependencies
  246. run: |
  247. # custom repos
  248. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
  249. sudo dpkg -i kxstudio-repos_11.1.0_all.deb
  250. sudo apt-get update -qq
  251. # build-deps
  252. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf
  253. # runtime testing
  254. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb
  255. - name: Build plugins
  256. env:
  257. CFLAGS: -g
  258. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING
  259. LDFLAGS: -static-libgcc -static-libstdc++
  260. run: |
  261. make features
  262. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  263. - name: Run Ildaeil self-tests
  264. run: |
  265. xvfb-run valgrind \
  266. --gen-suppressions=all \
  267. --error-exitcode=255 \
  268. --leak-check=no \
  269. --track-origins=yes \
  270. --suppressions=./dpf/utils/valgrind-dpf.supp \
  271. ./bin/Ildaeil selftest
  272. - name: Validate LV2 ttl syntax
  273. run: |
  274. lv2_validate \
  275. /usr/lib/lv2/mod.lv2/*.ttl \
  276. /usr/lib/lv2/kx-meta/*.ttl \
  277. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  278. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  279. ./bin/*.lv2/*.ttl
  280. - name: Validate LV2 metadata and binaries
  281. run: |
  282. export LV2_PATH=/tmp/lv2-path
  283. mkdir ${LV2_PATH}
  284. cp -r bin/*.lv2 \
  285. /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 \
  286. ${LV2_PATH}
  287. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  288. - name: Test LV2 plugins
  289. run: |
  290. export LV2_PATH=/tmp/lv2-path
  291. for p in $(lv2ls); do \
  292. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  293. valgrind \
  294. --error-exitcode=255 \
  295. --leak-check=full \
  296. --track-origins=yes \
  297. --suppressions=./dpf/utils/valgrind-dpf.supp \
  298. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  299. done
  300. - name: Test VST2 plugins
  301. run: |
  302. for p in $(find bin/ | grep -e vst.so -e '.*\.vst/.*\.so'); do \
  303. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  304. valgrind \
  305. --error-exitcode=255 \
  306. --leak-check=full \
  307. --track-origins=yes \
  308. --suppressions=./dpf/utils/valgrind-dpf.supp \
  309. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  310. done
  311. - name: Test VST3 plugins
  312. run: |
  313. for p in $(ls bin/ | grep vst3); do \
  314. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  315. valgrind \
  316. --error-exitcode=255 \
  317. --leak-check=full \
  318. --track-origins=yes \
  319. --suppressions=./dpf/utils/valgrind-dpf.supp \
  320. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  321. done