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.

853 lines
35KB

  1. name: build
  2. on:
  3. push:
  4. env:
  5. CACHE_VERSION: 13
  6. DEBIAN_FRONTEND: noninteractive
  7. HOMEBREW_NO_AUTO_UPDATE: 1
  8. LIBGL_ALWAYS_SOFTWARE: 'true'
  9. jobs:
  10. linux-arm64:
  11. runs-on: ubuntu-20.04
  12. steps:
  13. - uses: actions/checkout@v2
  14. with:
  15. submodules: recursive
  16. - name: Set up cache
  17. id: cache
  18. uses: actions/cache@v2
  19. with:
  20. path: |
  21. ~/PawPawBuilds
  22. build
  23. carla/build
  24. dpf/build
  25. key: linux-arm64-v${{ env.CACHE_VERSION }}
  26. - name: Fix GitHub's mess
  27. run: |
  28. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  29. sudo apt-get update -qq
  30. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  31. - name: Set up dependencies
  32. run: |
  33. sudo dpkg --add-architecture arm64
  34. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  35. 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
  36. 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
  37. 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
  38. sudo apt-get update -qq
  39. 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
  40. - name: Build extra dependencies
  41. env:
  42. PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
  43. run: |
  44. ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64
  45. - name: Restore build timestamp
  46. if: steps.cache.outputs.cache-hit == 'true'
  47. shell: bash
  48. run: |
  49. TS=$(cat build/timestamp)
  50. find . -type f -exec touch -a -m -t ${TS} {} \;
  51. - name: Build linux arm64 cross-compiled
  52. run: |
  53. pushd deps/PawPaw; source local.env linux-aarch64; popd
  54. make features
  55. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  56. make unzipfx
  57. - name: Set build timestamp
  58. run: |
  59. date +%Y%m%d%H%M > build/timestamp
  60. - name: Set sha8 (non-release)
  61. if: startsWith(github.ref, 'refs/tags/') != true
  62. id: slug1
  63. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  64. - name: Set sha8 (release)
  65. if: startsWith(github.ref, 'refs/tags/')
  66. id: slug2
  67. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  68. - name: Set sha8
  69. id: slug
  70. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  71. - name: Pack binaries
  72. run: |
  73. 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) ../Cardinal
  74. - uses: actions/upload-artifact@v2
  75. with:
  76. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  77. path: |
  78. *.tar.gz
  79. - uses: softprops/action-gh-release@v1
  80. if: startsWith(github.ref, 'refs/tags/')
  81. with:
  82. tag_name: ${{ github.ref_name }}
  83. name: ${{ github.ref_name }}
  84. draft: false
  85. prerelease: false
  86. files: |
  87. *.tar.gz
  88. linux-armhf:
  89. runs-on: ubuntu-20.04
  90. steps:
  91. - uses: actions/checkout@v2
  92. with:
  93. submodules: recursive
  94. - name: Set up cache
  95. id: cache
  96. uses: actions/cache@v2
  97. with:
  98. path: |
  99. ~/PawPawBuilds
  100. build
  101. carla/build
  102. dpf/build
  103. key: linux-armhf-v${{ env.CACHE_VERSION }}
  104. - name: Fix GitHub's mess
  105. run: |
  106. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  107. sudo apt-get update -qq
  108. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  109. - name: Set up dependencies
  110. run: |
  111. sudo dpkg --add-architecture armhf
  112. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  113. 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
  114. 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
  115. 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
  116. sudo apt-get update -qq
  117. 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
  118. - name: Build extra dependencies
  119. env:
  120. PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
  121. run: |
  122. ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf
  123. - name: Restore build timestamp
  124. if: steps.cache.outputs.cache-hit == 'true'
  125. shell: bash
  126. run: |
  127. TS=$(cat build/timestamp)
  128. find . -type f -exec touch -a -m -t ${TS} {} \;
  129. - name: Build linux armhf cross-compiled
  130. run: |
  131. pushd deps/PawPaw; source local.env linux-armhf; popd
  132. make features
  133. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  134. make unzipfx
  135. - name: Set build timestamp
  136. run: |
  137. date +%Y%m%d%H%M > build/timestamp
  138. - name: Set sha8 (non-release)
  139. if: startsWith(github.ref, 'refs/tags/') != true
  140. id: slug1
  141. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  142. - name: Set sha8 (release)
  143. if: startsWith(github.ref, 'refs/tags/')
  144. id: slug2
  145. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  146. - name: Set sha8
  147. id: slug
  148. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  149. - name: Pack binaries
  150. run: |
  151. 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) ../Cardinal
  152. - uses: actions/upload-artifact@v2
  153. with:
  154. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  155. path: |
  156. *.tar.gz
  157. - uses: softprops/action-gh-release@v1
  158. if: startsWith(github.ref, 'refs/tags/')
  159. with:
  160. tag_name: ${{ github.ref_name }}
  161. name: ${{ github.ref_name }}
  162. draft: false
  163. prerelease: false
  164. files: |
  165. *.tar.gz
  166. linux-i686:
  167. runs-on: ubuntu-20.04
  168. steps:
  169. - uses: actions/checkout@v2
  170. with:
  171. submodules: recursive
  172. - name: Set up cache
  173. id: cache
  174. uses: actions/cache@v2
  175. with:
  176. path: |
  177. ~/PawPawBuilds
  178. build
  179. carla/build
  180. dpf/build
  181. key: linux-i686-v${{ env.CACHE_VERSION }}
  182. - name: Fix GitHub's mess
  183. run: |
  184. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  185. sudo apt-get update -qq
  186. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  187. - name: Set up dependencies
  188. run: |
  189. sudo dpkg --add-architecture i386
  190. sudo apt-get update -qq
  191. 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
  192. - name: Build extra dependencies
  193. env:
  194. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  195. run: |
  196. ./deps/PawPaw/bootstrap-cardinal.sh linux-i686
  197. - name: Restore build timestamp
  198. if: steps.cache.outputs.cache-hit == 'true'
  199. shell: bash
  200. run: |
  201. TS=$(cat build/timestamp)
  202. find . -type f -exec touch -a -m -t ${TS} {} \;
  203. - name: Build linux i686
  204. run: |
  205. pushd deps/PawPaw; source local.env linux-i686; popd
  206. make features
  207. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  208. make unzipfx
  209. - name: Set build timestamp
  210. run: |
  211. date +%Y%m%d%H%M > build/timestamp
  212. - name: Set sha8 (non-release)
  213. if: startsWith(github.ref, 'refs/tags/') != true
  214. id: slug1
  215. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  216. - name: Set sha8 (release)
  217. if: startsWith(github.ref, 'refs/tags/')
  218. id: slug2
  219. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  220. - name: Set sha8
  221. id: slug
  222. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  223. - name: Pack binaries
  224. run: |
  225. 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) ../Cardinal
  226. - uses: actions/upload-artifact@v2
  227. with:
  228. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  229. path: |
  230. *.tar.gz
  231. - uses: softprops/action-gh-release@v1
  232. if: startsWith(github.ref, 'refs/tags/')
  233. with:
  234. tag_name: ${{ github.ref_name }}
  235. name: ${{ github.ref_name }}
  236. draft: false
  237. prerelease: false
  238. files: |
  239. *.tar.gz
  240. linux-x86_64:
  241. runs-on: ubuntu-20.04
  242. steps:
  243. - uses: actions/checkout@v2
  244. with:
  245. submodules: recursive
  246. - name: Set up cache
  247. id: cache
  248. uses: actions/cache@v2
  249. with:
  250. path: |
  251. ~/PawPawBuilds
  252. build
  253. carla/build
  254. dpf/build
  255. key: linux-x86_64-v${{ env.CACHE_VERSION }}
  256. - name: Set up dependencies
  257. run: |
  258. sudo apt-get update -qq
  259. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  260. - name: Build extra dependencies
  261. run: |
  262. ./deps/PawPaw/bootstrap-cardinal.sh linux
  263. - name: Restore build timestamp
  264. if: steps.cache.outputs.cache-hit == 'true'
  265. shell: bash
  266. run: |
  267. TS=$(cat build/timestamp)
  268. find . -type f -exec touch -a -m -t ${TS} {} \;
  269. - name: Build linux x86_64
  270. run: |
  271. pushd deps/PawPaw; source local.env linux; popd
  272. make features
  273. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  274. make unzipfx
  275. - name: Set build timestamp
  276. run: |
  277. date +%Y%m%d%H%M > build/timestamp
  278. - name: Set sha8 (non-release)
  279. if: startsWith(github.ref, 'refs/tags/') != true
  280. id: slug1
  281. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  282. - name: Set sha8 (release)
  283. if: startsWith(github.ref, 'refs/tags/')
  284. id: slug2
  285. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  286. - name: Set sha8
  287. id: slug
  288. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  289. - name: Pack binaries
  290. run: |
  291. 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) ../Cardinal
  292. - uses: actions/upload-artifact@v2
  293. with:
  294. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  295. path: |
  296. *.tar.gz
  297. - uses: softprops/action-gh-release@v1
  298. if: startsWith(github.ref, 'refs/tags/')
  299. with:
  300. tag_name: ${{ github.ref_name }}
  301. name: ${{ github.ref_name }}
  302. draft: false
  303. prerelease: false
  304. files: |
  305. *.tar.gz
  306. linux-x86_64-debug:
  307. runs-on: ubuntu-20.04
  308. steps:
  309. - uses: actions/checkout@v2
  310. with:
  311. submodules: recursive
  312. - name: Set up dependencies
  313. run: |
  314. sudo apt-get update -qq
  315. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  316. - name: Build linux x86_64 (debug)
  317. env:
  318. LDFLAGS: -static-libgcc -static-libstdc++
  319. run: |
  320. make features
  321. make DEBUG=true -j $(nproc)
  322. - name: Set sha8
  323. id: slug
  324. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  325. - name: Pack binaries
  326. run: |
  327. 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)
  328. - uses: actions/upload-artifact@v2
  329. with:
  330. name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  331. path: |
  332. *.tar.gz
  333. linux-x86_64-headless:
  334. runs-on: ubuntu-20.04
  335. steps:
  336. - uses: actions/checkout@v2
  337. with:
  338. submodules: recursive
  339. - name: Set up dependencies
  340. run: |
  341. sudo apt-get update -qq
  342. sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev
  343. sudo apt-get install -yqq liblo-dev
  344. - name: Build linux x86_64 (headless)
  345. run: |
  346. make HEADLESS=true features
  347. make HEADLESS=true -j $(nproc)
  348. linux-x86_64-sysdeps:
  349. runs-on: ubuntu-20.04
  350. steps:
  351. - uses: actions/checkout@v2
  352. with:
  353. submodules: recursive
  354. - name: Set up dependencies
  355. run: |
  356. sudo apt-get update -qq
  357. 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
  358. - name: Build linux x86_64 (sysdeps)
  359. run: |
  360. make features
  361. make SYSDEPS=true -j $(nproc)
  362. macos-universal:
  363. runs-on: macos-10.15
  364. steps:
  365. - uses: actions/checkout@v2
  366. with:
  367. submodules: recursive
  368. - name: Set up cache
  369. id: cache
  370. uses: actions/cache@v2
  371. with:
  372. path: |
  373. ~/PawPawBuilds
  374. build
  375. carla/build
  376. dpf/build
  377. jucewrapper/build
  378. key: macos-universal-v${{ env.CACHE_VERSION }}
  379. - name: Fix up Xcode
  380. run: |
  381. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  382. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  383. - name: Build extra dependencies
  384. run: |
  385. ./deps/PawPaw/bootstrap-cardinal.sh macos-universal
  386. - name: Restore build timestamp
  387. if: steps.cache.outputs.cache-hit == 'true'
  388. shell: bash
  389. run: |
  390. TS=$(cat build/timestamp)
  391. find . -type f -exec touch -a -m -t ${TS} {} \;
  392. - name: Build macOS universal (base)
  393. run: |
  394. pushd deps/PawPaw; source local.env macos-universal; popd
  395. make features
  396. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
  397. - name: Build macOS universal (AU using juce)
  398. run: |
  399. pushd deps/PawPaw; source local.env macos-universal; popd
  400. git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
  401. mkdir jucewrapper/build
  402. pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd
  403. mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
  404. - name: Build macOS universal (packaging)
  405. run: |
  406. pushd deps/PawPaw; source local.env macos-universal; popd
  407. ./utils/create-macos-installer.sh
  408. - name: Set build timestamp
  409. run: |
  410. date +%Y%m%d%H%M > build/timestamp
  411. - name: Set sha8 (non-release)
  412. if: startsWith(github.ref, 'refs/tags/') != true
  413. id: slug1
  414. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  415. - name: Set sha8 (release)
  416. if: startsWith(github.ref, 'refs/tags/')
  417. id: slug2
  418. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  419. - name: Set sha8
  420. id: slug
  421. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  422. - name: Rename macOS bundle
  423. run: |
  424. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg
  425. - uses: actions/upload-artifact@v2
  426. with:
  427. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  428. path: |
  429. ${{ github.event.repository.name }}-*.pkg
  430. - uses: softprops/action-gh-release@v1
  431. if: startsWith(github.ref, 'refs/tags/')
  432. with:
  433. tag_name: ${{ github.ref_name }}
  434. name: ${{ github.ref_name }}
  435. draft: false
  436. prerelease: false
  437. files: |
  438. ${{ github.event.repository.name }}-*.pkg
  439. modduo:
  440. runs-on: ubuntu-20.04
  441. steps:
  442. - uses: actions/checkout@v2
  443. with:
  444. submodules: recursive
  445. - name: Set up cache
  446. uses: actions/cache@v2
  447. id: mpb-cache
  448. with:
  449. path: |
  450. ~/mod-workdir
  451. key: modduo-static-v${{ env.CACHE_VERSION }}
  452. - name: Set up dependencies
  453. run: |
  454. sudo apt-get update -qq
  455. 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
  456. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  457. - name: Bootstrap toolchain
  458. if: steps.mpb-cache.outputs.cache-hit != 'true'
  459. run: |
  460. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  461. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  462. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
  463. - name: Build for modduo
  464. run: |
  465. make modduo HEADLESS=true WITH_LTO=true MODDUO=true -j $(nproc)
  466. - name: Set sha8
  467. id: slug
  468. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  469. - name: Pack binaries
  470. run: |
  471. 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)
  472. - uses: actions/upload-artifact@v2
  473. with:
  474. name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  475. path: |
  476. *.tar.gz
  477. modduox:
  478. runs-on: ubuntu-20.04
  479. steps:
  480. - uses: actions/checkout@v2
  481. with:
  482. submodules: recursive
  483. - name: Set up cache
  484. uses: actions/cache@v2
  485. id: mpb-cache
  486. with:
  487. path: |
  488. ~/mod-workdir
  489. key: modduox-v${{ env.CACHE_VERSION }}
  490. - name: Set up dependencies
  491. run: |
  492. sudo apt-get update -qq
  493. 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
  494. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  495. - name: Bootstrap toolchain
  496. if: steps.mpb-cache.outputs.cache-hit != 'true'
  497. run: |
  498. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  499. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  500. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
  501. - name: Build for modduox
  502. run: |
  503. make modduox HEADLESS=true WITH_LTO=true -j $(nproc)
  504. - name: Set sha8
  505. id: slug
  506. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  507. - name: Pack binaries
  508. run: |
  509. 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)
  510. - uses: actions/upload-artifact@v2
  511. with:
  512. name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  513. path: |
  514. *.tar.gz
  515. moddwarf:
  516. runs-on: ubuntu-20.04
  517. steps:
  518. - uses: actions/checkout@v2
  519. with:
  520. submodules: recursive
  521. - name: Set up cache
  522. uses: actions/cache@v2
  523. id: mpb-cache
  524. with:
  525. path: |
  526. ~/mod-workdir
  527. key: moddwarf-v${{ env.CACHE_VERSION }}
  528. - name: Set up dependencies
  529. run: |
  530. sudo apt-get update -qq
  531. 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
  532. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  533. - name: Bootstrap toolchain
  534. if: steps.mpb-cache.outputs.cache-hit != 'true'
  535. run: |
  536. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  537. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  538. $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
  539. - name: Build for moddwarf
  540. run: |
  541. make moddwarf HEADLESS=true WITH_LTO=true -j $(nproc)
  542. - name: Set sha8
  543. id: slug
  544. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  545. - name: Pack binaries
  546. run: |
  547. 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)
  548. - uses: actions/upload-artifact@v2
  549. with:
  550. name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  551. path: |
  552. *.tar.gz
  553. win32:
  554. runs-on: ubuntu-20.04
  555. steps:
  556. - uses: actions/checkout@v2
  557. with:
  558. submodules: recursive
  559. - name: Set up cache
  560. id: cache
  561. uses: actions/cache@v2
  562. with:
  563. path: |
  564. ~/PawPawBuilds
  565. build
  566. carla/build
  567. dpf/build
  568. key: win32-v${{ env.CACHE_VERSION }}
  569. - name: Fix GitHub's mess
  570. run: |
  571. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  572. sudo apt-get update -qq
  573. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  574. - name: Set up dependencies
  575. run: |
  576. sudo dpkg --add-architecture i386
  577. sudo apt-get update -qq
  578. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 qttools5-dev qttools5-dev-tools xvfb
  579. - name: Build extra dependencies
  580. run: |
  581. ./deps/PawPaw/bootstrap-cardinal.sh win32
  582. - name: Restore build timestamp
  583. if: steps.cache.outputs.cache-hit == 'true'
  584. shell: bash
  585. run: |
  586. TS=$(cat build/timestamp)
  587. find . -type f -exec touch -a -m -t ${TS} {} \;
  588. - name: Build win32 cross-compiled (base)
  589. run: |
  590. pushd deps/PawPaw; source local.env win32; popd
  591. make features
  592. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  593. - name: Build win64 cross-compiled (carla)
  594. run: |
  595. pushd deps/PawPaw; source local.env win32; popd
  596. 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_JUCE=false USING_JUCE_GUI_EXTRA=false -j $(nproc)
  597. make -C carla EMBED_TARGET=true TESTING=true dist
  598. make -C carla EMBED_TARGET=true TESTING=true dist
  599. - name: Build win64 cross-compiled (packaging)
  600. run: |
  601. pushd deps/PawPaw; source local.env win32; popd
  602. xvfb-run ./utils/create-windows-installer.sh 32
  603. - name: Set build timestamp
  604. run: |
  605. date +%Y%m%d%H%M > build/timestamp
  606. - name: Set sha8 (non-release)
  607. if: startsWith(github.ref, 'refs/tags/') != true
  608. id: slug1
  609. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  610. - name: Set sha8 (release)
  611. if: startsWith(github.ref, 'refs/tags/')
  612. id: slug2
  613. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  614. - name: Set sha8
  615. id: slug
  616. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  617. - name: Pack binaries
  618. run: |
  619. 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)
  620. - uses: actions/upload-artifact@v2
  621. with:
  622. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  623. path: |
  624. *.exe
  625. *.zip
  626. - uses: softprops/action-gh-release@v1
  627. if: startsWith(github.ref, 'refs/tags/')
  628. with:
  629. tag_name: ${{ github.ref_name }}
  630. name: ${{ github.ref_name }}
  631. draft: false
  632. prerelease: false
  633. files: |
  634. *.exe
  635. *.zip
  636. win64:
  637. runs-on: ubuntu-20.04
  638. steps:
  639. - uses: actions/checkout@v2
  640. with:
  641. submodules: recursive
  642. - name: Set up cache
  643. id: cache
  644. uses: actions/cache@v2
  645. with:
  646. path: |
  647. ~/PawPawBuilds
  648. build
  649. carla/build
  650. dpf/build
  651. key: win64-v${{ env.CACHE_VERSION }}
  652. - name: Fix GitHub's mess
  653. run: |
  654. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  655. sudo apt-get update -qq
  656. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  657. - name: Set up dependencies
  658. run: |
  659. sudo dpkg --add-architecture i386
  660. sudo apt-get update -qq
  661. 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
  662. - name: Build extra dependencies
  663. run: |
  664. ./deps/PawPaw/bootstrap-cardinal.sh win64
  665. - name: Restore build timestamp
  666. if: steps.cache.outputs.cache-hit == 'true'
  667. shell: bash
  668. run: |
  669. TS=$(cat build/timestamp)
  670. find . -type f -exec touch -a -m -t ${TS} {} \;
  671. - name: Build win64 cross-compiled (base)
  672. run: |
  673. pushd deps/PawPaw; source local.env win64; popd
  674. make features
  675. make CIBUILD=true NOOPT=true WITH_LTO=true -j $(nproc)
  676. - name: Build win64 cross-compiled (carla)
  677. run: |
  678. pushd deps/PawPaw; source local.env win64; popd
  679. 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_JUCE=false USING_JUCE_GUI_EXTRA=false all win32r -j $(nproc)
  680. make -C carla EMBED_TARGET=true TESTING=true dist
  681. make -C carla EMBED_TARGET=true TESTING=true dist
  682. - name: Build win64 cross-compiled (packaging)
  683. run: |
  684. pushd deps/PawPaw; source local.env win64; popd
  685. xvfb-run ./utils/create-windows-installer.sh 64
  686. - name: Set build timestamp
  687. run: |
  688. date +%Y%m%d%H%M > build/timestamp
  689. - name: Set sha8 (non-release)
  690. if: startsWith(github.ref, 'refs/tags/') != true
  691. id: slug1
  692. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  693. - name: Set sha8 (release)
  694. if: startsWith(github.ref, 'refs/tags/')
  695. id: slug2
  696. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  697. - name: Set sha8
  698. id: slug
  699. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  700. - name: Pack binaries
  701. run: |
  702. 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)
  703. - uses: actions/upload-artifact@v2
  704. with:
  705. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  706. path: |
  707. *.exe
  708. *.zip
  709. - uses: softprops/action-gh-release@v1
  710. if: startsWith(github.ref, 'refs/tags/')
  711. with:
  712. tag_name: ${{ github.ref_name }}
  713. name: ${{ github.ref_name }}
  714. draft: false
  715. prerelease: false
  716. files: |
  717. *.exe
  718. *.zip
  719. source-tarball:
  720. runs-on: ubuntu-20.04
  721. steps:
  722. - uses: actions/checkout@v2
  723. with:
  724. submodules: recursive
  725. - name: Set up dependencies
  726. run: |
  727. sudo apt-get update -qq
  728. sudo apt-get install -yqq liblo-dev
  729. - name: Create source tarball
  730. run: |
  731. make HEADLESS=true tarball
  732. make HEADLESS=true tarball+deps
  733. - name: Set sha8 (non-release)
  734. if: startsWith(github.ref, 'refs/tags/') != true
  735. id: slug1
  736. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  737. - name: Set sha8 (release)
  738. if: startsWith(github.ref, 'refs/tags/')
  739. id: slug2
  740. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  741. - name: Set sha8
  742. id: slug
  743. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  744. - uses: actions/upload-artifact@v2
  745. with:
  746. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  747. path: |
  748. /home/runner/cardinal*.tar.xz
  749. /home/runner/*/cardinal*.tar.xz
  750. /home/runner/*/*/cardinal*.tar.xz
  751. - uses: softprops/action-gh-release@v1
  752. if: startsWith(github.ref, 'refs/tags/')
  753. with:
  754. tag_name: ${{ github.ref_name }}
  755. name: ${{ github.ref_name }}
  756. draft: false
  757. prerelease: false
  758. files: |
  759. /home/runner/cardinal*.tar.xz
  760. /home/runner/*/cardinal*.tar.xz
  761. /home/runner/*/*/cardinal*.tar.xz
  762. plugin-validation:
  763. runs-on: ubuntu-20.04
  764. steps:
  765. - uses: actions/checkout@v2
  766. with:
  767. submodules: recursive
  768. - name: Set up dependencies
  769. run: |
  770. # custom repos
  771. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  772. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  773. sudo apt-get update -qq
  774. # build-deps
  775. sudo apt-get install -yqq liblo-dev
  776. # runtime testing
  777. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  778. - name: Build Cardinal
  779. env:
  780. CFLAGS: -g
  781. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  782. LDFLAGS: -static-libgcc -static-libstdc++
  783. run: |
  784. make HEADLESS=true features
  785. make HEADLESS=true NOOPT=true NOPLUGINS=true STATIC_BUILD=true SKIP_STRIPPING=true -j $(nproc)
  786. - name: Validate LV2 ttl syntax
  787. run: |
  788. lv2_validate \
  789. /usr/lib/lv2/mod.lv2/*.ttl \
  790. /usr/lib/lv2/kx-meta/*.ttl \
  791. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  792. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  793. ./bin/*.lv2/*.ttl
  794. - name: Validate LV2 metadata and binaries
  795. run: |
  796. export LV2_PATH=/tmp/lv2-path
  797. mkdir ${LV2_PATH}
  798. cp -r bin/CardinalFX.lv2 bin/CardinalSynth.lv2 \
  799. /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 \
  800. ${LV2_PATH}
  801. lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  802. - name: Test LV2 plugin
  803. run: |
  804. export LV2_PATH=/tmp/lv2-path
  805. for p in $(lv2ls); do \
  806. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  807. valgrind \
  808. --error-exitcode=255 \
  809. --leak-check=no \
  810. --track-origins=yes \
  811. --suppressions=./dpf/utils/valgrind-dpf.supp \
  812. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  813. done
  814. - name: Test VST2 plugin
  815. run: |
  816. for p in $(ls bin/*.vst/*.so); do \
  817. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  818. valgrind \
  819. --error-exitcode=255 \
  820. --leak-check=no \
  821. --track-origins=yes \
  822. --suppressions=./dpf/utils/valgrind-dpf.supp \
  823. /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  824. done
  825. - name: Test VST3 plugin
  826. run: |
  827. for p in $(ls bin/ | grep vst3); do \
  828. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  829. valgrind \
  830. --error-exitcode=255 \
  831. --leak-check=no \
  832. --track-origins=yes \
  833. --suppressions=./dpf/utils/valgrind-dpf.supp \
  834. /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  835. done