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.

1142 lines
49KB

  1. name: build
  2. on:
  3. push:
  4. env:
  5. CACHE_VERSION: 31
  6. CARDINAL_UNDER_WINE: 1
  7. DEBIAN_FRONTEND: noninteractive
  8. HOMEBREW_NO_AUTO_UPDATE: 1
  9. LIBGL_ALWAYS_SOFTWARE: 'true'
  10. WITH_LTO: 'true'
  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 libdbus-1-dev:arm64 libgl1-mesa-dev:arm64 libglib2.0-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. export PATH="/usr/lib/ccache:${PATH}"
  58. ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64 && ./deps/PawPaw/.cleanup.sh linux-aarch64
  59. - name: Build linux arm64 cross-compiled
  60. run: |
  61. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  62. export PATH="/usr/lib/ccache:${PATH}"
  63. pushd deps/PawPaw; source local.env linux-aarch64; popd
  64. make features
  65. make CIBUILD=true 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) ../CardinalJACK ../CardinalNative
  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 libdbus-1-dev:armhf libgl1-mesa-dev:armhf libglib2.0-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. export PATH="/usr/lib/ccache:${PATH}"
  141. ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf && ./deps/PawPaw/.cleanup.sh linux-armhf
  142. - name: Build linux armhf cross-compiled
  143. run: |
  144. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  145. export PATH="/usr/lib/ccache:${PATH}"
  146. pushd deps/PawPaw; source local.env linux-armhf; popd
  147. make features
  148. make CIBUILD=true 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) ../CardinalJACK ../CardinalNative
  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++-multilib libdbus-1-dev:i386 libgl1-mesa-dev:i386 libglib2.0-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. export PATH="/usr/lib/ccache:${PATH}"
  220. ./deps/PawPaw/bootstrap-cardinal.sh linux-i686 && ./deps/PawPaw/.cleanup.sh linux-i686
  221. - name: Build linux i686
  222. run: |
  223. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  224. export PATH="/usr/lib/ccache:${PATH}"
  225. pushd deps/PawPaw; source local.env linux-i686; popd
  226. make features
  227. make CIBUILD=true 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) ../CardinalJACK ../CardinalNative
  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-x86_64:
  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-x86_64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  279. - name: Set up dependencies
  280. run: |
  281. sudo apt-get update -qq
  282. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  283. - name: Set up ccache
  284. uses: hendrikmuhs/ccache-action@v1.2
  285. with:
  286. key: ccache-linux-x86_64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  287. - name: Build extra dependencies
  288. run: |
  289. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  290. export PATH="/usr/lib/ccache:${PATH}"
  291. ./deps/PawPaw/bootstrap-cardinal.sh linux && ./deps/PawPaw/.cleanup.sh linux
  292. - name: Build linux x86_64
  293. run: |
  294. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  295. export PATH="/usr/lib/ccache:${PATH}"
  296. pushd deps/PawPaw; source local.env linux; popd
  297. make features
  298. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  299. make unzipfx
  300. - name: Set sha8 (non-release)
  301. if: startsWith(github.ref, 'refs/tags/') != true
  302. id: slug1
  303. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  304. - name: Set sha8 (release)
  305. if: startsWith(github.ref, 'refs/tags/')
  306. id: slug2
  307. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  308. - name: Set sha8
  309. id: slug
  310. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  311. - name: Pack binaries
  312. run: |
  313. 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) ../CardinalJACK ../CardinalNative
  314. - uses: actions/upload-artifact@v2
  315. with:
  316. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  317. path: |
  318. *.tar.gz
  319. - uses: softprops/action-gh-release@v1
  320. if: startsWith(github.ref, 'refs/tags/')
  321. with:
  322. tag_name: ${{ github.ref_name }}
  323. name: ${{ github.ref_name }}
  324. draft: false
  325. prerelease: false
  326. files: |
  327. *.tar.gz
  328. linux-x86_64-debug:
  329. runs-on: ubuntu-20.04
  330. steps:
  331. - uses: actions/checkout@v2
  332. with:
  333. submodules: recursive
  334. - name: Set up dependencies
  335. run: |
  336. sudo apt-get update -qq
  337. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  338. - name: Build linux x86_64 (debug)
  339. env:
  340. LDFLAGS: -static-libgcc -static-libstdc++
  341. run: |
  342. make features
  343. make DEBUG=true -j $(nproc)
  344. - name: Set sha8
  345. id: slug
  346. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  347. - name: Pack binaries
  348. run: |
  349. 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)
  350. - uses: actions/upload-artifact@v2
  351. with:
  352. name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  353. path: |
  354. *.tar.gz
  355. linux-x86_64-headless:
  356. runs-on: ubuntu-20.04
  357. steps:
  358. - uses: actions/checkout@v2
  359. with:
  360. submodules: recursive
  361. - name: Set up dependencies
  362. run: |
  363. sudo apt-get update -qq
  364. sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev
  365. sudo apt-get install -yqq liblo-dev
  366. - name: Build linux x86_64 (headless)
  367. run: |
  368. make HEADLESS=true features
  369. make HEADLESS=true -j $(nproc)
  370. linux-x86_64-sysdeps:
  371. runs-on: ubuntu-20.04
  372. steps:
  373. - uses: actions/checkout@v2
  374. with:
  375. submodules: recursive
  376. - name: Set up dependencies
  377. run: |
  378. sudo apt-get update -qq
  379. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libarchive-dev libjansson-dev libsamplerate0-dev libsndfile1-dev libspeexdsp-dev
  380. - name: Build linux x86_64 (sysdeps)
  381. run: |
  382. make features
  383. make SYSDEPS=true -j $(nproc)
  384. macos-intel:
  385. runs-on: macos-11
  386. steps:
  387. - uses: actions/checkout@v2
  388. with:
  389. submodules: recursive
  390. - name: Set up cache
  391. id: cache
  392. uses: actions/cache@v2
  393. with:
  394. path: |
  395. ~/PawPawBuilds
  396. src/Rack/dep/bin
  397. src/Rack/dep/include
  398. src/Rack/dep/lib
  399. src/Rack/dep/share
  400. src/Rack/dep/jansson-2.12
  401. src/Rack/dep/libarchive-3.4.3
  402. src/Rack/dep/libsamplerate-0.1.9
  403. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  404. src/Rack/dep/zstd-1.4.5
  405. key: macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  406. - name: Set up ccache
  407. uses: hendrikmuhs/ccache-action@v1.2
  408. with:
  409. key: ccache-macos-intel-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  410. - name: Build extra dependencies
  411. run: |
  412. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  413. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  414. ./deps/PawPaw/bootstrap-cardinal.sh macos && ./deps/PawPaw/.cleanup.sh macos
  415. - name: Build macOS intel (base)
  416. run: |
  417. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  418. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  419. pushd deps/PawPaw; source local.env macos; popd
  420. make features
  421. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu)
  422. - name: Build macOS intel (AU using juce)
  423. env:
  424. MACOSX_DEPLOYMENT_TARGET: '10.8'
  425. run: |
  426. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  427. pushd deps/PawPaw; source local.env macos; popd
  428. git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
  429. sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h
  430. mkdir -p jucewrapper/build
  431. 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
  432. mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
  433. - name: Build macOS intel (packaging)
  434. env:
  435. MACOS_ARCHS: 'x86_64'
  436. run: |
  437. pushd deps/PawPaw; source local.env macos; popd
  438. ./utils/create-macos-installer.sh
  439. - name: Set sha8 (non-release)
  440. if: startsWith(github.ref, 'refs/tags/') != true
  441. id: slug1
  442. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  443. - name: Set sha8 (release)
  444. if: startsWith(github.ref, 'refs/tags/')
  445. id: slug2
  446. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  447. - name: Set sha8
  448. id: slug
  449. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  450. - name: Rename macOS bundle
  451. run: |
  452. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg
  453. - uses: actions/upload-artifact@v2
  454. with:
  455. name: ${{ github.event.repository.name }}-macOS-intel-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  456. path: |
  457. ${{ github.event.repository.name }}-*.pkg
  458. - uses: softprops/action-gh-release@v1
  459. if: startsWith(github.ref, 'refs/tags/')
  460. with:
  461. tag_name: ${{ github.ref_name }}
  462. name: ${{ github.ref_name }}
  463. draft: false
  464. prerelease: false
  465. files: |
  466. ${{ github.event.repository.name }}-*.pkg
  467. macos-universal:
  468. runs-on: macos-11
  469. steps:
  470. - uses: actions/checkout@v2
  471. with:
  472. submodules: recursive
  473. - name: Set up cache
  474. id: cache
  475. uses: actions/cache@v2
  476. with:
  477. path: |
  478. ~/PawPawBuilds
  479. src/Rack/dep/bin
  480. src/Rack/dep/include
  481. src/Rack/dep/lib
  482. src/Rack/dep/share
  483. src/Rack/dep/jansson-2.12
  484. src/Rack/dep/libarchive-3.4.3
  485. src/Rack/dep/libsamplerate-0.1.9
  486. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  487. src/Rack/dep/zstd-1.4.5
  488. key: macos-universal-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  489. - name: Set up ccache
  490. uses: hendrikmuhs/ccache-action@v1.2
  491. with:
  492. key: ccache-macos-universal-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-universal && ./deps/PawPaw/.cleanup.sh macos-universal
  498. - name: Build macOS universal (base)
  499. run: |
  500. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  501. export PATH="/usr/local/opt/ccache/libexec:${PATH}"
  502. pushd deps/PawPaw; source local.env macos-universal; popd
  503. make features
  504. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(sysctl -n hw.logicalcpu)
  505. - name: Build macOS universal (AU using juce)
  506. env:
  507. MACOSX_DEPLOYMENT_TARGET: '10.12'
  508. run: |
  509. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  510. pushd deps/PawPaw; source local.env macos-universal; popd
  511. git clone --depth=1 -b 6.1.6 https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
  512. mkdir -p jucewrapper/build
  513. 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
  514. mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
  515. - name: Build macOS universal (packaging)
  516. env:
  517. MACOS_ARCHS: 'arm64,x86_64'
  518. run: |
  519. pushd deps/PawPaw; source local.env macos-universal; popd
  520. ./utils/create-macos-installer.sh
  521. - name: Set sha8 (non-release)
  522. if: startsWith(github.ref, 'refs/tags/') != true
  523. id: slug1
  524. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  525. - name: Set sha8 (release)
  526. if: startsWith(github.ref, 'refs/tags/')
  527. id: slug2
  528. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  529. - name: Set sha8
  530. id: slug
  531. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  532. - name: Rename macOS bundle
  533. run: |
  534. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg
  535. - uses: actions/upload-artifact@v2
  536. with:
  537. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  538. path: |
  539. ${{ github.event.repository.name }}-*.pkg
  540. - uses: softprops/action-gh-release@v1
  541. if: startsWith(github.ref, 'refs/tags/')
  542. with:
  543. tag_name: ${{ github.ref_name }}
  544. name: ${{ github.ref_name }}
  545. draft: false
  546. prerelease: false
  547. files: |
  548. ${{ github.event.repository.name }}-*.pkg
  549. modduo:
  550. runs-on: ubuntu-20.04
  551. steps:
  552. - uses: actions/checkout@v2
  553. with:
  554. submodules: recursive
  555. - name: Set up cache
  556. uses: actions/cache@v2
  557. id: mpb-cache
  558. with:
  559. path: |
  560. ~/mod-workdir
  561. key: modduo-static-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  562. - name: Set up dependencies
  563. run: |
  564. sudo apt-get update -qq
  565. 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
  566. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  567. - name: Bootstrap toolchain
  568. if: steps.mpb-cache.outputs.cache-hit != 'true'
  569. run: |
  570. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  571. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  572. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
  573. - name: Build for modduo
  574. run: |
  575. make modduo HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} MODDUO=true -j $(nproc)
  576. - name: Set sha8
  577. id: slug
  578. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  579. - name: Pack binaries
  580. run: |
  581. 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)
  582. - uses: actions/upload-artifact@v2
  583. with:
  584. name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  585. path: |
  586. *.tar.gz
  587. modduox:
  588. runs-on: ubuntu-20.04
  589. steps:
  590. - uses: actions/checkout@v2
  591. with:
  592. submodules: recursive
  593. - name: Set up cache
  594. uses: actions/cache@v2
  595. id: mpb-cache
  596. with:
  597. path: |
  598. ~/mod-workdir
  599. key: modduox-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  600. - name: Set up dependencies
  601. run: |
  602. sudo apt-get update -qq
  603. 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
  604. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  605. - name: Bootstrap toolchain
  606. if: steps.mpb-cache.outputs.cache-hit != 'true'
  607. run: |
  608. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  609. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  610. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
  611. - name: Build for modduox
  612. run: |
  613. make modduox HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  614. - name: Set sha8
  615. id: slug
  616. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  617. - name: Pack binaries
  618. run: |
  619. 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)
  620. - uses: actions/upload-artifact@v2
  621. with:
  622. name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  623. path: |
  624. *.tar.gz
  625. moddwarf:
  626. runs-on: ubuntu-20.04
  627. steps:
  628. - uses: actions/checkout@v2
  629. with:
  630. submodules: recursive
  631. - name: Set up cache
  632. uses: actions/cache@v2
  633. id: mpb-cache
  634. with:
  635. path: |
  636. ~/mod-workdir
  637. key: moddwarf-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  638. - name: Set up dependencies
  639. run: |
  640. sudo apt-get update -qq
  641. 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
  642. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  643. - name: Bootstrap toolchain
  644. if: steps.mpb-cache.outputs.cache-hit != 'true'
  645. run: |
  646. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  647. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  648. $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
  649. - name: Build for moddwarf
  650. run: |
  651. make moddwarf HEADLESS=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  652. - name: Set sha8
  653. id: slug
  654. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  655. - name: Pack binaries
  656. run: |
  657. 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)
  658. - uses: actions/upload-artifact@v2
  659. with:
  660. name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  661. path: |
  662. *.tar.gz
  663. wasm:
  664. runs-on: ubuntu-20.04
  665. steps:
  666. - uses: actions/checkout@v2
  667. with:
  668. submodules: recursive
  669. - name: Set up cache
  670. id: cache
  671. uses: actions/cache@v2
  672. with:
  673. path: |
  674. ~/PawPawBuilds
  675. src/Rack/dep/bin
  676. src/Rack/dep/include
  677. src/Rack/dep/lib
  678. src/Rack/dep/share
  679. src/Rack/dep/jansson-2.12
  680. src/Rack/dep/libarchive-3.4.3
  681. src/Rack/dep/libsamplerate-0.1.9
  682. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  683. src/Rack/dep/zstd-1.4.5
  684. key: wasm-v${{ env.CACHE_VERSION }}
  685. - name: Set up dependencies
  686. run: |
  687. [ -e ~/PawPawBuilds/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/PawPawBuilds/emsdk
  688. cd ~/PawPawBuilds/emsdk && ./emsdk install latest && ./emsdk activate latest
  689. - name: Build extra dependencies
  690. run: |
  691. source ~/PawPawBuilds/emsdk/emsdk_env.sh
  692. ./deps/PawPaw/bootstrap-cardinal.sh wasm && ./deps/PawPaw/.cleanup.sh wasm
  693. - name: Build wasm cross-compiled
  694. run: |
  695. source ~/PawPawBuilds/emsdk/emsdk_env.sh
  696. pushd deps/PawPaw; source local.env wasm; popd
  697. make features
  698. make CIBUILD=true NOOPT=true USE_GLES2=true -j $(nproc)
  699. - name: Set sha8 (non-release)
  700. if: startsWith(github.ref, 'refs/tags/') != true
  701. id: slug1
  702. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  703. - name: Set sha8 (release)
  704. if: startsWith(github.ref, 'refs/tags/')
  705. id: slug2
  706. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  707. - name: Set sha8
  708. id: slug
  709. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  710. - name: Pack binaries
  711. run: |
  712. 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)
  713. - uses: actions/upload-artifact@v2
  714. with:
  715. name: ${{ github.event.repository.name }}-wasm-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  716. path: |
  717. *.zip
  718. - uses: softprops/action-gh-release@v1
  719. if: startsWith(github.ref, 'refs/tags/')
  720. with:
  721. tag_name: ${{ github.ref_name }}
  722. name: ${{ github.ref_name }}
  723. draft: false
  724. prerelease: false
  725. files: |
  726. *.zip
  727. wasm-mini:
  728. runs-on: ubuntu-20.04
  729. steps:
  730. - uses: actions/checkout@v2
  731. with:
  732. submodules: recursive
  733. - name: Set up cache
  734. id: cache
  735. uses: actions/cache@v2
  736. with:
  737. path: |
  738. ~/emsdk
  739. src/Rack/dep/bin
  740. src/Rack/dep/include
  741. src/Rack/dep/lib
  742. src/Rack/dep/share
  743. src/Rack/dep/jansson-2.12
  744. src/Rack/dep/libarchive-3.4.3
  745. src/Rack/dep/libsamplerate-0.1.9
  746. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  747. src/Rack/dep/zstd-1.4.5
  748. key: wasm-mini-v${{ env.CACHE_VERSION }}
  749. - name: Set up dependencies
  750. run: |
  751. [ -e ~/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/emsdk
  752. cd ~/emsdk && ./emsdk install latest && ./emsdk activate latest
  753. - name: Build wasm-mini cross-compiled
  754. env:
  755. AR: emar
  756. CC: emcc
  757. CXX: em++
  758. NM: emnm
  759. RANLIB: emranlib
  760. STRIP: emstrip
  761. run: |
  762. source ~/emsdk/emsdk_env.sh
  763. make features
  764. make CIBUILD=true NOPLUGINS=true STATIC_BUILD=true USE_GLES2=true -j $(nproc)
  765. - name: Set sha8 (non-release)
  766. if: startsWith(github.ref, 'refs/tags/') != true
  767. id: slug1
  768. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  769. - name: Set sha8 (release)
  770. if: startsWith(github.ref, 'refs/tags/')
  771. id: slug2
  772. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  773. - name: Set sha8
  774. id: slug
  775. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  776. - name: Pack binaries
  777. run: |
  778. 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)
  779. - uses: actions/upload-artifact@v2
  780. with:
  781. name: ${{ github.event.repository.name }}-wasm-mini-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  782. path: |
  783. *.zip
  784. - uses: softprops/action-gh-release@v1
  785. if: startsWith(github.ref, 'refs/tags/')
  786. with:
  787. tag_name: ${{ github.ref_name }}
  788. name: ${{ github.ref_name }}
  789. draft: false
  790. prerelease: false
  791. files: |
  792. *.zip
  793. win32:
  794. runs-on: ubuntu-20.04
  795. steps:
  796. - uses: actions/checkout@v2
  797. with:
  798. submodules: recursive
  799. - name: Set up cache
  800. id: cache
  801. uses: actions/cache@v2
  802. with:
  803. path: |
  804. ~/PawPawBuilds
  805. src/Rack/dep/bin
  806. src/Rack/dep/include
  807. src/Rack/dep/lib
  808. src/Rack/dep/share
  809. src/Rack/dep/jansson-2.12
  810. src/Rack/dep/libarchive-3.4.3
  811. src/Rack/dep/libsamplerate-0.1.9
  812. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  813. src/Rack/dep/zstd-1.4.5
  814. key: win32-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  815. - name: Fix GitHub's mess
  816. run: |
  817. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  818. sudo apt-get update -qq
  819. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  820. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  821. - name: Set up dependencies
  822. run: |
  823. sudo dpkg --add-architecture i386
  824. sudo apt-get update -qq
  825. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb
  826. - name: Set up ccache
  827. uses: hendrikmuhs/ccache-action@v1.2
  828. with:
  829. key: ccache-win32-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  830. - name: Build extra dependencies
  831. run: |
  832. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  833. export PATH="/usr/lib/ccache:${PATH}"
  834. ./deps/PawPaw/bootstrap-cardinal.sh win32 && ./deps/PawPaw/.cleanup.sh win32
  835. - name: Build win32 cross-compiled (base)
  836. run: |
  837. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  838. export PATH="/usr/lib/ccache:${PATH}"
  839. pushd deps/PawPaw; source local.env win32; popd
  840. make features
  841. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  842. - name: Build win64 cross-compiled (carla)
  843. run: |
  844. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  845. export PATH="/usr/lib/ccache:${PATH}"
  846. pushd deps/PawPaw; source local.env win32; popd
  847. make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_CUSTOM_DPF=true CUSTOM_DPF_PATH=$(pwd)/dpf -j $(nproc)
  848. make -C carla EMBED_TARGET=true TESTING=true dist
  849. make -C carla EMBED_TARGET=true TESTING=true dist
  850. - name: Build win64 cross-compiled (packaging)
  851. run: |
  852. pushd deps/PawPaw; source local.env win32; popd
  853. xvfb-run ./utils/create-windows-installer.sh 32
  854. - name: Set sha8 (non-release)
  855. if: startsWith(github.ref, 'refs/tags/') != true
  856. id: slug1
  857. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  858. - name: Set sha8 (release)
  859. if: startsWith(github.ref, 'refs/tags/')
  860. id: slug2
  861. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  862. - name: Set sha8
  863. id: slug
  864. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  865. - name: Pack binaries
  866. run: |
  867. cd bin; zip -r -9 ../${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst)
  868. - uses: actions/upload-artifact@v2
  869. with:
  870. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  871. path: |
  872. *.exe
  873. *.zip
  874. - uses: softprops/action-gh-release@v1
  875. if: startsWith(github.ref, 'refs/tags/')
  876. with:
  877. tag_name: ${{ github.ref_name }}
  878. name: ${{ github.ref_name }}
  879. draft: false
  880. prerelease: false
  881. files: |
  882. *.exe
  883. *.zip
  884. win64:
  885. runs-on: ubuntu-20.04
  886. steps:
  887. - uses: actions/checkout@v2
  888. with:
  889. submodules: recursive
  890. - name: Set up cache
  891. id: cache
  892. uses: actions/cache@v2
  893. with:
  894. path: |
  895. ~/PawPawBuilds
  896. src/Rack/dep/bin
  897. src/Rack/dep/include
  898. src/Rack/dep/lib
  899. src/Rack/dep/share
  900. src/Rack/dep/jansson-2.12
  901. src/Rack/dep/libarchive-3.4.3
  902. src/Rack/dep/libsamplerate-0.1.9
  903. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  904. src/Rack/dep/zstd-1.4.5
  905. key: win64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  906. - name: Fix GitHub's mess
  907. run: |
  908. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  909. sudo apt-get update -qq
  910. sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  911. sudo apt-get purge -yqq libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
  912. - name: Set up dependencies
  913. run: |
  914. sudo dpkg --add-architecture i386
  915. sudo apt-get update -qq
  916. 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
  917. - name: Set up ccache
  918. uses: hendrikmuhs/ccache-action@v1.2
  919. with:
  920. key: ccache-win64-v${{ env.CACHE_VERSION }}-${{ env.WITH_LTO }}
  921. - name: Build extra dependencies
  922. run: |
  923. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  924. export PATH="/usr/lib/ccache:${PATH}"
  925. ./deps/PawPaw/bootstrap-cardinal.sh win64 && ./deps/PawPaw/.cleanup.sh win64
  926. - name: Build win64 cross-compiled (base)
  927. run: |
  928. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  929. export PATH="/usr/lib/ccache:${PATH}"
  930. pushd deps/PawPaw; source local.env win64; popd
  931. make features
  932. make CIBUILD=true NOOPT=true WITH_LTO=${{ env.WITH_LTO }} -j $(nproc)
  933. - name: Build win64 cross-compiled (carla)
  934. run: |
  935. if [ "${{ env.WITH_LTO }}" != "true" ]; then export PAWPAW_SKIP_LTO=1; fi
  936. export PATH="/usr/lib/ccache:${PATH}"
  937. pushd deps/PawPaw; source local.env win64; popd
  938. make -C carla CARLA_BACKEND_NAMESPACE=Cardinal EXTERNAL_PLUGINS=true HAVE_FLUIDSYNTH=false HAVE_ZYN_DEPS=false HAVE_ZYN_UI_DEPS=false HAVE_PYQT=true HAVE_QT5=true HAVE_QT5PKG=true STATIC_PLUGIN_TARGET=true USING_CUSTOM_DPF=true CUSTOM_DPF_PATH=$(pwd)/dpf all win32r -j $(nproc)
  939. make -C carla EMBED_TARGET=true TESTING=true dist
  940. make -C carla EMBED_TARGET=true TESTING=true dist
  941. - name: Build win64 cross-compiled (packaging)
  942. run: |
  943. pushd deps/PawPaw; source local.env win64; popd
  944. xvfb-run ./utils/create-windows-installer.sh 64
  945. - name: Set sha8 (non-release)
  946. if: startsWith(github.ref, 'refs/tags/') != true
  947. id: slug1
  948. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  949. - name: Set sha8 (release)
  950. if: startsWith(github.ref, 'refs/tags/')
  951. id: slug2
  952. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  953. - name: Set sha8
  954. id: slug
  955. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  956. - name: Pack binaries
  957. run: |
  958. cd bin; zip -r -9 ../${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip $(ls | grep -e lv2 -e vst)
  959. - uses: actions/upload-artifact@v2
  960. with:
  961. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  962. path: |
  963. *.exe
  964. *.zip
  965. - uses: softprops/action-gh-release@v1
  966. if: startsWith(github.ref, 'refs/tags/')
  967. with:
  968. tag_name: ${{ github.ref_name }}
  969. name: ${{ github.ref_name }}
  970. draft: false
  971. prerelease: false
  972. files: |
  973. *.exe
  974. *.zip
  975. source-tarball:
  976. runs-on: ubuntu-20.04
  977. steps:
  978. - uses: actions/checkout@v2
  979. with:
  980. submodules: recursive
  981. - name: Set up dependencies
  982. run: |
  983. sudo apt-get update -qq
  984. sudo apt-get install -yqq liblo-dev
  985. - name: Create source tarball
  986. run: |
  987. make HEADLESS=true tarball
  988. make HEADLESS=true tarball+deps
  989. - name: Set sha8 (non-release)
  990. if: startsWith(github.ref, 'refs/tags/') != true
  991. id: slug1
  992. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  993. - name: Set sha8 (release)
  994. if: startsWith(github.ref, 'refs/tags/')
  995. id: slug2
  996. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  997. - name: Set sha8
  998. id: slug
  999. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  1000. - uses: actions/upload-artifact@v2
  1001. with:
  1002. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  1003. path: |
  1004. /home/runner/cardinal*.tar.xz
  1005. /home/runner/*/cardinal*.tar.xz
  1006. /home/runner/*/*/cardinal*.tar.xz
  1007. - uses: softprops/action-gh-release@v1
  1008. if: startsWith(github.ref, 'refs/tags/')
  1009. with:
  1010. tag_name: ${{ github.ref_name }}
  1011. name: ${{ github.ref_name }}
  1012. draft: false
  1013. prerelease: false
  1014. files: |
  1015. /home/runner/cardinal*.tar.xz
  1016. /home/runner/*/cardinal*.tar.xz
  1017. /home/runner/*/*/cardinal*.tar.xz
  1018. plugin-validation:
  1019. runs-on: ubuntu-20.04
  1020. steps:
  1021. - uses: actions/checkout@v2
  1022. with:
  1023. submodules: recursive
  1024. - name: Set up cache
  1025. id: cache
  1026. uses: actions/cache@v2
  1027. with:
  1028. path: |
  1029. src/Rack/dep/bin
  1030. src/Rack/dep/include
  1031. src/Rack/dep/lib
  1032. src/Rack/dep/share
  1033. src/Rack/dep/jansson-2.12
  1034. src/Rack/dep/libarchive-3.4.3
  1035. src/Rack/dep/libsamplerate-0.1.9
  1036. src/Rack/dep/speexdsp-SpeexDSP-1.2rc3
  1037. src/Rack/dep/zstd-1.4.5
  1038. key: pluginval-v${{ env.CACHE_VERSION }}
  1039. - name: Set up dependencies
  1040. run: |
  1041. # custom repos
  1042. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.1.0_all.deb
  1043. sudo dpkg -i kxstudio-repos_11.1.0_all.deb
  1044. sudo apt-get update -qq
  1045. # build-deps
  1046. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  1047. # runtime testing
  1048. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint kxstudio-lv2-extensions mod-lv2-extensions valgrind xvfb
  1049. - name: Set up ccache
  1050. uses: hendrikmuhs/ccache-action@v1.2
  1051. with:
  1052. key: ccache-pluginval-v${{ env.CACHE_VERSION }}
  1053. - name: Build Cardinal
  1054. env:
  1055. CFLAGS: -g
  1056. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR -DDPF_RUNTIME_TESTING
  1057. LDFLAGS: -static-libgcc -static-libstdc++
  1058. run: |
  1059. export PATH="/usr/lib/ccache:${PATH}"
  1060. make features
  1061. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  1062. - name: Run Cardinal self-tests
  1063. run: |
  1064. # --exit-on-first-error=yes
  1065. xvfb-run valgrind \
  1066. --gen-suppressions=all \
  1067. --error-exitcode=255 \
  1068. --leak-check=no \
  1069. --track-origins=yes \
  1070. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1071. ./bin/Cardinal selftest
  1072. - name: Validate LV2 ttl syntax
  1073. run: |
  1074. lv2_validate \
  1075. /usr/lib/lv2/mod.lv2/*.ttl \
  1076. /usr/lib/lv2/kx-meta/*.ttl \
  1077. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  1078. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  1079. ./bin/*.lv2/*.ttl
  1080. - name: Validate LV2 metadata and binaries
  1081. run: |
  1082. export LV2_PATH=/tmp/lv2-path
  1083. mkdir ${LV2_PATH}
  1084. cp -r bin/CardinalFX.lv2 bin/CardinalSynth.lv2 \
  1085. /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 \
  1086. ${LV2_PATH}
  1087. xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  1088. - name: Test LV2 plugin
  1089. run: |
  1090. export LV2_PATH=/tmp/lv2-path
  1091. for p in $(lv2ls); do \
  1092. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  1093. xvfb-run valgrind \
  1094. --error-exitcode=255 \
  1095. --leak-check=no \
  1096. --track-origins=yes \
  1097. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1098. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  1099. done
  1100. - name: Test VST2 plugin
  1101. run: |
  1102. for p in $(ls bin/*.vst/*.so); do \
  1103. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  1104. xvfb-run valgrind \
  1105. --error-exitcode=255 \
  1106. --leak-check=no \
  1107. --track-origins=yes \
  1108. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1109. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  1110. done
  1111. - name: Test VST3 plugin
  1112. run: |
  1113. for p in $(ls bin/ | grep vst3); do \
  1114. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  1115. xvfb-run valgrind \
  1116. --error-exitcode=255 \
  1117. --leak-check=no \
  1118. --track-origins=yes \
  1119. --suppressions=./dpf/utils/valgrind-dpf.supp \
  1120. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  1121. done