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.

1190 lines
52KB

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