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.

1288 lines
57KB

  1. name: build
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. pull_request:
  7. branches:
  8. - '*'
  9. env:
  10. CACHE_VERSION: 2
  11. CARDINAL_UNDER_WINE: 1
  12. EMSCRIPTEN_VERSION: 3.1.27
  13. DEBIAN_FRONTEND: noninteractive
  14. HOMEBREW_NO_AUTO_UPDATE: 1
  15. LIBGL_ALWAYS_SOFTWARE: true
  16. WITH_LTO: false
  17. jobs:
  18. linux-arm64:
  19. runs-on: ubuntu-20.04
  20. steps:
  21. - uses: actions/checkout@v3
  22. with:
  23. submodules: recursive
  24. - name: Set up cache
  25. id: cache
  26. uses: actions/cache@v3
  27. with:
  28. path: |
  29. ~/PawPawBuilds
  30. src/Rack/dep/bin
  31. src/Rack/dep/include
  32. src/Rack/dep/lib
  33. src/Rack/dep/share
  34. src/Rack/dep/jansson-2.12
  35. src/Rack/dep/libarchive-3.4.3
  36. src/Rack/dep/libsamplerate-0.1.9
  37. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  38. src/Rack/dep/zstd-1.4.5
  39. key: linux-arm64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  40. - name: Fix GitHub's mess
  41. run: |
  42. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  43. sudo apt-get update -qq
  44. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  45. sudo apt-get clean
  46. - name: Set up dependencies
  47. run: |
  48. sudo dpkg --add-architecture arm64
  49. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  50. 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
  51. 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
  52. 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
  53. sudo apt-get update -qq
  54. sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-dev:arm64 libsdl2-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 gperf qemu-user-static
  55. sudo apt-get clean
  56. - name: Set up ccache
  57. uses: hendrikmuhs/ccache-action@v1.2
  58. with:
  59. key: ccache-linux-arm64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  60. - name: Build extra dependencies
  61. env:
  62. PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
  63. run: |
  64. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  65. ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64
  66. - name: Build linux arm64 cross-compiled
  67. run: |
  68. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  69. pushd deps/PawPaw; source local.env linux-aarch64; popd
  70. export PATH="/usr/lib/ccache:${PATH}"
  71. export PKG_CONFIG_PATH+=:/usr/lib/aarch64-linux-gnu/pkgconfig
  72. make features
  73. make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  74. make unzipfx
  75. - name: Set sha8 (non-release)
  76. if: startsWith(github.ref, 'refs/tags/') != true
  77. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  78. - name: Set sha8 (release)
  79. if: startsWith(github.ref, 'refs/tags/')
  80. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  81. - name: Pack binaries
  82. run: |
  83. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs
  84. - uses: actions/upload-artifact@v3
  85. with:
  86. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || env.SHA8 }}
  87. path: |
  88. *.tar.gz
  89. - uses: softprops/action-gh-release@v1
  90. if: startsWith(github.ref, 'refs/tags/')
  91. with:
  92. tag_name: ${{ github.ref_name }}
  93. name: ${{ github.ref_name }}
  94. draft: false
  95. prerelease: false
  96. files: |
  97. *.tar.gz
  98. linux-armhf:
  99. runs-on: ubuntu-20.04
  100. steps:
  101. - uses: actions/checkout@v3
  102. with:
  103. submodules: recursive
  104. - name: Set up cache
  105. id: cache
  106. uses: actions/cache@v3
  107. with:
  108. path: |
  109. ~/PawPawBuilds
  110. src/Rack/dep/bin
  111. src/Rack/dep/include
  112. src/Rack/dep/lib
  113. src/Rack/dep/share
  114. src/Rack/dep/jansson-2.12
  115. src/Rack/dep/libarchive-3.4.3
  116. src/Rack/dep/libsamplerate-0.1.9
  117. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  118. src/Rack/dep/zstd-1.4.5
  119. key: linux-armhf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  120. - name: Fix GitHub's mess
  121. run: |
  122. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  123. sudo apt-get update -qq
  124. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  125. sudo apt-get clean
  126. - name: Set up dependencies
  127. run: |
  128. sudo dpkg --add-architecture armhf
  129. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  130. 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
  131. 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
  132. 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
  133. sudo apt-get update -qq
  134. sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-dev:armhf libsdl2-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf gperf qemu-user-static
  135. sudo apt-get clean
  136. - name: Set up ccache
  137. uses: hendrikmuhs/ccache-action@v1.2
  138. with:
  139. key: ccache-linux-armhf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  140. - name: Build extra dependencies
  141. env:
  142. PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
  143. run: |
  144. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  145. ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf
  146. - name: Build linux armhf cross-compiled
  147. run: |
  148. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  149. pushd deps/PawPaw; source local.env linux-armhf; popd
  150. export PATH="/usr/lib/ccache:${PATH}"
  151. export PKG_CONFIG_PATH+=:/usr/lib/arm-linux-gnueabihf/pkgconfig
  152. make features
  153. make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  154. make unzipfx
  155. - name: Set sha8 (non-release)
  156. if: startsWith(github.ref, 'refs/tags/') != true
  157. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  158. - name: Set sha8 (release)
  159. if: startsWith(github.ref, 'refs/tags/')
  160. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  161. - name: Pack binaries
  162. run: |
  163. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs
  164. - uses: actions/upload-artifact@v3
  165. with:
  166. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || env.SHA8 }}
  167. path: |
  168. *.tar.gz
  169. - uses: softprops/action-gh-release@v1
  170. if: startsWith(github.ref, 'refs/tags/')
  171. with:
  172. tag_name: ${{ github.ref_name }}
  173. name: ${{ github.ref_name }}
  174. draft: false
  175. prerelease: false
  176. files: |
  177. *.tar.gz
  178. linux-i686:
  179. runs-on: ubuntu-20.04
  180. steps:
  181. - uses: actions/checkout@v3
  182. with:
  183. submodules: recursive
  184. - name: Set up cache
  185. id: cache
  186. uses: actions/cache@v3
  187. with:
  188. path: |
  189. ~/PawPawBuilds
  190. src/Rack/dep/bin
  191. src/Rack/dep/include
  192. src/Rack/dep/lib
  193. src/Rack/dep/share
  194. src/Rack/dep/jansson-2.12
  195. src/Rack/dep/libarchive-3.4.3
  196. src/Rack/dep/libsamplerate-0.1.9
  197. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  198. src/Rack/dep/zstd-1.4.5
  199. key: linux-i686-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  200. - name: Fix GitHub's mess
  201. run: |
  202. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  203. sudo apt-get update -qq
  204. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  205. sudo apt-get clean
  206. - name: Set up dependencies
  207. run: |
  208. sudo dpkg --add-architecture i386
  209. sudo apt-get update -qq
  210. sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-dev:i386 libsdl2-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 gperf
  211. sudo apt-get clean
  212. - name: Set up ccache
  213. uses: hendrikmuhs/ccache-action@v1.2
  214. with:
  215. key: ccache-linux-i686-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  216. - name: Build extra dependencies
  217. env:
  218. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  219. run: |
  220. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  221. ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686
  222. - name: Build linux i686
  223. run: |
  224. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  225. pushd deps/PawPaw; source local.env linux-i686; popd
  226. export PATH="/usr/lib/ccache:${PATH}"
  227. export PKG_CONFIG_PATH+=:/usr/lib/i386-linux-gnu/pkgconfig
  228. make features
  229. make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  230. make unzipfx
  231. - name: Set sha8 (non-release)
  232. if: startsWith(github.ref, 'refs/tags/') != true
  233. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  234. - name: Set sha8 (release)
  235. if: startsWith(github.ref, 'refs/tags/')
  236. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  237. - name: Pack binaries
  238. run: |
  239. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs
  240. - uses: actions/upload-artifact@v3
  241. with:
  242. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || env.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-riscv64:
  255. runs-on: ubuntu-20.04
  256. steps:
  257. - uses: actions/checkout@v3
  258. with:
  259. submodules: recursive
  260. - name: Set up cache
  261. id: cache
  262. uses: actions/cache@v3
  263. with:
  264. path: |
  265. ~/PawPawBuilds
  266. src/Rack/dep/bin
  267. src/Rack/dep/include
  268. src/Rack/dep/lib
  269. src/Rack/dep/share
  270. src/Rack/dep/jansson-2.12
  271. src/Rack/dep/libarchive-3.4.3
  272. src/Rack/dep/libsamplerate-0.1.9
  273. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  274. src/Rack/dep/zstd-1.4.5
  275. key: linux-riscv64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  276. - name: Fix GitHub's mess
  277. run: |
  278. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  279. sudo apt-get update -qq
  280. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  281. sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  282. sudo apt-get clean
  283. - name: Set up dependencies
  284. run: |
  285. sudo dpkg --add-architecture riscv64
  286. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  287. echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-riscv64.list
  288. echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list
  289. echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list
  290. sudo apt-get update -qq
  291. sudo apt-get install -yqq g++-riscv64-linux-gnu libasound2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 libglib2.0-dev:riscv64 libsdl2-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 gperf qemu-user-static
  292. sudo apt-get clean
  293. - name: Set up ccache
  294. uses: hendrikmuhs/ccache-action@v1.2
  295. with:
  296. key: ccache-linux-riscv64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  297. - name: Build extra dependencies
  298. env:
  299. PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
  300. run: |
  301. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  302. ./deps/PawPaw/bootstrap-cardinal.sh linux-riscv64 && ./deps/PawPaw/.cleanup.sh linux-riscv64
  303. - name: Build linux riscv64 cross-compiled
  304. run: |
  305. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  306. pushd deps/PawPaw; source local.env linux-riscv64; popd
  307. export PATH="/usr/lib/ccache:${PATH}"
  308. export PKG_CONFIG_PATH+=:/usr/lib/riscv64-linux-gnu/pkgconfig
  309. make features
  310. make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  311. make unzipfx
  312. - name: Set sha8 (non-release)
  313. if: startsWith(github.ref, 'refs/tags/') != true
  314. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  315. - name: Set sha8 (release)
  316. if: startsWith(github.ref, 'refs/tags/')
  317. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  318. - name: Pack binaries
  319. run: |
  320. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs
  321. - uses: actions/upload-artifact@v3
  322. with:
  323. name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || env.SHA8 }}
  324. path: |
  325. *.tar.gz
  326. - uses: softprops/action-gh-release@v1
  327. if: startsWith(github.ref, 'refs/tags/')
  328. with:
  329. tag_name: ${{ github.ref_name }}
  330. name: ${{ github.ref_name }}
  331. draft: false
  332. prerelease: false
  333. files: |
  334. *.tar.gz
  335. linux-x86_64:
  336. runs-on: ubuntu-20.04
  337. steps:
  338. - uses: actions/checkout@v3
  339. with:
  340. submodules: recursive
  341. - name: Set up cache
  342. id: cache
  343. uses: actions/cache@v3
  344. with:
  345. path: |
  346. ~/PawPawBuilds
  347. src/Rack/dep/bin
  348. src/Rack/dep/include
  349. src/Rack/dep/lib
  350. src/Rack/dep/share
  351. src/Rack/dep/jansson-2.12
  352. src/Rack/dep/libarchive-3.4.3
  353. src/Rack/dep/libsamplerate-0.1.9
  354. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  355. src/Rack/dep/zstd-1.4.5
  356. key: linux-x86_64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  357. - name: Set up dependencies
  358. run: |
  359. sudo apt-get update -qq
  360. sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf
  361. sudo apt-get clean
  362. - name: Set up ccache
  363. uses: hendrikmuhs/ccache-action@v1.2
  364. with:
  365. key: ccache-linux-x86_64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  366. - name: Build extra dependencies
  367. run: |
  368. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  369. ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux
  370. - name: Build linux x86_64
  371. run: |
  372. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  373. pushd deps/PawPaw; source local.env linux; popd
  374. export PATH="/usr/lib/ccache:${PATH}"
  375. export PKG_CONFIG_PATH+=:/usr/lib/x86_64-linux-gnu/pkgconfig
  376. make features
  377. make CIBUILD=true HAVE_PULSEAUDIO=false NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  378. make unzipfx
  379. - name: Set sha8 (non-release)
  380. if: startsWith(github.ref, 'refs/tags/') != true
  381. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  382. - name: Set sha8 (release)
  383. if: startsWith(github.ref, 'refs/tags/')
  384. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  385. - name: Pack binaries
  386. run: |
  387. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../CardinalJACK ../CardinalNative ../LICENSE ../README.md ../docs
  388. - uses: actions/upload-artifact@v3
  389. with:
  390. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || env.SHA8 }}
  391. path: |
  392. *.tar.gz
  393. - uses: softprops/action-gh-release@v1
  394. if: startsWith(github.ref, 'refs/tags/')
  395. with:
  396. tag_name: ${{ github.ref_name }}
  397. name: ${{ github.ref_name }}
  398. draft: false
  399. prerelease: false
  400. files: |
  401. *.tar.gz
  402. linux-x86_64-debug:
  403. runs-on: ubuntu-20.04
  404. steps:
  405. - uses: actions/checkout@v3
  406. with:
  407. submodules: recursive
  408. - name: Set up dependencies
  409. run: |
  410. sudo apt-get update -qq
  411. sudo apt-get install -yqq libasound2-dev libdbus-1-dev libgl1-mesa-dev liblo-dev libsdl2-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev gperf
  412. sudo apt-get clean
  413. - name: Build linux x86_64 (debug)
  414. env:
  415. LDFLAGS: -static-libgcc -static-libstdc++
  416. run: |
  417. make features
  418. # multiple jobs for building carla, deps and plugins
  419. make DEBUG=true carla deps dgl plugins resources -j $(nproc)
  420. # single job for final build stage, otherwise we might get killed due to OOM
  421. make DEBUG=true HAVE_PULSEAUDIO=false -j 1
  422. - name: Set sha8
  423. id: slug
  424. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  425. - name: Pack binaries
  426. run: |
  427. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep -e lv2 -e vst -e clap) ../LICENSE ../README.md ../docs
  428. - uses: actions/upload-artifact@v3
  429. with:
  430. name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || env.SHA8 }}
  431. path: |
  432. *.tar.gz
  433. linux-x86_64-headless:
  434. runs-on: ubuntu-20.04
  435. steps:
  436. - uses: actions/checkout@v3
  437. with:
  438. submodules: recursive
  439. - name: Set up dependencies
  440. run: |
  441. sudo apt-get update -qq
  442. sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev
  443. sudo apt-get install -yqq liblo-dev
  444. sudo apt-get clean
  445. - name: Build linux x86_64 (headless)
  446. run: |
  447. make HEADLESS=true features
  448. make HEADLESS=true -j $(nproc)
  449. linux-x86_64-sysdeps:
  450. runs-on: ubuntu-20.04
  451. steps:
  452. - uses: actions/checkout@v3
  453. with:
  454. submodules: recursive
  455. - name: Set up dependencies
  456. run: |
  457. sudo apt-get update -qq
  458. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libfftw3-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev
  459. sudo apt-get clean
  460. - name: Build linux x86_64 (sysdeps)
  461. run: |
  462. make features
  463. make SYSDEPS=true -j $(nproc)
  464. macos-intel:
  465. runs-on: macos-11
  466. steps:
  467. - uses: actions/checkout@v3
  468. with:
  469. submodules: recursive
  470. - name: Set up cache
  471. id: cache
  472. uses: actions/cache@v3
  473. with:
  474. path: |
  475. ~/PawPawBuilds
  476. src/Rack/dep/bin
  477. src/Rack/dep/include
  478. src/Rack/dep/lib
  479. src/Rack/dep/share
  480. src/Rack/dep/jansson-2.12
  481. src/Rack/dep/libarchive-3.4.3
  482. src/Rack/dep/libsamplerate-0.1.9
  483. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  484. src/Rack/dep/zstd-1.4.5
  485. key: macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  486. - name: Build extra dependencies
  487. run: |
  488. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  489. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  490. ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos
  491. - name: Set up ccache
  492. if: steps.cache.outputs.cache-hit == 'true'
  493. uses: hendrikmuhs/ccache-action@v1.2
  494. with:
  495. key: ccache-macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  496. - name: Build macOS intel (base)
  497. if: steps.cache.outputs.cache-hit == 'true'
  498. run: |
  499. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  500. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  501. pushd deps/PawPaw; source local.env macos; popd
  502. make features
  503. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu)
  504. - name: Build macOS intel (AU using juce)
  505. if: steps.cache.outputs.cache-hit == 'true'
  506. run: |
  507. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  508. pushd deps/PawPaw; source local.env macos; popd
  509. git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
  510. sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h
  511. mkdir -p jucewrapper/build
  512. pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
  513. mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
  514. - name: Build macOS intel (packaging)
  515. if: steps.cache.outputs.cache-hit == 'true'
  516. env:
  517. MACOS_ARCHS: 'x86_64'
  518. run: |
  519. pushd deps/PawPaw; source local.env macos; popd
  520. ./utils/create-macos-installer.sh
  521. - name: Set sha8 (non-release)
  522. if: startsWith(github.ref, 'refs/tags/') != true
  523. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  524. - name: Set sha8 (release)
  525. if: startsWith(github.ref, 'refs/tags/')
  526. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  527. - name: Rename macOS bundle
  528. if: steps.cache.outputs.cache-hit == 'true'
  529. run: |
  530. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || env.SHA8 }}.pkg
  531. - uses: actions/upload-artifact@v3
  532. with:
  533. name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || env.SHA8 }}
  534. path: |
  535. ${{ github.event.repository.name }}-*.pkg
  536. - uses: softprops/action-gh-release@v1
  537. if: startsWith(github.ref, 'refs/tags/')
  538. with:
  539. tag_name: ${{ github.ref_name }}
  540. name: ${{ github.ref_name }}
  541. draft: false
  542. prerelease: false
  543. files: |
  544. ${{ github.event.repository.name }}-*.pkg
  545. macos-universal:
  546. runs-on: macos-11
  547. steps:
  548. - uses: actions/checkout@v3
  549. with:
  550. submodules: recursive
  551. - name: Set up cache
  552. id: cache
  553. uses: actions/cache@v3
  554. with:
  555. path: |
  556. ~/PawPawBuilds
  557. src/Rack/dep/bin
  558. src/Rack/dep/include
  559. src/Rack/dep/lib
  560. src/Rack/dep/share
  561. src/Rack/dep/jansson-2.12
  562. src/Rack/dep/libarchive-3.4.3
  563. src/Rack/dep/libsamplerate-0.1.9
  564. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  565. src/Rack/dep/zstd-1.4.5
  566. key: macos-universal-v${{ env.CACHE_VERSION }}
  567. - name: Build extra dependencies
  568. run: |
  569. export PAWPAW_SKIP_LTO=1
  570. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  571. ./deps/PawPaw/bootstrap-cardinal.sh macos-universal && ./deps/PawPaw/.cleanup.sh macos-universal
  572. - name: Set up ccache
  573. if: steps.cache.outputs.cache-hit == 'true'
  574. uses: hendrikmuhs/ccache-action@v1.2
  575. with:
  576. key: ccache-macos-universal-v${{ env.CACHE_VERSION }}
  577. - name: Build macOS universal (base)
  578. if: steps.cache.outputs.cache-hit == 'true'
  579. env:
  580. WITH_LTO: false
  581. run: |
  582. export PAWPAW_SKIP_LTO=1
  583. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  584. pushd deps/PawPaw; source local.env macos-universal; popd
  585. make features
  586. make CIBUILD=true NOOPT=true -j $(sysctl -n hw.logicalcpu)
  587. - name: Build macOS universal (AU using juce)
  588. if: steps.cache.outputs.cache-hit == 'true'
  589. run: |
  590. export PAWPAW_SKIP_LTO=1
  591. pushd deps/PawPaw; source local.env macos-universal; popd
  592. git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
  593. mkdir -p jucewrapper/build
  594. pushd jucewrapper/build; cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT="macosx" -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
  595. mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
  596. - name: Build macOS universal (packaging)
  597. if: steps.cache.outputs.cache-hit == 'true'
  598. env:
  599. MACOS_ARCHS: 'arm64,x86_64'
  600. run: |
  601. pushd deps/PawPaw; source local.env macos-universal; popd
  602. ./utils/create-macos-installer.sh
  603. - name: Set sha8 (non-release)
  604. if: startsWith(github.ref, 'refs/tags/') != true
  605. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  606. - name: Set sha8 (release)
  607. if: startsWith(github.ref, 'refs/tags/')
  608. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  609. - name: Rename macOS bundle
  610. if: steps.cache.outputs.cache-hit == 'true'
  611. run: |
  612. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }}.pkg
  613. - uses: actions/upload-artifact@v3
  614. with:
  615. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || env.SHA8 }}
  616. path: |
  617. ${{ github.event.repository.name }}-*.pkg
  618. - uses: softprops/action-gh-release@v1
  619. if: startsWith(github.ref, 'refs/tags/')
  620. with:
  621. tag_name: ${{ github.ref_name }}
  622. name: ${{ github.ref_name }}
  623. draft: false
  624. prerelease: false
  625. files: |
  626. ${{ github.event.repository.name }}-*.pkg
  627. modduo:
  628. runs-on: ubuntu-20.04
  629. steps:
  630. - uses: actions/checkout@v3
  631. with:
  632. submodules: recursive
  633. - name: Set up cache
  634. uses: actions/cache@v3
  635. id: mpb-cache
  636. with:
  637. path: |
  638. ~/mod-workdir
  639. key: modduo-static-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  640. - name: Set up dependencies
  641. run: |
  642. sudo apt-get update -qq
  643. 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
  644. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  645. sudo apt-get clean
  646. - name: Bootstrap toolchain
  647. if: steps.mpb-cache.outputs.cache-hit != 'true'
  648. run: |
  649. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  650. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  651. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
  652. - name: Build for modduo
  653. if: steps.mpb-cache.outputs.cache-hit == 'true'
  654. run: |
  655. make CIBUILD=true HEADLESS=true modduo-features
  656. make CIBUILD=true HEADLESS=true MODDUO=true WITH_LTO=${{ env.WITH_LTO }} modduo -j $(nproc)
  657. - name: Set sha8
  658. id: slug
  659. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  660. - name: Pack binaries
  661. if: steps.mpb-cache.outputs.cache-hit == 'true'
  662. run: |
  663. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2)
  664. - uses: actions/upload-artifact@v3
  665. with:
  666. name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || env.SHA8 }}
  667. path: |
  668. *.tar.gz
  669. modduox:
  670. runs-on: ubuntu-20.04
  671. steps:
  672. - uses: actions/checkout@v3
  673. with:
  674. submodules: recursive
  675. - name: Set up cache
  676. uses: actions/cache@v3
  677. id: mpb-cache
  678. with:
  679. path: |
  680. ~/mod-workdir
  681. key: modduox-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  682. - name: Set up dependencies
  683. run: |
  684. sudo apt-get update -qq
  685. 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
  686. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  687. sudo apt-get clean
  688. - name: Bootstrap toolchain
  689. if: steps.mpb-cache.outputs.cache-hit != 'true'
  690. run: |
  691. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  692. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  693. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
  694. - name: Build for modduox
  695. if: steps.mpb-cache.outputs.cache-hit == 'true'
  696. run: |
  697. make CIBUILD=true HEADLESS=true modduox-features
  698. make CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} modduox -j $(nproc)
  699. - name: Set sha8
  700. id: slug
  701. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  702. - name: Pack binaries
  703. if: steps.mpb-cache.outputs.cache-hit == 'true'
  704. run: |
  705. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2)
  706. - uses: actions/upload-artifact@v3
  707. with:
  708. name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || env.SHA8 }}
  709. path: |
  710. *.tar.gz
  711. moddwarf:
  712. runs-on: ubuntu-20.04
  713. steps:
  714. - uses: actions/checkout@v3
  715. with:
  716. submodules: recursive
  717. - name: Set up cache
  718. uses: actions/cache@v3
  719. id: mpb-cache
  720. with:
  721. path: |
  722. ~/mod-workdir
  723. key: moddwarf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  724. - name: Set up dependencies
  725. run: |
  726. sudo apt-get update -qq
  727. 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
  728. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  729. sudo apt-get clean
  730. - name: Bootstrap toolchain
  731. if: steps.mpb-cache.outputs.cache-hit != 'true'
  732. run: |
  733. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  734. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  735. $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
  736. - name: Build for moddwarf
  737. if: steps.mpb-cache.outputs.cache-hit == 'true'
  738. run: |
  739. make CIBUILD=true HEADLESS=true moddwarf-features
  740. make CIBUILD=true HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} moddwarf -j $(nproc)
  741. - name: Set sha8
  742. id: slug
  743. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  744. - name: Pack binaries
  745. if: steps.mpb-cache.outputs.cache-hit == 'true'
  746. run: |
  747. tar -c -h --hard-dereference -z -f ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }}.tar.gz -C bin $(ls bin | grep lv2)
  748. - uses: actions/upload-artifact@v3
  749. with:
  750. name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || env.SHA8 }}
  751. path: |
  752. *.tar.gz
  753. wasm:
  754. runs-on: ubuntu-22.04
  755. steps:
  756. - uses: actions/checkout@v3
  757. with:
  758. submodules: recursive
  759. - name: Set up cache
  760. id: cache
  761. uses: actions/cache@v3
  762. with:
  763. path: |
  764. ~/PawPawBuilds
  765. src/Rack/dep/bin
  766. src/Rack/dep/include
  767. src/Rack/dep/lib
  768. src/Rack/dep/share
  769. src/Rack/dep/jansson-2.12
  770. src/Rack/dep/libarchive-3.4.3
  771. src/Rack/dep/libsamplerate-0.1.9
  772. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  773. src/Rack/dep/zstd-1.4.5
  774. key: wasm-v${{ env.CACHE_VERSION }}
  775. - name: Set up dependencies
  776. run: |
  777. sudo apt-get update -qq
  778. sudo apt-get install -yqq brotli gperf
  779. sudo apt-get clean
  780. [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk
  781. cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
  782. - name: Build extra dependencies
  783. run: |
  784. source ~/PawPawBuilds/emsdk/emsdk_env.sh
  785. ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm
  786. - name: Build wasm cross-compiled
  787. if: steps.cache.outputs.cache-hit == 'true'
  788. env:
  789. WITH_LTO: false
  790. run: |
  791. source ~/PawPawBuilds/emsdk/emsdk_env.sh
  792. pushd deps/PawPaw; source local.env wasm; popd
  793. make features
  794. make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc)
  795. - name: Make wasm versioned and compress
  796. if: steps.cache.outputs.cache-hit == 'true'
  797. run: |
  798. VERSION=$(cat Makefile | awk 'sub("VERSION = ","")')
  799. cd bin
  800. sed -i "s/CardinalMini\./CardinalMini-v${VERSION}\./g" *.html *.js
  801. sed -i "s/CardinalNative\./CardinalNative-v${VERSION}\./g" *.html *.js
  802. mv CardinalMini.data CardinalMini-v${VERSION}.data
  803. mv CardinalMini.js CardinalMini-v${VERSION}.js
  804. mv CardinalMini.wasm CardinalMini-v${VERSION}.wasm
  805. mv CardinalNative.data CardinalNative-v${VERSION}.data
  806. mv CardinalNative.js CardinalNative-v${VERSION}.js
  807. mv CardinalNative.wasm CardinalNative-v${VERSION}.wasm
  808. brotli -k -q 11 *.data *.html *.js *.wasm
  809. - name: Set sha8 (non-release)
  810. if: startsWith(github.ref, 'refs/tags/') != true
  811. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  812. - name: Set sha8 (release)
  813. if: startsWith(github.ref, 'refs/tags/')
  814. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  815. - name: Pack binaries
  816. if: steps.cache.outputs.cache-hit == 'true'
  817. run: |
  818. cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm)
  819. - uses: actions/upload-artifact@v3
  820. with:
  821. name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || env.SHA8 }}
  822. path: |
  823. *.zip
  824. - uses: softprops/action-gh-release@v1
  825. if: startsWith(github.ref, 'refs/tags/')
  826. with:
  827. tag_name: ${{ github.ref_name }}
  828. name: ${{ github.ref_name }}
  829. draft: false
  830. prerelease: false
  831. files: |
  832. *.zip
  833. wasm-noopt:
  834. runs-on: ubuntu-22.04
  835. steps:
  836. - uses: actions/checkout@v3
  837. with:
  838. submodules: recursive
  839. - name: Set up cache
  840. id: cache
  841. uses: actions/cache@v3
  842. with:
  843. path: |
  844. ~/PawPawBuilds
  845. src/Rack/dep/bin
  846. src/Rack/dep/include
  847. src/Rack/dep/lib
  848. src/Rack/dep/share
  849. src/Rack/dep/jansson-2.12
  850. src/Rack/dep/libarchive-3.4.3
  851. src/Rack/dep/libsamplerate-0.1.9
  852. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  853. src/Rack/dep/zstd-1.4.5
  854. key: wasm-noopt-v${{ env.CACHE_VERSION }}
  855. - name: Set up dependencies
  856. run: |
  857. sudo apt-get update -qq
  858. sudo apt-get install -yqq brotli gperf
  859. sudo apt-get clean
  860. [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk
  861. cd ~/PawPawBuilds/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
  862. - name: Build extra dependencies
  863. env:
  864. PAWPAW_NOSIMD: 1
  865. run: |
  866. source ~/PawPawBuilds/emsdk/emsdk_env.sh
  867. ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm
  868. - name: Build wasm-noopt cross-compiled
  869. if: steps.cache.outputs.cache-hit == 'true'
  870. env:
  871. PAWPAW_NOSIMD: 1
  872. NOSIMD: true
  873. WITH_LTO: false
  874. run: |
  875. source ~/PawPawBuilds/emsdk/emsdk_env.sh
  876. pushd deps/PawPaw; source local.env wasm; popd
  877. # FIXME send patch upstream, assuming this works..
  878. sed -i -e 's/defined(__riscv)/defined(__riscv) || defined(__EMSCRIPTEN__)/' plugins/surgext/surge/src/common/globals.h
  879. make features
  880. make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc)
  881. make CIBUILD=true HAVE_LIBLO=false NOOPT=true USE_GLES2=true -j $(nproc) -C src/CardinalMiniSep modgui
  882. - name: Make wasm-noopt versioned and compress
  883. if: steps.cache.outputs.cache-hit == 'true'
  884. run: |
  885. VERSION=$(cat Makefile | awk 'sub("VERSION = ","")')
  886. cd bin
  887. sed -i "s/CardinalMini\./CardinalMini-noopt-v${VERSION}\./g" *.html *.js
  888. sed -i "s/CardinalNative\./CardinalNative-noopt-v${VERSION}\./g" *.html *.js
  889. mv CardinalMini.data CardinalMini-noopt-v${VERSION}.data
  890. mv CardinalMini.js CardinalMini-noopt-v${VERSION}.js
  891. mv CardinalMini.wasm CardinalMini-noopt-v${VERSION}.wasm
  892. mv CardinalNative.data CardinalNative-noopt-v${VERSION}.data
  893. mv CardinalNative.js CardinalNative-noopt-v${VERSION}.js
  894. mv CardinalNative.wasm CardinalNative-noopt-v${VERSION}.wasm
  895. brotli -k -q 11 *.data *.html *.js *.wasm
  896. - name: Set sha8 (non-release)
  897. if: startsWith(github.ref, 'refs/tags/') != true
  898. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  899. - name: Set sha8 (release)
  900. if: startsWith(github.ref, 'refs/tags/')
  901. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  902. - name: Pack binaries
  903. if: steps.cache.outputs.cache-hit == 'true'
  904. run: |
  905. cd bin; zip -r -9 ../${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls *.br *.html *.data *.js *.wasm-noopt) CardinalMini.lv2/modgui
  906. - uses: actions/upload-artifact@v3
  907. with:
  908. name: ${{ github.event.repository.name }}-wasm-noopt-${{ github.event.pull_request.number || env.SHA8 }}
  909. path: |
  910. *.zip
  911. - uses: softprops/action-gh-release@v1
  912. if: startsWith(github.ref, 'refs/tags/')
  913. with:
  914. tag_name: ${{ github.ref_name }}
  915. name: ${{ github.ref_name }}
  916. draft: false
  917. prerelease: false
  918. files: |
  919. *.zip
  920. win32:
  921. runs-on: ubuntu-22.04
  922. steps:
  923. - uses: actions/checkout@v3
  924. with:
  925. submodules: recursive
  926. - name: Set up cache
  927. id: cache
  928. uses: actions/cache@v3
  929. with:
  930. path: |
  931. ~/PawPawBuilds
  932. src/Rack/dep/bin
  933. src/Rack/dep/include
  934. src/Rack/dep/lib
  935. src/Rack/dep/share
  936. src/Rack/dep/jansson-2.12
  937. src/Rack/dep/libarchive-3.4.3
  938. src/Rack/dep/libsamplerate-0.1.9
  939. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  940. src/Rack/dep/zstd-1.4.5
  941. key: win32-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  942. - name: Fix GitHub's mess
  943. run: |
  944. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  945. sudo apt-get update -qq
  946. sudo apt-get install -yqq --allow-downgrades libgd3/jammy
  947. sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget
  948. sudo apt-get clean
  949. - name: Set up dependencies
  950. run: |
  951. sudo dpkg --add-architecture i386
  952. sudo apt-get update -qq
  953. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 gperf qttools5-dev qttools5-dev-tools xvfb
  954. sudo apt-get clean
  955. - name: Set up ccache
  956. uses: hendrikmuhs/ccache-action@v1.2
  957. with:
  958. key: ccache-win32-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  959. - name: Build extra dependencies
  960. run: |
  961. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  962. ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32
  963. - name: Build win32 cross-compiled (base)
  964. if: steps.cache.outputs.cache-hit == 'true'
  965. run: |
  966. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  967. export PATH="/usr/lib/ccache:${PATH}"
  968. pushd deps/PawPaw; source local.env win32; popd
  969. make features
  970. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  971. - name: Build win32 cross-compiled (carla)
  972. if: steps.cache.outputs.cache-hit == 'true'
  973. run: |
  974. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  975. export PATH="/usr/lib/ccache:${PATH}"
  976. pushd deps/PawPaw; source local.env win32; popd
  977. make carla-win32 -j $(nproc)
  978. make -C carla EMBED_TARGET=true TESTING=true dist
  979. make -C carla EMBED_TARGET=true TESTING=true dist
  980. - name: Build win32 cross-compiled (packaging)
  981. if: steps.cache.outputs.cache-hit == 'true'
  982. run: |
  983. pushd deps/PawPaw; source local.env win32; popd
  984. xvfb-run ./utils/create-windows-installer.sh 32
  985. make unzipfx
  986. - name: Set sha8 (non-release)
  987. if: startsWith(github.ref, 'refs/tags/') != true
  988. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  989. - name: Set sha8 (release)
  990. if: startsWith(github.ref, 'refs/tags/')
  991. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  992. - name: Pack binaries
  993. if: steps.cache.outputs.cache-hit == 'true'
  994. run: |
  995. pushd bin
  996. zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap)
  997. popd
  998. zip -u -9 ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe
  999. - uses: actions/upload-artifact@v3
  1000. with:
  1001. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || env.SHA8 }}
  1002. path: |
  1003. Cardinal-*.exe
  1004. Cardinal-*.zip
  1005. - uses: softprops/action-gh-release@v1
  1006. if: startsWith(github.ref, 'refs/tags/')
  1007. with:
  1008. tag_name: ${{ github.ref_name }}
  1009. name: ${{ github.ref_name }}
  1010. draft: false
  1011. prerelease: false
  1012. files: |
  1013. Cardinal-*.exe
  1014. Cardinal-*.zip
  1015. win64:
  1016. runs-on: ubuntu-22.04
  1017. steps:
  1018. - uses: actions/checkout@v3
  1019. with:
  1020. submodules: recursive
  1021. - name: Set up cache
  1022. id: cache
  1023. uses: actions/cache@v3
  1024. with:
  1025. path: |
  1026. ~/PawPawBuilds
  1027. src/Rack/dep/bin
  1028. src/Rack/dep/include
  1029. src/Rack/dep/lib
  1030. src/Rack/dep/share
  1031. src/Rack/dep/jansson-2.12
  1032. src/Rack/dep/libarchive-3.4.3
  1033. src/Rack/dep/libsamplerate-0.1.9
  1034. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  1035. src/Rack/dep/zstd-1.4.5
  1036. key: win64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  1037. - name: Fix GitHub's mess
  1038. run: |
  1039. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  1040. sudo apt-get update -qq
  1041. sudo apt-get install -yqq --allow-downgrades libgd3/jammy
  1042. sudo apt-get purge -yqq libmono* moby* mono* msbuild* php* libgdiplus libpcre2-posix3 nuget
  1043. sudo apt-get clean
  1044. - name: Set up dependencies
  1045. run: |
  1046. sudo dpkg --add-architecture i386
  1047. sudo apt-get update -qq
  1048. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable gperf qttools5-dev qttools5-dev-tools xvfb
  1049. sudo apt-get clean
  1050. - name: Set up ccache
  1051. uses: hendrikmuhs/ccache-action@v1.2
  1052. with:
  1053. key: ccache-win64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  1054. - name: Build extra dependencies
  1055. run: |
  1056. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  1057. ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64
  1058. - name: Build win64 cross-compiled (base)
  1059. if: steps.cache.outputs.cache-hit == 'true'
  1060. run: |
  1061. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  1062. export PATH="/usr/lib/ccache:${PATH}"
  1063. pushd deps/PawPaw; source local.env win64; popd
  1064. make features
  1065. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  1066. - name: Build win64 cross-compiled (carla)
  1067. if: steps.cache.outputs.cache-hit == 'true'
  1068. run: |
  1069. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  1070. export PATH="/usr/lib/ccache:${PATH}"
  1071. pushd deps/PawPaw; source local.env win64; popd
  1072. make carla-win32 -j $(nproc)
  1073. make -C carla EMBED_TARGET=true TESTING=true dist
  1074. make -C carla EMBED_TARGET=true TESTING=true dist
  1075. - name: Build win64 cross-compiled (packaging)
  1076. if: steps.cache.outputs.cache-hit == 'true'
  1077. run: |
  1078. pushd deps/PawPaw; source local.env win64; popd
  1079. xvfb-run ./utils/create-windows-installer.sh 64
  1080. make unzipfx
  1081. - name: Set sha8 (non-release)
  1082. if: startsWith(github.ref, 'refs/tags/') != true
  1083. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  1084. - name: Set sha8 (release)
  1085. if: startsWith(github.ref, 'refs/tags/')
  1086. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  1087. - name: Pack binaries
  1088. if: steps.cache.outputs.cache-hit == 'true'
  1089. run: |
  1090. pushd bin
  1091. zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip $(ls | grep -e lv2 -e vst -e clap)
  1092. popd
  1093. zip -u -9 ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}.zip LICENSE README.md docs/*.* CardinalJACK.exe CardinalNative.exe
  1094. - uses: actions/upload-artifact@v3
  1095. with:
  1096. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || env.SHA8 }}
  1097. path: |
  1098. Cardinal-*.exe
  1099. Cardinal-*.zip
  1100. - uses: softprops/action-gh-release@v1
  1101. if: startsWith(github.ref, 'refs/tags/')
  1102. with:
  1103. tag_name: ${{ github.ref_name }}
  1104. name: ${{ github.ref_name }}
  1105. draft: false
  1106. prerelease: false
  1107. files: |
  1108. Cardinal-*.exe
  1109. Cardinal-*.zip
  1110. source-tarball:
  1111. runs-on: ubuntu-20.04
  1112. steps:
  1113. - uses: actions/checkout@v3
  1114. with:
  1115. submodules: recursive
  1116. - name: Set up dependencies
  1117. run: |
  1118. sudo apt-get update -qq
  1119. sudo apt-get install -yqq liblo-dev
  1120. sudo apt-get clean
  1121. - name: Create source tarball
  1122. run: |
  1123. make HEADLESS=true tarball
  1124. make HEADLESS=true tarball+deps
  1125. - name: Set sha8 (non-release)
  1126. if: startsWith(github.ref, 'refs/tags/') != true
  1127. run: echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
  1128. - name: Set sha8 (release)
  1129. if: startsWith(github.ref, 'refs/tags/')
  1130. run: echo "SHA8=$(echo ${{ github.ref_name }})" >> $GITHUB_ENV
  1131. - uses: actions/upload-artifact@v3
  1132. with:
  1133. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || env.SHA8 }}
  1134. path: |
  1135. /home/runner/cardinal*.tar.xz
  1136. /home/runner/*/cardinal*.tar.xz
  1137. /home/runner/*/*/cardinal*.tar.xz
  1138. - uses: softprops/action-gh-release@v1
  1139. if: startsWith(github.ref, 'refs/tags/')
  1140. with:
  1141. tag_name: ${{ github.ref_name }}
  1142. name: ${{ github.ref_name }}
  1143. draft: false
  1144. prerelease: false
  1145. files: |
  1146. /home/runner/cardinal*.tar.xz
  1147. /home/runner/*/cardinal*.tar.xz
  1148. /home/runner/*/*/cardinal*.tar.xz
  1149. plugin-validation:
  1150. runs-on: ubuntu-20.04
  1151. steps:
  1152. - uses: actions/checkout@v3
  1153. with:
  1154. submodules: recursive
  1155. - name: Set up cache
  1156. id: cache
  1157. uses: actions/cache@v3
  1158. with:
  1159. path: |
  1160. src/Rack/dep/bin
  1161. src/Rack/dep/include
  1162. src/Rack/dep/lib
  1163. src/Rack/dep/share
  1164. src/Rack/dep/jansson-2.12
  1165. src/Rack/dep/libarchive-3.4.3
  1166. src/Rack/dep/libsamplerate-0.1.9
  1167. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  1168. src/Rack/dep/zstd-1.4.5
  1169. key: pluginval-v${{ env.CACHE_VERSION }}
  1170. - name: Set up dependencies
  1171. run: |
  1172. # custom repos
  1173. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
  1174. sudo dpkg -i kxstudio-repos_11.1.0_all.deb
  1175. sudo apt-get update -qq
  1176. # build-deps
  1177. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  1178. # runtime testing
  1179. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb
  1180. sudo apt-get clean
  1181. # multiple jobs for building carla, deps and plugins
  1182. - name: Build Cardinal (carla, deps and plugins)
  1183. env:
  1184. CFLAGS: -g
  1185. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions
  1186. LDFLAGS: -static-libgcc -static-libstdc++
  1187. WITH_LTO: false
  1188. run: |
  1189. make features
  1190. make NOOPT=true SKIP_STRIPPING=true carla deps dgl plugins resources -j $(nproc)
  1191. # single job for final build stage, otherwise we might get killed due to OOM
  1192. - name: Build Cardinal (final build stage)
  1193. env:
  1194. CFLAGS: -g
  1195. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING -Wno-pmf-conversions
  1196. LDFLAGS: -static-libgcc -static-libstdc++
  1197. WITH_LTO: false
  1198. run: |
  1199. make features
  1200. make NOOPT=true SKIP_STRIPPING=true -j 1 -C src jack
  1201. make NOOPT=true -j 1
  1202. ./dpf/utils/generate-ttl.sh
  1203. - name: Run Cardinal self-tests
  1204. run: |
  1205. # --exit-on-first-error=yes
  1206. xvfb-run valgrind \
  1207. --gen-suppressions=all \
  1208. --error-exitcode=255 \
  1209. --leak-check=no \
  1210. --track-origins=yes \
  1211. --keep-debuginfo=yes \
  1212. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1213. ./bin/Cardinal selftest
  1214. - name: Validate LV2 ttl syntax
  1215. run: |
  1216. lv2_validate \
  1217. /usr/lib/lv2/kx-meta/*.ttl \
  1218. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  1219. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  1220. /usr/lib/lv2/mod.lv2/*.ttl \
  1221. /usr/lib/lv2/modgui.lv2/*.ttl \
  1222. ./bin/*.lv2/*.ttl
  1223. - name: Validate LV2 metadata and binaries
  1224. run: |
  1225. export LV2_PATH=/tmp/lv2-path
  1226. mkdir ${LV2_PATH}
  1227. mv bin/CardinalFX.lv2 bin/CardinalSynth.lv2 ${LV2_PATH}
  1228. cp -r /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,mod,modgui,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 ${LV2_PATH}
  1229. xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  1230. - name: Test LV2 plugin
  1231. run: |
  1232. export LV2_PATH=/tmp/lv2-path
  1233. for p in $(lv2ls); do \
  1234. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  1235. xvfb-run valgrind \
  1236. --error-exitcode=255 \
  1237. --leak-check=no \
  1238. --track-origins=yes \
  1239. --keep-debuginfo=yes \
  1240. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1241. /usr/lib/carla/carla-bridge-native lv2 "" ${p}; \
  1242. done
  1243. - name: Test VST2 plugin
  1244. run: |
  1245. for p in $(ls bin/*.vst/*.so); do \
  1246. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  1247. xvfb-run valgrind \
  1248. --error-exitcode=255 \
  1249. --leak-check=no \
  1250. --track-origins=yes \
  1251. --keep-debuginfo=yes \
  1252. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1253. /usr/lib/carla/carla-bridge-native vst2 ./${p} ""; \
  1254. done
  1255. - name: Test VST3 plugin
  1256. run: |
  1257. for p in $(ls bin/ | grep vst3); do \
  1258. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  1259. xvfb-run valgrind \
  1260. --error-exitcode=255 \
  1261. --leak-check=no \
  1262. --track-origins=yes \
  1263. --keep-debuginfo=yes \
  1264. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1265. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} ""; \
  1266. done