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.

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