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.

728 lines
30KB

  1. name: build
  2. on:
  3. push:
  4. env:
  5. CACHE_VERSION: 6
  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
  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. ./dpf/utils/package-osx-bundles.sh
  335. - name: Set sha8 (non-release)
  336. if: startsWith(github.ref, 'refs/tags/') != true
  337. id: slug1
  338. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  339. - name: Set sha8 (release)
  340. if: startsWith(github.ref, 'refs/tags/')
  341. id: slug2
  342. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  343. - name: Set sha8
  344. id: slug
  345. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  346. - name: Rename macOS bundle
  347. run: |
  348. mv ${{ github.event.repository.name }}-macOS.pkg ${{ github.event.repository.name }}-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.pkg
  349. - uses: actions/upload-artifact@v2
  350. with:
  351. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  352. path: |
  353. ${{ github.event.repository.name }}-*.pkg
  354. - uses: softprops/action-gh-release@v1
  355. if: startsWith(github.ref, 'refs/tags/')
  356. with:
  357. tag_name: ${{ github.ref_name }}
  358. name: ${{ github.ref_name }}
  359. draft: false
  360. prerelease: false
  361. files: |
  362. ${{ github.event.repository.name }}-*.pkg
  363. modduo:
  364. runs-on: ubuntu-20.04
  365. steps:
  366. - uses: actions/checkout@v2
  367. with:
  368. submodules: recursive
  369. - name: Set up cache
  370. uses: actions/cache@v2
  371. id: mpb-cache
  372. with:
  373. path: |
  374. ~/mod-workdir
  375. key: modduo-static-v${{ env.CACHE_VERSION }}
  376. - name: Set up dependencies
  377. run: |
  378. sudo apt-get update -qq
  379. 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
  380. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  381. - name: Bootstrap toolchain
  382. if: steps.mpb-cache.outputs.cache-hit != 'true'
  383. run: |
  384. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  385. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  386. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
  387. - name: Build for modduo
  388. run: |
  389. make modduo HEADLESS=true WITH_LTO=true MODDUO=true -j $(nproc)
  390. - name: Set sha8
  391. id: slug
  392. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  393. - name: Pack binaries
  394. run: |
  395. 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)
  396. - uses: actions/upload-artifact@v2
  397. with:
  398. name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  399. path: |
  400. *.tar.gz
  401. modduox:
  402. runs-on: ubuntu-20.04
  403. steps:
  404. - uses: actions/checkout@v2
  405. with:
  406. submodules: recursive
  407. - name: Set up cache
  408. uses: actions/cache@v2
  409. id: mpb-cache
  410. with:
  411. path: |
  412. ~/mod-workdir
  413. key: modduox-v${{ env.CACHE_VERSION }}
  414. - name: Set up dependencies
  415. run: |
  416. sudo apt-get update -qq
  417. 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
  418. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  419. - name: Bootstrap toolchain
  420. if: steps.mpb-cache.outputs.cache-hit != 'true'
  421. run: |
  422. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  423. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  424. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
  425. - name: Build for modduox
  426. run: |
  427. make modduox HEADLESS=true WITH_LTO=true -j $(nproc)
  428. - name: Set sha8
  429. id: slug
  430. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  431. - name: Pack binaries
  432. run: |
  433. 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)
  434. - uses: actions/upload-artifact@v2
  435. with:
  436. name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  437. path: |
  438. *.tar.gz
  439. moddwarf:
  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: moddwarf-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 moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
  463. - name: Build for moddwarf
  464. run: |
  465. make moddwarf HEADLESS=true WITH_LTO=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 }}-moddwarf-${{ 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 }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  475. path: |
  476. *.tar.gz
  477. win32:
  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. with:
  486. path: |
  487. ~/PawPawBuilds
  488. key: win32-v${{ env.CACHE_VERSION }}
  489. - name: Fix GitHub's mess
  490. run: |
  491. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  492. sudo apt-get update -qq
  493. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  494. - name: Set up dependencies
  495. run: |
  496. sudo dpkg --add-architecture i386
  497. sudo apt-get update -qq
  498. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  499. - name: Build extra dependencies
  500. run: |
  501. ./deps/PawPaw/bootstrap-cardinal.sh win32
  502. - name: Build win32 cross-compiled
  503. run: |
  504. pushd deps/PawPaw; source local.env win32; popd
  505. make features
  506. make NOOPT=true WITH_LTO=true -j $(nproc)
  507. - name: Set sha8 (non-release)
  508. if: startsWith(github.ref, 'refs/tags/') != true
  509. id: slug1
  510. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  511. - name: Set sha8 (release)
  512. if: startsWith(github.ref, 'refs/tags/')
  513. id: slug2
  514. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  515. - name: Set sha8
  516. id: slug
  517. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  518. - name: Pack binaries
  519. run: |
  520. 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)
  521. - uses: actions/upload-artifact@v2
  522. with:
  523. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  524. path: |
  525. *.zip
  526. - uses: softprops/action-gh-release@v1
  527. if: startsWith(github.ref, 'refs/tags/')
  528. with:
  529. tag_name: ${{ github.ref_name }}
  530. name: ${{ github.ref_name }}
  531. draft: false
  532. prerelease: false
  533. files: |
  534. *.zip
  535. win64:
  536. runs-on: ubuntu-20.04
  537. steps:
  538. - uses: actions/checkout@v2
  539. with:
  540. submodules: recursive
  541. - name: Set up cache
  542. uses: actions/cache@v2
  543. with:
  544. path: |
  545. ~/PawPawBuilds
  546. key: win64-v${{ env.CACHE_VERSION }}
  547. - name: Fix GitHub's mess
  548. run: |
  549. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  550. sudo apt-get update -qq
  551. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  552. - name: Set up dependencies
  553. run: |
  554. sudo apt-get update -qq
  555. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  556. - name: Build extra dependencies
  557. run: |
  558. ./deps/PawPaw/bootstrap-cardinal.sh win64
  559. - name: Build win64 cross-compiled
  560. run: |
  561. pushd deps/PawPaw; source local.env win64; popd
  562. make features
  563. make NOOPT=true WITH_LTO=true -j $(nproc)
  564. - name: Set sha8 (non-release)
  565. if: startsWith(github.ref, 'refs/tags/') != true
  566. id: slug1
  567. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  568. - name: Set sha8 (release)
  569. if: startsWith(github.ref, 'refs/tags/')
  570. id: slug2
  571. run: echo "::set-output name=sha8::$(echo ${{ github.ref_name }})"
  572. - name: Set sha8
  573. id: slug
  574. run: echo "::set-output name=sha8::$(echo ${{ steps.slug1.outputs.sha8 || steps.slug2.outputs.sha8 }})"
  575. - name: Pack binaries
  576. run: |
  577. 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)
  578. - uses: actions/upload-artifact@v2
  579. with:
  580. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  581. path: |
  582. *.zip
  583. - uses: softprops/action-gh-release@v1
  584. if: startsWith(github.ref, 'refs/tags/')
  585. with:
  586. tag_name: ${{ github.ref_name }}
  587. name: ${{ github.ref_name }}
  588. draft: false
  589. prerelease: false
  590. files: |
  591. *.zip
  592. source-tarball:
  593. runs-on: ubuntu-20.04
  594. steps:
  595. - uses: actions/checkout@v2
  596. with:
  597. submodules: recursive
  598. - name: Set up dependencies
  599. run: |
  600. sudo apt-get update -qq
  601. sudo apt-get install -yqq liblo-dev
  602. - name: Create source tarball
  603. run: |
  604. make HEADLESS=true tarball
  605. make HEADLESS=true tarball+deps
  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. - uses: actions/upload-artifact@v2
  618. with:
  619. name: ${{ github.event.repository.name }}-source-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  620. path: |
  621. /home/runner/cardinal*.tar.xz
  622. /home/runner/*/cardinal*.tar.xz
  623. /home/runner/*/*/cardinal*.tar.xz
  624. - uses: softprops/action-gh-release@v1
  625. if: startsWith(github.ref, 'refs/tags/')
  626. with:
  627. tag_name: ${{ github.ref_name }}
  628. name: ${{ github.ref_name }}
  629. draft: false
  630. prerelease: false
  631. files: |
  632. /home/runner/cardinal*.tar.xz
  633. /home/runner/*/cardinal*.tar.xz
  634. /home/runner/*/*/cardinal*.tar.xz
  635. plugin-validation:
  636. runs-on: ubuntu-20.04
  637. steps:
  638. - uses: actions/checkout@v2
  639. with:
  640. submodules: recursive
  641. - name: Set up dependencies
  642. run: |
  643. # custom repos
  644. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  645. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  646. sudo apt-get update -qq
  647. # build-deps
  648. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  649. # runtime testing
  650. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  651. - name: Build plugins
  652. env:
  653. CFLAGS: -g
  654. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  655. LDFLAGS: -static-libgcc -static-libstdc++
  656. run: |
  657. make features
  658. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  659. - name: Validate LV2 ttl syntax
  660. run: |
  661. lv2_validate \
  662. /usr/lib/lv2/mod.lv2/*.ttl \
  663. /usr/lib/lv2/kx-meta/*.ttl \
  664. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  665. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  666. ./bin/*.lv2/*.ttl
  667. #- name: Validate LV2 metadata and binaries
  668. #run: |
  669. #export LV2_PATH=/tmp/lv2-path
  670. #mkdir ${LV2_PATH}
  671. #cp -r bin/*.lv2 \
  672. #/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 \
  673. #${LV2_PATH}
  674. #lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  675. - name: Test LV2 plugin
  676. run: |
  677. export LV2_PATH=/tmp/lv2-path
  678. for p in $(lv2ls); do \
  679. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  680. valgrind \
  681. --error-exitcode=255 \
  682. --leak-check=no \
  683. --track-origins=yes \
  684. --suppressions=./dpf/utils/valgrind-dpf.supp \
  685. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  686. done
  687. # - name: Test VST2 plugin
  688. # env:
  689. # CARLA_DO_NOT_USE_JUCE_FOR_VST2: 1
  690. # run: |
  691. # for p in $(ls bin/*.vst/*.so); do \
  692. # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  693. # valgrind \
  694. # --error-exitcode=255 \
  695. # --leak-check=no \
  696. # --track-origins=yes \
  697. # --suppressions=./dpf/utils/valgrind-dpf.supp \
  698. # /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  699. # done
  700. # - name: Test VST3 plugin
  701. # run: |
  702. # for p in $(ls bin/ | grep vst3); do \
  703. # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  704. # valgrind \
  705. # --error-exitcode=255 \
  706. # --leak-check=no \
  707. # --track-origins=yes \
  708. # --suppressions=./dpf/utils/valgrind-dpf.supp \
  709. # /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  710. # done