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.

328 lines
15KB

  1. name: build
  2. on: [push, pull_request]
  3. env:
  4. CACHE_VERSION: 1
  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 /etc/apt/sources.list.d/*.list
  30. sudo apt-get update -qq
  31. sudo apt-get purge -yqq git-man libclang* libgbm* libllvm* libmono* libnginx* moby* mono* nginx* perl php* libgdiplus libpcre2-posix3 libselinux1-dev libzip4
  32. sudo apt-get install -yqq --allow-downgrades autoconf/focal automake/focal build-essential/focal git/focal libgd3/focal libglib2.0-0/focal libglib2.0-dev/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal pkg-config/focal
  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. !bin/Ildaeil
  108. macos:
  109. strategy:
  110. matrix:
  111. target: [intel, universal]
  112. runs-on: macos-11
  113. steps:
  114. - uses: actions/checkout@v3
  115. with:
  116. submodules: recursive
  117. - name: Set up cache
  118. uses: actions/cache@v3
  119. with:
  120. path: |
  121. ~/PawPawBuilds
  122. key: macos-${{ matrix.target }}-v${{ env.CACHE_VERSION }}
  123. - name: Set up dependencies
  124. run: |
  125. brew install meson
  126. - name: Build extra dependencies
  127. run: |
  128. git clone --depth=1 https://github.com/DISTRHO/PawPaw.git
  129. ./PawPaw/bootstrap-cardinal.sh macos-${{ matrix.target }}
  130. - name: Build macOS
  131. run: |
  132. source PawPaw/local.env macos-${{ matrix.target }}
  133. make features
  134. make NOOPT=true -j $(sysctl -n hw.logicalcpu)
  135. ./dpf/utils/package-osx-bundles.sh
  136. - name: Set sha8
  137. id: slug
  138. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  139. - uses: actions/upload-artifact@v3
  140. with:
  141. name: ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  142. path: |
  143. *-macOS.pkg
  144. bin/*
  145. !bin/pkg
  146. !bin/*.clap
  147. !bin/*.lv2
  148. !bin/*.vst
  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/*.exe
  196. source-tarball:
  197. runs-on: ubuntu-20.04
  198. steps:
  199. - uses: actions/checkout@v3
  200. with:
  201. submodules: recursive
  202. - name: Set up dependencies
  203. run: |
  204. sudo apt-get update -qq
  205. sudo apt-get install -yqq libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf
  206. - name: Create source tarball
  207. run: |
  208. make tarball
  209. - name: Set sha8 (non-release)
  210. if: startsWith(github.ref, 'refs/tags/') != true
  211. id: slug1
  212. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  213. - name: Set sha8 (release)
  214. if: startsWith(github.ref, 'refs/tags/')
  215. id: slug2
  216. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  217. - name: Set sha8
  218. id: slug
  219. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  220. - uses: actions/upload-artifact@v3
  221. with:
  222. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  223. path: |
  224. /home/runner/*.tar.xz
  225. /home/runner/*/*.tar.xz
  226. /home/runner/*/*/*.tar.xz
  227. - uses: softprops/action-gh-release@v1
  228. if: startsWith(github.ref, 'refs/tags/')
  229. with:
  230. tag_name: ${{ github.ref_name }}
  231. name: ${{ github.ref_name }}
  232. draft: false
  233. prerelease: false
  234. files: |
  235. /home/runner/*.tar.xz
  236. /home/runner/*/*.tar.xz
  237. /home/runner/*/*/*.tar.xz
  238. plugin-validation:
  239. runs-on: ubuntu-20.04
  240. steps:
  241. - uses: actions/checkout@v3
  242. with:
  243. submodules: recursive
  244. - name: Set up dependencies
  245. run: |
  246. # custom repos
  247. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
  248. sudo dpkg -i kxstudio-repos_11.1.0_all.deb
  249. sudo apt-get update -qq
  250. # build-deps
  251. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf
  252. # runtime testing
  253. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb
  254. - name: Build plugins
  255. env:
  256. CFLAGS: -g
  257. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING
  258. LDFLAGS: -static-libgcc -static-libstdc++
  259. run: |
  260. make features
  261. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  262. - name: Run Ildaeil self-tests
  263. run: |
  264. xvfb-run valgrind \
  265. --gen-suppressions=all \
  266. --error-exitcode=255 \
  267. --leak-check=no \
  268. --track-origins=yes \
  269. --suppressions=./dpf/utils/valgrind-dpf.supp \
  270. ./bin/Ildaeil selftest
  271. - name: Validate LV2 ttl syntax
  272. run: |
  273. lv2_validate \
  274. /usr/lib/lv2/mod.lv2/*.ttl \
  275. /usr/lib/lv2/kx-meta/*.ttl \
  276. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  277. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  278. ./bin/*.lv2/*.ttl
  279. - name: Validate LV2 metadata and binaries
  280. run: |
  281. export LV2_PATH=/tmp/lv2-path
  282. mkdir ${LV2_PATH}
  283. cp -r bin/*.lv2 \
  284. /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 \
  285. ${LV2_PATH}
  286. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  287. - name: Test LV2 plugins
  288. run: |
  289. export LV2_PATH=/tmp/lv2-path
  290. for p in $(lv2ls); do \
  291. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  292. valgrind \
  293. --error-exitcode=255 \
  294. --leak-check=full \
  295. --track-origins=yes \
  296. --suppressions=./dpf/utils/valgrind-dpf.supp \
  297. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  298. done
  299. - name: Test VST2 plugins
  300. run: |
  301. for p in $(find bin/ | grep -e vst.so -e '.*\.vst/.*\.so'); do \
  302. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  303. valgrind \
  304. --error-exitcode=255 \
  305. --leak-check=full \
  306. --track-origins=yes \
  307. --suppressions=./dpf/utils/valgrind-dpf.supp \
  308. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  309. done
  310. - name: Test VST3 plugins
  311. run: |
  312. for p in $(ls bin/ | grep vst3); do \
  313. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  314. valgrind \
  315. --error-exitcode=255 \
  316. --leak-check=full \
  317. --track-origins=yes \
  318. --suppressions=./dpf/utils/valgrind-dpf.supp \
  319. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  320. done