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.

1263 lines
55KB

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