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.

1282 lines
57KB

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