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.

1244 lines
55KB

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