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.

761 lines
33KB

  1. name: build
  2. on:
  3. push:
  4. env:
  5. CACHE_VERSION: 12
  6. DEBIAN_FRONTEND: noninteractive
  7. HOMEBREW_NO_AUTO_UPDATE: 1
  8. LIBGL_ALWAYS_SOFTWARE: 'true'
  9. jobs:
  10. linux-arm64:
  11. runs-on: ubuntu-20.04
  12. steps:
  13. - uses: actions/checkout@v2
  14. with:
  15. submodules: recursive
  16. - name: Set up cache
  17. uses: actions/cache@v2
  18. with:
  19. path: |
  20. ~/PawPawBuilds
  21. key: linux-arm64-v${{ env.CACHE_VERSION }}
  22. - name: Fix GitHub's mess
  23. run: |
  24. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  25. sudo apt-get update -qq
  26. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  27. - name: Set up dependencies
  28. run: |
  29. sudo dpkg --add-architecture arm64
  30. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  31. 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
  32. 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
  33. 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
  34. sudo apt-get update -qq
  35. sudo apt-get install -yqq g++-aarch64-linux-gnu libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static
  36. - name: Build extra dependencies
  37. env:
  38. PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
  39. run: |
  40. ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64
  41. - name: Build linux arm64 cross-compiled
  42. run: |
  43. pushd deps/PawPaw; source local.env linux-aarch64; popd
  44. make features
  45. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  46. make unzipfx
  47. - name: Set sha8 (non-release)
  48. if: startsWith(github.ref, 'refs/tags/') != true
  49. id: slug1
  50. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  51. - name: Set sha8 (release)
  52. if: startsWith(github.ref, 'refs/tags/')
  53. id: slug2
  54. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  55. - name: Set sha8
  56. id: slug
  57. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  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) ../Cardinal
  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. - uses: softprops/action-gh-release@v1
  67. if: startsWith(github.ref, 'refs/tags/')
  68. with:
  69. tag_name: ${{ github.ref_name }}
  70. name: ${{ github.ref_name }}
  71. draft: false
  72. prerelease: false
  73. files: |
  74. *.tar.gz
  75. linux-armhf:
  76. runs-on: ubuntu-20.04
  77. steps:
  78. - uses: actions/checkout@v2
  79. with:
  80. submodules: recursive
  81. - name: Set up cache
  82. uses: actions/cache@v2
  83. with:
  84. path: |
  85. ~/PawPawBuilds
  86. key: linux-armhf-v${{ env.CACHE_VERSION }}
  87. - name: Fix GitHub's mess
  88. run: |
  89. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  90. sudo apt-get update -qq
  91. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  92. - name: Set up dependencies
  93. run: |
  94. sudo dpkg --add-architecture armhf
  95. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  96. 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
  97. 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
  98. 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
  99. sudo apt-get update -qq
  100. sudo apt-get install -yqq g++-arm-linux-gnueabihf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static
  101. - name: Build extra dependencies
  102. env:
  103. PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
  104. run: |
  105. ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf
  106. - name: Build linux armhf cross-compiled
  107. run: |
  108. pushd deps/PawPaw; source local.env linux-armhf; popd
  109. make features
  110. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  111. make unzipfx
  112. - name: Set sha8 (non-release)
  113. if: startsWith(github.ref, 'refs/tags/') != true
  114. id: slug1
  115. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  116. - name: Set sha8 (release)
  117. if: startsWith(github.ref, 'refs/tags/')
  118. id: slug2
  119. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  120. - name: Set sha8
  121. id: slug
  122. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  123. - name: Pack binaries
  124. run: |
  125. 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) ../Cardinal
  126. - uses: actions/upload-artifact@v2
  127. with:
  128. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  129. path: |
  130. *.tar.gz
  131. - uses: softprops/action-gh-release@v1
  132. if: startsWith(github.ref, 'refs/tags/')
  133. with:
  134. tag_name: ${{ github.ref_name }}
  135. name: ${{ github.ref_name }}
  136. draft: false
  137. prerelease: false
  138. files: |
  139. *.tar.gz
  140. linux-i686:
  141. runs-on: ubuntu-20.04
  142. steps:
  143. - uses: actions/checkout@v2
  144. with:
  145. submodules: recursive
  146. - name: Set up cache
  147. uses: actions/cache@v2
  148. with:
  149. path: |
  150. ~/PawPawBuilds
  151. key: linux-i686-v${{ env.CACHE_VERSION }}
  152. - name: Fix GitHub's mess
  153. run: |
  154. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  155. sudo apt-get update -qq
  156. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  157. - name: Set up dependencies
  158. run: |
  159. sudo dpkg --add-architecture i386
  160. sudo apt-get update -qq
  161. sudo apt-get install -yqq g++-multilib libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386
  162. - name: Build extra dependencies
  163. env:
  164. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  165. run: |
  166. ./deps/PawPaw/bootstrap-cardinal.sh linux-i686
  167. - name: Build linux i686
  168. run: |
  169. pushd deps/PawPaw; source local.env linux-i686; popd
  170. make features
  171. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  172. make unzipfx
  173. - name: Set sha8 (non-release)
  174. if: startsWith(github.ref, 'refs/tags/') != true
  175. id: slug1
  176. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  177. - name: Set sha8 (release)
  178. if: startsWith(github.ref, 'refs/tags/')
  179. id: slug2
  180. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  181. - name: Set sha8
  182. id: slug
  183. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  184. - name: Pack binaries
  185. run: |
  186. 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) ../Cardinal
  187. - uses: actions/upload-artifact@v2
  188. with:
  189. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  190. path: |
  191. *.tar.gz
  192. - uses: softprops/action-gh-release@v1
  193. if: startsWith(github.ref, 'refs/tags/')
  194. with:
  195. tag_name: ${{ github.ref_name }}
  196. name: ${{ github.ref_name }}
  197. draft: false
  198. prerelease: false
  199. files: |
  200. *.tar.gz
  201. linux-x86_64:
  202. runs-on: ubuntu-20.04
  203. steps:
  204. - uses: actions/checkout@v2
  205. with:
  206. submodules: recursive
  207. - name: Set up cache
  208. uses: actions/cache@v2
  209. with:
  210. path: |
  211. ~/PawPawBuilds
  212. key: linux-x86_64-v${{ env.CACHE_VERSION }}
  213. - name: Set up dependencies
  214. run: |
  215. sudo apt-get update -qq
  216. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  217. - name: Build extra dependencies
  218. run: |
  219. ./deps/PawPaw/bootstrap-cardinal.sh linux
  220. - name: Build linux x86_64
  221. run: |
  222. pushd deps/PawPaw; source local.env linux; popd
  223. make features
  224. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  225. make unzipfx
  226. - name: Set sha8 (non-release)
  227. if: startsWith(github.ref, 'refs/tags/') != true
  228. id: slug1
  229. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  230. - name: Set sha8 (release)
  231. if: startsWith(github.ref, 'refs/tags/')
  232. id: slug2
  233. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  234. - name: Set sha8
  235. id: slug
  236. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  237. - name: Pack binaries
  238. run: |
  239. 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) ../Cardinal
  240. - uses: actions/upload-artifact@v2
  241. with:
  242. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  243. path: |
  244. *.tar.gz
  245. - uses: softprops/action-gh-release@v1
  246. if: startsWith(github.ref, 'refs/tags/')
  247. with:
  248. tag_name: ${{ github.ref_name }}
  249. name: ${{ github.ref_name }}
  250. draft: false
  251. prerelease: false
  252. files: |
  253. *.tar.gz
  254. linux-x86_64-debug:
  255. runs-on: ubuntu-20.04
  256. steps:
  257. - uses: actions/checkout@v2
  258. with:
  259. submodules: recursive
  260. - name: Set up dependencies
  261. run: |
  262. sudo apt-get update -qq
  263. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  264. - name: Build linux x86_64 (debug)
  265. env:
  266. LDFLAGS: -static-libgcc -static-libstdc++
  267. run: |
  268. make features
  269. make DEBUG=true -j $(nproc)
  270. - name: Set sha8
  271. id: slug
  272. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  273. - name: Pack binaries
  274. run: |
  275. 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)
  276. - uses: actions/upload-artifact@v2
  277. with:
  278. name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  279. path: |
  280. *.tar.gz
  281. linux-x86_64-headless:
  282. runs-on: ubuntu-20.04
  283. steps:
  284. - uses: actions/checkout@v2
  285. with:
  286. submodules: recursive
  287. - name: Set up dependencies
  288. run: |
  289. sudo apt-get update -qq
  290. sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev
  291. sudo apt-get install -yqq liblo-dev
  292. - name: Build linux x86_64 (headless)
  293. run: |
  294. make HEADLESS=true features
  295. make HEADLESS=true -j $(nproc)
  296. linux-x86_64-sysdeps:
  297. runs-on: ubuntu-20.04
  298. steps:
  299. - uses: actions/checkout@v2
  300. with:
  301. submodules: recursive
  302. - name: Set up dependencies
  303. run: |
  304. sudo apt-get update -qq
  305. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev
  306. - name: Build linux x86_64 (sysdeps)
  307. run: |
  308. make features
  309. make SYSDEPS=true -j $(nproc)
  310. macos-universal:
  311. runs-on: macos-10.15
  312. steps:
  313. - uses: actions/checkout@v2
  314. with:
  315. submodules: recursive
  316. - name: Set up cache
  317. uses: actions/cache@v2
  318. with:
  319. path: |
  320. ~/PawPawBuilds
  321. key: macos-universal-v${{ env.CACHE_VERSION }}
  322. - name: Fix up Xcode
  323. run: |
  324. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  325. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  326. - name: Build extra dependencies
  327. run: |
  328. ./deps/PawPaw/bootstrap-cardinal.sh macos-universal
  329. - name: Build macOS universal (base)
  330. run: |
  331. pushd deps/PawPaw; source local.env macos-universal; popd
  332. make features
  333. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
  334. - name: Build macOS universal (AU using juce)
  335. run: |
  336. pushd deps/PawPaw; source local.env macos-universal; popd
  337. git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
  338. mkdir jucewrapper/build
  339. pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd
  340. mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
  341. - name: Build macOS universal (packaging)
  342. run: |
  343. pushd deps/PawPaw; source local.env macos-universal; popd
  344. ./utils/create-macos-installer.sh
  345. - name: Set sha8 (non-release)
  346. if: startsWith(github.ref, 'refs/tags/') != true
  347. id: slug1
  348. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  349. - name: Set sha8 (release)
  350. if: startsWith(github.ref, 'refs/tags/')
  351. id: slug2
  352. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  353. - name: Set sha8
  354. id: slug
  355. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  356. - name: Rename macOS bundle
  357. run: |
  358. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg
  359. - uses: actions/upload-artifact@v2
  360. with:
  361. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  362. path: |
  363. ${{ github.event.repository.name }}-*.pkg
  364. - uses: softprops/action-gh-release@v1
  365. if: startsWith(github.ref, 'refs/tags/')
  366. with:
  367. tag_name: ${{ github.ref_name }}
  368. name: ${{ github.ref_name }}
  369. draft: false
  370. prerelease: false
  371. files: |
  372. ${{ github.event.repository.name }}-*.pkg
  373. modduo:
  374. runs-on: ubuntu-20.04
  375. steps:
  376. - uses: actions/checkout@v2
  377. with:
  378. submodules: recursive
  379. - name: Set up cache
  380. uses: actions/cache@v2
  381. id: mpb-cache
  382. with:
  383. path: |
  384. ~/mod-workdir
  385. key: modduo-static-v${{ env.CACHE_VERSION }}
  386. - name: Set up dependencies
  387. run: |
  388. sudo apt-get update -qq
  389. sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
  390. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  391. - name: Bootstrap toolchain
  392. if: steps.mpb-cache.outputs.cache-hit != 'true'
  393. run: |
  394. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  395. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  396. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
  397. - name: Build for modduo
  398. run: |
  399. make modduo HEADLESS=true WITH_LTO=true MODDUO=true -j $(nproc)
  400. - name: Set sha8
  401. id: slug
  402. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  403. - name: Pack binaries
  404. run: |
  405. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2)
  406. - uses: actions/upload-artifact@v2
  407. with:
  408. name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  409. path: |
  410. *.tar.gz
  411. modduox:
  412. runs-on: ubuntu-20.04
  413. steps:
  414. - uses: actions/checkout@v2
  415. with:
  416. submodules: recursive
  417. - name: Set up cache
  418. uses: actions/cache@v2
  419. id: mpb-cache
  420. with:
  421. path: |
  422. ~/mod-workdir
  423. key: modduox-v${{ env.CACHE_VERSION }}
  424. - name: Set up dependencies
  425. run: |
  426. sudo apt-get update -qq
  427. sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
  428. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  429. - name: Bootstrap toolchain
  430. if: steps.mpb-cache.outputs.cache-hit != 'true'
  431. run: |
  432. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  433. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  434. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
  435. - name: Build for modduox
  436. run: |
  437. make modduox HEADLESS=true WITH_LTO=true -j $(nproc)
  438. - name: Set sha8
  439. id: slug
  440. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  441. - name: Pack binaries
  442. run: |
  443. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2)
  444. - uses: actions/upload-artifact@v2
  445. with:
  446. name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  447. path: |
  448. *.tar.gz
  449. moddwarf:
  450. runs-on: ubuntu-20.04
  451. steps:
  452. - uses: actions/checkout@v2
  453. with:
  454. submodules: recursive
  455. - name: Set up cache
  456. uses: actions/cache@v2
  457. id: mpb-cache
  458. with:
  459. path: |
  460. ~/mod-workdir
  461. key: moddwarf-v${{ env.CACHE_VERSION }}
  462. - name: Set up dependencies
  463. run: |
  464. sudo apt-get update -qq
  465. sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
  466. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  467. - name: Bootstrap toolchain
  468. if: steps.mpb-cache.outputs.cache-hit != 'true'
  469. run: |
  470. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  471. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  472. $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
  473. - name: Build for moddwarf
  474. run: |
  475. make moddwarf HEADLESS=true WITH_LTO=true -j $(nproc)
  476. - name: Set sha8
  477. id: slug
  478. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  479. - name: Pack binaries
  480. run: |
  481. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz -C bin $(ls bin | grep lv2)
  482. - uses: actions/upload-artifact@v2
  483. with:
  484. name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  485. path: |
  486. *.tar.gz
  487. win32:
  488. runs-on: ubuntu-20.04
  489. steps:
  490. - uses: actions/checkout@v2
  491. with:
  492. submodules: recursive
  493. - name: Set up cache
  494. uses: actions/cache@v2
  495. with:
  496. path: |
  497. ~/PawPawBuilds
  498. key: win32-v${{ env.CACHE_VERSION }}
  499. - name: Fix GitHub's mess
  500. run: |
  501. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  502. sudo apt-get update -qq
  503. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  504. - name: Set up dependencies
  505. run: |
  506. sudo dpkg --add-architecture i386
  507. sudo apt-get update -qq
  508. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb
  509. - name: Build extra dependencies
  510. run: |
  511. ./deps/PawPaw/bootstrap-cardinal.sh win32
  512. - name: Build win32 cross-compiled (base)
  513. run: |
  514. pushd deps/PawPaw; source local.env win32; popd
  515. make features
  516. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  517. - name: Build win64 cross-compiled (carla)
  518. run: |
  519. pushd deps/PawPaw; source local.env win32; popd
  520. make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc)
  521. make -C carla EMBED_TARGET=true TESTING=true dist
  522. make -C carla EMBED_TARGET=true TESTING=true dist
  523. - name: Build win64 cross-compiled (packaging)
  524. run: |
  525. pushd deps/PawPaw; source local.env win32; popd
  526. xvfb-run ./utils/create-windows-installer.sh 32
  527. - name: Set sha8 (non-release)
  528. if: startsWith(github.ref, 'refs/tags/') != true
  529. id: slug1
  530. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  531. - name: Set sha8 (release)
  532. if: startsWith(github.ref, 'refs/tags/')
  533. id: slug2
  534. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  535. - name: Set sha8
  536. id: slug
  537. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  538. - name: Pack binaries
  539. run: |
  540. 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)
  541. - uses: actions/upload-artifact@v2
  542. with:
  543. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  544. path: |
  545. *.exe
  546. *.zip
  547. - uses: softprops/action-gh-release@v1
  548. if: startsWith(github.ref, 'refs/tags/')
  549. with:
  550. tag_name: ${{ github.ref_name }}
  551. name: ${{ github.ref_name }}
  552. draft: false
  553. prerelease: false
  554. files: |
  555. *.exe
  556. *.zip
  557. win64:
  558. runs-on: ubuntu-20.04
  559. steps:
  560. - uses: actions/checkout@v2
  561. with:
  562. submodules: recursive
  563. - name: Set up cache
  564. uses: actions/cache@v2
  565. with:
  566. path: |
  567. ~/PawPawBuilds
  568. key: win64-v${{ env.CACHE_VERSION }}
  569. - name: Fix GitHub's mess
  570. run: |
  571. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  572. sudo apt-get update -qq
  573. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  574. - name: Set up dependencies
  575. run: |
  576. sudo dpkg --add-architecture i386
  577. sudo apt-get update -qq
  578. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable qttools5-dev qttools5-dev-tools xvfb
  579. - name: Build extra dependencies
  580. run: |
  581. ./deps/PawPaw/bootstrap-cardinal.sh win64
  582. - name: Build win64 cross-compiled (base)
  583. run: |
  584. pushd deps/PawPaw; source local.env win64; popd
  585. make features
  586. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  587. - name: Build win64 cross-compiled (carla)
  588. run: |
  589. pushd deps/PawPaw; source local.env win64; popd
  590. make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc)
  591. make -C carla EMBED_TARGET=true TESTING=true dist
  592. make -C carla EMBED_TARGET=true TESTING=true dist
  593. - name: Build win64 cross-compiled (packaging)
  594. run: |
  595. pushd deps/PawPaw; source local.env win64; popd
  596. xvfb-run ./utils/create-windows-installer.sh 64
  597. - name: Set sha8 (non-release)
  598. if: startsWith(github.ref, 'refs/tags/') != true
  599. id: slug1
  600. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  601. - name: Set sha8 (release)
  602. if: startsWith(github.ref, 'refs/tags/')
  603. id: slug2
  604. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  605. - name: Set sha8
  606. id: slug
  607. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  608. - name: Pack binaries
  609. run: |
  610. 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)
  611. - uses: actions/upload-artifact@v2
  612. with:
  613. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  614. path: |
  615. *.exe
  616. *.zip
  617. - uses: softprops/action-gh-release@v1
  618. if: startsWith(github.ref, 'refs/tags/')
  619. with:
  620. tag_name: ${{ github.ref_name }}
  621. name: ${{ github.ref_name }}
  622. draft: false
  623. prerelease: false
  624. files: |
  625. *.exe
  626. *.zip
  627. source-tarball:
  628. runs-on: ubuntu-20.04
  629. steps:
  630. - uses: actions/checkout@v2
  631. with:
  632. submodules: recursive
  633. - name: Set up dependencies
  634. run: |
  635. sudo apt-get update -qq
  636. sudo apt-get install -yqq liblo-dev
  637. - name: Create source tarball
  638. run: |
  639. make HEADLESS=true tarball
  640. make HEADLESS=true tarball+deps
  641. - name: Set sha8 (non-release)
  642. if: startsWith(github.ref, 'refs/tags/') != true
  643. id: slug1
  644. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  645. - name: Set sha8 (release)
  646. if: startsWith(github.ref, 'refs/tags/')
  647. id: slug2
  648. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  649. - name: Set sha8
  650. id: slug
  651. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  652. - uses: actions/upload-artifact@v2
  653. with:
  654. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  655. path: |
  656. /home/runner/cardinal*.tar.xz
  657. /home/runner/*/cardinal*.tar.xz
  658. /home/runner/*/*/cardinal*.tar.xz
  659. - uses: softprops/action-gh-release@v1
  660. if: startsWith(github.ref, 'refs/tags/')
  661. with:
  662. tag_name: ${{ github.ref_name }}
  663. name: ${{ github.ref_name }}
  664. draft: false
  665. prerelease: false
  666. files: |
  667. /home/runner/cardinal*.tar.xz
  668. /home/runner/*/cardinal*.tar.xz
  669. /home/runner/*/*/cardinal*.tar.xz
  670. plugin-validation:
  671. runs-on: ubuntu-20.04
  672. steps:
  673. - uses: actions/checkout@v2
  674. with:
  675. submodules: recursive
  676. - name: Set up dependencies
  677. run: |
  678. # custom repos
  679. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  680. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  681. sudo apt-get update -qq
  682. # build-deps
  683. sudo apt-get install -yqq liblo-dev
  684. # runtime testing
  685. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  686. - name: Build Cardinal
  687. env:
  688. CFLAGS: -g
  689. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  690. LDFLAGS: -static-libgcc -static-libstdc++
  691. run: |
  692. make HEADLESS=true features
  693. make HEADLESS=true NOOPT=true NOPLUGINS=true STATIC_BUILD=true SKIP_STRIPPING=true -j $(nproc)
  694. - name: Validate LV2 ttl syntax
  695. run: |
  696. lv2_validate \
  697. /usr/lib/lv2/mod.lv2/*.ttl \
  698. /usr/lib/lv2/kx-meta/*.ttl \
  699. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  700. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  701. ./bin/*.lv2/*.ttl
  702. - name: Validate LV2 metadata and binaries
  703. run: |
  704. export LV2_PATH=/tmp/lv2-path
  705. mkdir ${LV2_PATH}
  706. cp -r bin/CardinalFX.lv2 bin/CardinalSynth.lv2 \
  707. /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \
  708. ${LV2_PATH}
  709. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  710. - name: Test LV2 plugin
  711. run: |
  712. export LV2_PATH=/tmp/lv2-path
  713. for p in $(lv2ls); do \
  714. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  715. valgrind \
  716. --error-exitcode=255 \
  717. --leak-check=no \
  718. --track-origins=yes \
  719. --suppressions=./dpf/utils/valgrind-dpf.supp \
  720. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  721. done
  722. - name: Test VST2 plugin
  723. run: |
  724. for p in $(ls bin/*.vst/*.so); do \
  725. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  726. valgrind \
  727. --error-exitcode=255 \
  728. --leak-check=no \
  729. --track-origins=yes \
  730. --suppressions=./dpf/utils/valgrind-dpf.supp \
  731. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  732. done
  733. - name: Test VST3 plugin
  734. run: |
  735. for p in $(ls bin/ | grep vst3); do \
  736. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  737. valgrind \
  738. --error-exitcode=255 \
  739. --leak-check=no \
  740. --track-origins=yes \
  741. --suppressions=./dpf/utils/valgrind-dpf.supp \
  742. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  743. done