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.

763 lines
33KB

  1. name: build
  2. on:
  3. push:
  4. env:
  5. CACHE_VERSION: 10
  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 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 distclean -C carla
  521. #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)
  522. #make -C carla EMBED_TARGET=true TESTING=true dist
  523. #make -C carla EMBED_TARGET=true TESTING=true dist
  524. - name: Build win64 cross-compiled (packaging)
  525. run: |
  526. pushd deps/PawPaw; source local.env win32; popd
  527. xvfb-run ./utils/create-windows-installer.sh 32
  528. - name: Set sha8 (non-release)
  529. if: startsWith(github.ref, 'refs/tags/') != true
  530. id: slug1
  531. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  532. - name: Set sha8 (release)
  533. if: startsWith(github.ref, 'refs/tags/')
  534. id: slug2
  535. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  536. - name: Set sha8
  537. id: slug
  538. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  539. - name: Pack binaries
  540. run: |
  541. 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)
  542. - uses: actions/upload-artifact@v2
  543. with:
  544. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  545. path: |
  546. *.exe
  547. *.zip
  548. - uses: softprops/action-gh-release@v1
  549. if: startsWith(github.ref, 'refs/tags/')
  550. with:
  551. tag_name: ${{ github.ref_name }}
  552. name: ${{ github.ref_name }}
  553. draft: false
  554. prerelease: false
  555. files: |
  556. *.exe
  557. *.zip
  558. win64:
  559. runs-on: ubuntu-20.04
  560. steps:
  561. - uses: actions/checkout@v2
  562. with:
  563. submodules: recursive
  564. - name: Set up cache
  565. uses: actions/cache@v2
  566. with:
  567. path: |
  568. ~/PawPawBuilds
  569. key: win64-v${{ env.CACHE_VERSION }}
  570. - name: Fix GitHub's mess
  571. run: |
  572. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  573. sudo apt-get update -qq
  574. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  575. - name: Set up dependencies
  576. run: |
  577. sudo dpkg --add-architecture i386
  578. sudo apt-get update -qq
  579. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable xvfb
  580. - name: Build extra dependencies
  581. run: |
  582. ./deps/PawPaw/bootstrap-cardinal.sh win64
  583. - name: Build win64 cross-compiled (base)
  584. run: |
  585. pushd deps/PawPaw; source local.env win64; popd
  586. make features
  587. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  588. #- name: Build win64 cross-compiled (carla)
  589. #run: |
  590. #pushd deps/PawPaw; source local.env win64; popd
  591. #make distclean -C carla
  592. #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)
  593. #make -C carla EMBED_TARGET=true TESTING=true dist
  594. #make -C carla EMBED_TARGET=true TESTING=true dist
  595. - name: Build win64 cross-compiled (packaging)
  596. run: |
  597. pushd deps/PawPaw; source local.env win64; popd
  598. xvfb-run ./utils/create-windows-installer.sh 64
  599. - name: Set sha8 (non-release)
  600. if: startsWith(github.ref, 'refs/tags/') != true
  601. id: slug1
  602. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  603. - name: Set sha8 (release)
  604. if: startsWith(github.ref, 'refs/tags/')
  605. id: slug2
  606. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  607. - name: Set sha8
  608. id: slug
  609. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  610. - name: Pack binaries
  611. run: |
  612. 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)
  613. - uses: actions/upload-artifact@v2
  614. with:
  615. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  616. path: |
  617. *.exe
  618. *.zip
  619. - uses: softprops/action-gh-release@v1
  620. if: startsWith(github.ref, 'refs/tags/')
  621. with:
  622. tag_name: ${{ github.ref_name }}
  623. name: ${{ github.ref_name }}
  624. draft: false
  625. prerelease: false
  626. files: |
  627. *.exe
  628. *.zip
  629. source-tarball:
  630. runs-on: ubuntu-20.04
  631. steps:
  632. - uses: actions/checkout@v2
  633. with:
  634. submodules: recursive
  635. - name: Set up dependencies
  636. run: |
  637. sudo apt-get update -qq
  638. sudo apt-get install -yqq liblo-dev
  639. - name: Create source tarball
  640. run: |
  641. make HEADLESS=true tarball
  642. make HEADLESS=true tarball+deps
  643. - name: Set sha8 (non-release)
  644. if: startsWith(github.ref, 'refs/tags/') != true
  645. id: slug1
  646. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  647. - name: Set sha8 (release)
  648. if: startsWith(github.ref, 'refs/tags/')
  649. id: slug2
  650. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  651. - name: Set sha8
  652. id: slug
  653. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  654. - uses: actions/upload-artifact@v2
  655. with:
  656. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  657. path: |
  658. /home/runner/cardinal*.tar.xz
  659. /home/runner/*/cardinal*.tar.xz
  660. /home/runner/*/*/cardinal*.tar.xz
  661. - uses: softprops/action-gh-release@v1
  662. if: startsWith(github.ref, 'refs/tags/')
  663. with:
  664. tag_name: ${{ github.ref_name }}
  665. name: ${{ github.ref_name }}
  666. draft: false
  667. prerelease: false
  668. files: |
  669. /home/runner/cardinal*.tar.xz
  670. /home/runner/*/cardinal*.tar.xz
  671. /home/runner/*/*/cardinal*.tar.xz
  672. plugin-validation:
  673. runs-on: ubuntu-20.04
  674. steps:
  675. - uses: actions/checkout@v2
  676. with:
  677. submodules: recursive
  678. - name: Set up dependencies
  679. run: |
  680. # custom repos
  681. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  682. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  683. sudo apt-get update -qq
  684. # build-deps
  685. sudo apt-get install -yqq liblo-dev
  686. # runtime testing
  687. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  688. - name: Build Cardinal
  689. env:
  690. CFLAGS: -g
  691. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  692. LDFLAGS: -static-libgcc -static-libstdc++
  693. run: |
  694. make HEADLESS=true features
  695. make HEADLESS=true NOOPT=true NOPLUGINS=true STATIC_BUILD=true SKIP_STRIPPING=true -j $(nproc)
  696. - name: Validate LV2 ttl syntax
  697. run: |
  698. lv2_validate \
  699. /usr/lib/lv2/mod.lv2/*.ttl \
  700. /usr/lib/lv2/kx-meta/*.ttl \
  701. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  702. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  703. ./bin/*.lv2/*.ttl
  704. - name: Validate LV2 metadata and binaries
  705. run: |
  706. export LV2_PATH=/tmp/lv2-path
  707. mkdir ${LV2_PATH}
  708. cp -r bin/CardinalFX.lv2 bin/CardinalSynth.lv2 \
  709. /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 \
  710. ${LV2_PATH}
  711. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  712. - name: Test LV2 plugin
  713. run: |
  714. export LV2_PATH=/tmp/lv2-path
  715. for p in $(lv2ls); do \
  716. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  717. valgrind \
  718. --error-exitcode=255 \
  719. --leak-check=no \
  720. --track-origins=yes \
  721. --suppressions=./dpf/utils/valgrind-dpf.supp \
  722. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  723. done
  724. - name: Test VST2 plugin
  725. run: |
  726. for p in $(ls bin/*.vst/*.so); do \
  727. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  728. valgrind \
  729. --error-exitcode=255 \
  730. --leak-check=no \
  731. --track-origins=yes \
  732. --suppressions=./dpf/utils/valgrind-dpf.supp \
  733. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  734. done
  735. - name: Test VST3 plugin
  736. run: |
  737. for p in $(ls bin/ | grep vst3); do \
  738. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  739. valgrind \
  740. --error-exitcode=255 \
  741. --leak-check=no \
  742. --track-origins=yes \
  743. --suppressions=./dpf/utils/valgrind-dpf.supp \
  744. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  745. done