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.

489 lines
19KB

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