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.

461 lines
18KB

  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 ccache
  21. uses: actions/cache@v2
  22. with:
  23. path: ${HOME}/.cache
  24. key: ccache-linux-arm64
  25. - name: Set up dependencies
  26. run: |
  27. sudo dpkg --add-architecture arm64
  28. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  29. 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
  30. 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
  31. 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
  32. sudo apt-get update -qq
  33. sudo apt-get install -yqq g++-aarch64-linux-gnu libgl1-mesa-dev:arm64 liblo-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static
  34. - name: Install ccache
  35. run: |
  36. sudo apt-get install -yqq ccache
  37. ccache --set-config=cache_dir=${HOME}/.cache
  38. ccache --set-config=compression=true
  39. - name: Build extra dependencies
  40. env:
  41. PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
  42. run: |
  43. export PATH="/usr/lib/ccache:${PATH}"
  44. ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64
  45. - name: Build linux arm64 cross-compiled
  46. run: |
  47. export PATH="/usr/lib/ccache:${PATH}"
  48. pushd deps/PawPaw; source local.env linux-aarch64; popd
  49. make features
  50. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(nproc)
  51. - name: Set sha8
  52. id: slug
  53. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  54. - name: Pack binaries
  55. run: |
  56. 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)
  57. - uses: actions/upload-artifact@v2
  58. with:
  59. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  60. path: |
  61. *.tar.gz
  62. linux-armhf:
  63. runs-on: ubuntu-20.04
  64. steps:
  65. - uses: actions/checkout@v2
  66. with:
  67. submodules: recursive
  68. - name: Set up ccache
  69. uses: actions/cache@v2
  70. with:
  71. path: ${HOME}/.cache
  72. key: ccache-linux-armhf
  73. - name: Set up dependencies
  74. run: |
  75. sudo dpkg --add-architecture armhf
  76. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  77. 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
  78. 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
  79. 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
  80. sudo apt-get update -qq
  81. sudo apt-get install -yqq g++-arm-linux-gnueabihf libgl1-mesa-dev:armhf liblo-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static
  82. - name: Install ccache
  83. run: |
  84. sudo apt-get install -yqq ccache
  85. ccache --set-config=cache_dir=${HOME}/.cache
  86. ccache --set-config=compression=true
  87. - name: Build extra dependencies
  88. env:
  89. PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
  90. run: |
  91. export PATH="/usr/lib/ccache:${PATH}"
  92. ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf
  93. - name: Build linux armhf cross-compiled
  94. run: |
  95. export PATH="/usr/lib/ccache:${PATH}"
  96. pushd deps/PawPaw; source local.env linux-armhf; popd
  97. make features
  98. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(nproc)
  99. - name: Set sha8
  100. id: slug
  101. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  102. - name: Pack binaries
  103. run: |
  104. 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)
  105. - uses: actions/upload-artifact@v2
  106. with:
  107. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  108. path: |
  109. *.tar.gz
  110. linux-i686:
  111. runs-on: ubuntu-20.04
  112. steps:
  113. - uses: actions/checkout@v2
  114. with:
  115. submodules: recursive
  116. - name: Set up ccache
  117. uses: actions/cache@v2
  118. with:
  119. path: ${HOME}/.cache
  120. key: ccache-linux-i686
  121. - name: Set up dependencies
  122. run: |
  123. sudo dpkg --add-architecture i386
  124. sudo apt-get update -qq
  125. sudo apt-get install -yqq g++-i686-linux-gnu libgl1-mesa-dev:i386 liblo-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386
  126. - name: Install ccache
  127. run: |
  128. sudo apt-get install -yqq ccache
  129. ccache --set-config=cache_dir=${HOME}/.cache
  130. ccache --set-config=compression=true
  131. - name: Build extra dependencies
  132. env:
  133. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  134. run: |
  135. export PATH="/usr/lib/ccache:${PATH}"
  136. ./deps/PawPaw/bootstrap-cardinal.sh linux-i686
  137. - name: Build linux i686
  138. run: |
  139. export PATH="/usr/lib/ccache:${PATH}"
  140. pushd deps/PawPaw; source local.env linux-i686; popd
  141. make features
  142. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(nproc)
  143. - name: Set sha8
  144. id: slug
  145. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  146. - name: Pack binaries
  147. run: |
  148. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst)
  149. - uses: actions/upload-artifact@v2
  150. with:
  151. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  152. path: |
  153. *.tar.gz
  154. linux-x86_64:
  155. runs-on: ubuntu-20.04
  156. steps:
  157. - uses: actions/checkout@v2
  158. with:
  159. submodules: recursive
  160. - name: Set up ccache
  161. uses: actions/cache@v2
  162. with:
  163. path: ${HOME}/.cache
  164. key: ccache-linux-x86_64
  165. - name: Set up dependencies
  166. run: |
  167. sudo apt-get update -qq
  168. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  169. - name: Install ccache
  170. run: |
  171. sudo apt-get install -yqq ccache
  172. ccache --set-config=cache_dir=${HOME}/.cache
  173. ccache --set-config=compression=true
  174. - name: Build extra dependencies
  175. run: |
  176. export PATH="/usr/lib/ccache:${PATH}"
  177. ./deps/PawPaw/bootstrap-cardinal.sh linux
  178. - name: Build linux x86_64
  179. run: |
  180. export PATH="/usr/lib/ccache:${PATH}"
  181. pushd deps/PawPaw; source local.env linux; popd
  182. make features
  183. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(nproc)
  184. - name: Set sha8
  185. id: slug
  186. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  187. - name: Pack binaries
  188. run: |
  189. 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)
  190. - uses: actions/upload-artifact@v2
  191. with:
  192. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  193. path: |
  194. *.tar.gz
  195. linux-x86_64-debug:
  196. runs-on: ubuntu-20.04
  197. steps:
  198. - uses: actions/checkout@v2
  199. with:
  200. submodules: recursive
  201. - name: Set up dependencies
  202. run: |
  203. sudo apt-get update -qq
  204. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  205. - name: Build linux x86_64 (debug)
  206. env:
  207. LDFLAGS: -static-libgcc -static-libstdc++
  208. run: |
  209. make features
  210. make DEBUG=true -j $(nproc)
  211. - name: Set sha8
  212. id: slug
  213. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  214. - name: Pack binaries
  215. run: |
  216. 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)
  217. - uses: actions/upload-artifact@v2
  218. with:
  219. name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  220. path: |
  221. *.tar.gz
  222. linux-x86_64-headless:
  223. runs-on: ubuntu-20.04
  224. steps:
  225. - uses: actions/checkout@v2
  226. with:
  227. submodules: recursive
  228. - name: Set up dependencies
  229. run: |
  230. sudo apt-get update -qq
  231. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  232. - name: Build linux x86_64 (headless)
  233. run: |
  234. make features
  235. make HEADLESS=true -j $(nproc)
  236. linux-x86_64-sysdeps:
  237. runs-on: ubuntu-20.04
  238. steps:
  239. - uses: actions/checkout@v2
  240. with:
  241. submodules: recursive
  242. - name: Set up dependencies
  243. run: |
  244. sudo apt-get update -qq
  245. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libjansson-dev libsamplerate0-dev libspeexdsp-dev
  246. - name: Build linux x86_64 (sysdeps)
  247. run: |
  248. make features
  249. make SYSDEPS=true -j $(nproc)
  250. macos-universal:
  251. runs-on: macos-10.15
  252. steps:
  253. - uses: actions/checkout@v2
  254. with:
  255. submodules: recursive
  256. - name: Set up ccache
  257. uses: actions/cache@v2
  258. with:
  259. path: ${HOME}/.cache
  260. key: ccache-win32
  261. - name: Install ccache
  262. run: |
  263. brew install ccache
  264. ccache --set-config=cache_dir=${HOME}/.cache
  265. ccache --set-config=compression=true
  266. - name: Fix up Xcode
  267. run: |
  268. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  269. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  270. - name: Build extra dependencies
  271. run: |
  272. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  273. ./deps/PawPaw/bootstrap-cardinal.sh macos-universal
  274. - name: Build macOS universal
  275. run: |
  276. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  277. pushd deps/PawPaw; source local.env macos-universal; popd
  278. make features
  279. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(sysctl -n hw.logicalcpu)
  280. ./dpf/utils/package-osx-bundles.sh
  281. - name: Set sha8
  282. id: slug
  283. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  284. - uses: actions/upload-artifact@v2
  285. with:
  286. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  287. path: |
  288. *-macOS.pkg
  289. win32:
  290. runs-on: ubuntu-18.04
  291. steps:
  292. - uses: actions/checkout@v2
  293. with:
  294. submodules: recursive
  295. - name: Set up ccache
  296. uses: actions/cache@v2
  297. with:
  298. path: ${HOME}/.cache
  299. key: ccache-win32
  300. - name: Set up dependencies
  301. run: |
  302. sudo add-apt-repository -y ppa:cybermax-dexter/mingw-w64-backport
  303. sudo dpkg --add-architecture i386
  304. sudo apt-get update -qq
  305. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  306. - name: Install ccache
  307. run: |
  308. sudo apt-get install -yqq ccache
  309. ccache --set-config=cache_dir=${HOME}/.cache
  310. ccache --set-config=compression=true
  311. - name: Build extra dependencies
  312. run: |
  313. export PATH="/usr/lib/ccache:${PATH}"
  314. ./deps/PawPaw/bootstrap-cardinal.sh win32
  315. - name: Build win32 cross-compiled
  316. run: |
  317. export PATH="/usr/lib/ccache:${PATH}"
  318. pushd deps/PawPaw; source local.env win32; popd
  319. make features
  320. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(nproc)
  321. - name: Set sha8
  322. id: slug
  323. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  324. - name: Pack binaries
  325. run: |
  326. 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)
  327. - uses: actions/upload-artifact@v2
  328. with:
  329. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  330. path: |
  331. *.zip
  332. win64:
  333. runs-on: ubuntu-20.04
  334. steps:
  335. - uses: actions/checkout@v2
  336. with:
  337. submodules: recursive
  338. - name: Set up ccache
  339. uses: actions/cache@v2
  340. with:
  341. path: ${HOME}/.cache
  342. key: ccache-win64
  343. - name: Set up dependencies
  344. run: |
  345. sudo apt-get update -qq
  346. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  347. - name: Install ccache
  348. run: |
  349. sudo apt-get install -yqq ccache
  350. ccache --set-config=cache_dir=${HOME}/.cache
  351. ccache --set-config=compression=true
  352. - name: Build extra dependencies
  353. run: |
  354. export PATH="/usr/lib/ccache:${PATH}"
  355. ./deps/PawPaw/bootstrap-cardinal.sh win64
  356. - name: Build win64 cross-compiled
  357. run: |
  358. export PATH="/usr/lib/ccache:${PATH}"
  359. pushd deps/PawPaw; source local.env win64; popd
  360. make features
  361. make NOOPT=true WITH_LTO=true WITH_PAWPAW=true -j $(nproc)
  362. - name: Set sha8
  363. id: slug
  364. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  365. - name: Pack binaries
  366. run: |
  367. 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)
  368. - uses: actions/upload-artifact@v2
  369. with:
  370. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  371. path: |
  372. *.zip
  373. plugin-validation:
  374. runs-on: ubuntu-20.04
  375. steps:
  376. - uses: actions/checkout@v2
  377. with:
  378. submodules: recursive
  379. - name: Set up dependencies
  380. run: |
  381. # custom repos
  382. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  383. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  384. sudo apt-get update -qq
  385. # build-deps
  386. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  387. # runtime testing
  388. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  389. - name: Build plugins
  390. env:
  391. CFLAGS: -g
  392. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  393. LDFLAGS: -static-libgcc -static-libstdc++
  394. run: |
  395. make features
  396. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  397. - name: Validate LV2 ttl syntax
  398. run: |
  399. lv2_validate \
  400. /usr/lib/lv2/mod.lv2/*.ttl \
  401. /usr/lib/lv2/kx-meta/*.ttl \
  402. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  403. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  404. ./bin/*.lv2/*.ttl
  405. #- name: Validate LV2 metadata and binaries
  406. #run: |
  407. #export LV2_PATH=/tmp/lv2-path
  408. #mkdir ${LV2_PATH}
  409. #cp -r bin/*.lv2 \
  410. #/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 \
  411. #${LV2_PATH}
  412. #lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  413. - name: Test LV2 plugin
  414. run: |
  415. export LV2_PATH=/tmp/lv2-path
  416. for p in $(lv2ls); do \
  417. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  418. valgrind \
  419. --error-exitcode=255 \
  420. --leak-check=no \
  421. --track-origins=yes \
  422. --suppressions=./dpf/utils/valgrind-dpf.supp \
  423. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  424. done
  425. # - name: Test VST2 plugin
  426. # env:
  427. # CARLA_DO_NOT_USE_JUCE_FOR_VST2: 1
  428. # run: |
  429. # for p in $(ls bin/*.vst/*.so); do \
  430. # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  431. # valgrind \
  432. # --error-exitcode=255 \
  433. # --leak-check=no \
  434. # --track-origins=yes \
  435. # --suppressions=./dpf/utils/valgrind-dpf.supp \
  436. # /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  437. # done
  438. # - name: Test VST3 plugin
  439. # run: |
  440. # for p in $(ls bin/ | grep vst3); do \
  441. # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  442. # valgrind \
  443. # --error-exitcode=255 \
  444. # --leak-check=no \
  445. # --track-origins=yes \
  446. # --suppressions=./dpf/utils/valgrind-dpf.supp \
  447. # /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  448. # done