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.

738 lines
31KB

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