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.

566 lines
24KB

  1. name: build
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. pull_request:
  7. branches:
  8. - '*'
  9. env:
  10. CACHE_VERSION: 6
  11. DEBIAN_FRONTEND: noninteractive
  12. HOMEBREW_NO_AUTO_UPDATE: 1
  13. LIBGL_ALWAYS_SOFTWARE: 'true'
  14. jobs:
  15. linux-arm64:
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - uses: actions/checkout@v2
  19. with:
  20. submodules: recursive
  21. - name: Set up cache
  22. uses: actions/cache@v2
  23. with:
  24. path: |
  25. ~/PawPawBuilds
  26. key: linux-arm64-v${{ env.CACHE_VERSION }}
  27. - name: Fix GitHub's mess
  28. run: |
  29. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  30. sudo apt-get update -qq
  31. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  32. - name: Set up dependencies
  33. run: |
  34. sudo dpkg --add-architecture arm64
  35. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  36. 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
  37. 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
  38. 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
  39. sudo apt-get update -qq
  40. 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
  41. - name: Build extra dependencies
  42. env:
  43. PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
  44. run: |
  45. ./deps/PawPaw/bootstrap-cardinal.sh linux-aarch64
  46. - name: Build linux arm64 cross-compiled
  47. run: |
  48. pushd deps/PawPaw; source local.env linux-aarch64; popd
  49. make features
  50. make NOOPT=true WITH_LTO=true -j $(nproc)
  51. make unzipfx
  52. - name: Set sha8
  53. id: slug
  54. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  55. - name: Pack binaries
  56. run: |
  57. 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
  58. - uses: actions/upload-artifact@v2
  59. with:
  60. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  61. path: |
  62. *.tar.gz
  63. linux-armhf:
  64. runs-on: ubuntu-20.04
  65. steps:
  66. - uses: actions/checkout@v2
  67. with:
  68. submodules: recursive
  69. - name: Set up cache
  70. uses: actions/cache@v2
  71. with:
  72. path: |
  73. ~/PawPawBuilds
  74. key: linux-armhf-v${{ env.CACHE_VERSION }}
  75. - name: Fix GitHub's mess
  76. run: |
  77. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  78. sudo apt-get update -qq
  79. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  80. - name: Set up dependencies
  81. run: |
  82. sudo dpkg --add-architecture armhf
  83. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  84. 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
  85. 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
  86. 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
  87. sudo apt-get update -qq
  88. 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
  89. - name: Build extra dependencies
  90. env:
  91. PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig
  92. run: |
  93. ./deps/PawPaw/bootstrap-cardinal.sh linux-armhf
  94. - name: Build linux armhf cross-compiled
  95. run: |
  96. pushd deps/PawPaw; source local.env linux-armhf; popd
  97. make features
  98. make NOOPT=true WITH_LTO=true -j $(nproc)
  99. make unzipfx
  100. - name: Set sha8
  101. id: slug
  102. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  103. - name: Pack binaries
  104. run: |
  105. 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
  106. - uses: actions/upload-artifact@v2
  107. with:
  108. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  109. path: |
  110. *.tar.gz
  111. linux-i686:
  112. runs-on: ubuntu-20.04
  113. steps:
  114. - uses: actions/checkout@v2
  115. with:
  116. submodules: recursive
  117. - name: Set up cache
  118. uses: actions/cache@v2
  119. with:
  120. path: |
  121. ~/PawPawBuilds
  122. key: linux-i686-v${{ env.CACHE_VERSION }}
  123. - name: Fix GitHub's mess
  124. run: |
  125. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  126. sudo apt-get update -qq
  127. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  128. - name: Set up dependencies
  129. run: |
  130. sudo dpkg --add-architecture i386
  131. sudo apt-get update -qq
  132. 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
  133. - name: Build extra dependencies
  134. env:
  135. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  136. run: |
  137. ./deps/PawPaw/bootstrap-cardinal.sh linux-i686
  138. - name: Build linux i686
  139. run: |
  140. pushd deps/PawPaw; source local.env linux-i686; popd
  141. make features
  142. make NOOPT=true WITH_LTO=true -j $(nproc)
  143. make unzipfx
  144. - name: Set sha8
  145. id: slug
  146. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  147. - name: Pack binaries
  148. run: |
  149. 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
  150. - uses: actions/upload-artifact@v2
  151. with:
  152. name: ${{ github.event.repository.name }}-linux-i686-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  153. path: |
  154. *.tar.gz
  155. linux-x86_64:
  156. runs-on: ubuntu-20.04
  157. steps:
  158. - uses: actions/checkout@v2
  159. with:
  160. submodules: recursive
  161. - name: Set up cache
  162. uses: actions/cache@v2
  163. with:
  164. path: |
  165. ~/PawPawBuilds
  166. key: linux-x86_64-v${{ env.CACHE_VERSION }}
  167. - name: Set up dependencies
  168. run: |
  169. sudo apt-get update -qq
  170. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  171. - name: Build extra dependencies
  172. run: |
  173. ./deps/PawPaw/bootstrap-cardinal.sh linux
  174. - name: Build linux x86_64
  175. run: |
  176. pushd deps/PawPaw; source local.env linux; popd
  177. make features
  178. make NOOPT=true WITH_LTO=true -j $(nproc)
  179. make unzipfx
  180. - name: Set sha8
  181. id: slug
  182. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  183. - name: Pack binaries
  184. run: |
  185. 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
  186. - uses: actions/upload-artifact@v2
  187. with:
  188. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  189. path: |
  190. *.tar.gz
  191. linux-x86_64-debug:
  192. runs-on: ubuntu-20.04
  193. steps:
  194. - uses: actions/checkout@v2
  195. with:
  196. submodules: recursive
  197. - name: Set up dependencies
  198. run: |
  199. sudo apt-get update -qq
  200. sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  201. - name: Build linux x86_64 (debug)
  202. env:
  203. LDFLAGS: -static-libgcc -static-libstdc++
  204. run: |
  205. make features
  206. make DEBUG=true -j $(nproc)
  207. - name: Set sha8
  208. id: slug
  209. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  210. - name: Pack binaries
  211. run: |
  212. 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)
  213. - uses: actions/upload-artifact@v2
  214. with:
  215. name: ${{ github.event.repository.name }}-linux-x86_64-debug-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  216. path: |
  217. *.tar.gz
  218. linux-x86_64-headless:
  219. runs-on: ubuntu-20.04
  220. steps:
  221. - uses: actions/checkout@v2
  222. with:
  223. submodules: recursive
  224. - name: Set up dependencies
  225. run: |
  226. sudo apt-get update -qq
  227. sudo apt-get remove -yqq libcairo2-dev libx11-dev libx11-dev libxext-dev
  228. sudo apt-get install -yqq liblo-dev
  229. - name: Build linux x86_64 (headless)
  230. run: |
  231. make HEADLESS=true features
  232. make HEADLESS=true -j $(nproc)
  233. linux-x86_64-sysdeps:
  234. runs-on: ubuntu-20.04
  235. steps:
  236. - uses: actions/checkout@v2
  237. with:
  238. submodules: recursive
  239. - name: Set up dependencies
  240. run: |
  241. sudo apt-get update -qq
  242. 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
  243. - name: Build linux x86_64 (sysdeps)
  244. run: |
  245. make features
  246. make SYSDEPS=true -j $(nproc)
  247. macos-universal:
  248. runs-on: macos-10.15
  249. steps:
  250. - uses: actions/checkout@v2
  251. with:
  252. submodules: recursive
  253. - name: Set up cache
  254. uses: actions/cache@v2
  255. with:
  256. path: |
  257. ~/PawPawBuilds
  258. key: macos-universal-v${{ env.CACHE_VERSION }}
  259. - name: Fix up Xcode
  260. run: |
  261. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  262. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  263. - name: Build extra dependencies
  264. run: |
  265. ./deps/PawPaw/bootstrap-cardinal.sh macos-universal
  266. - name: Build macOS universal
  267. run: |
  268. pushd deps/PawPaw; source local.env macos-universal; popd
  269. make features
  270. make NOOPT=true WITH_LTO=true -j $(sysctl -n hw.logicalcpu)
  271. ./dpf/utils/package-osx-bundles.sh
  272. - name: Set sha8
  273. id: slug
  274. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  275. - uses: actions/upload-artifact@v2
  276. with:
  277. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  278. path: |
  279. *-macOS.pkg
  280. modduo:
  281. runs-on: ubuntu-20.04
  282. steps:
  283. - uses: actions/checkout@v2
  284. with:
  285. submodules: recursive
  286. - name: Set up cache
  287. uses: actions/cache@v2
  288. id: mpb-cache
  289. with:
  290. path: |
  291. ~/mod-workdir
  292. key: modduo-static-v${{ env.CACHE_VERSION }}
  293. - name: Set up dependencies
  294. run: |
  295. sudo apt-get update -qq
  296. 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
  297. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  298. - name: Bootstrap toolchain
  299. if: steps.mpb-cache.outputs.cache-hit != 'true'
  300. run: |
  301. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  302. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  303. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduo-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduo-static
  304. - name: Build for modduo
  305. run: |
  306. make modduo HEADLESS=true WITH_LTO=true -j $(nproc)
  307. - name: Set sha8
  308. id: slug
  309. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  310. - name: Pack binaries
  311. run: |
  312. 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)
  313. - uses: actions/upload-artifact@v2
  314. with:
  315. name: ${{ github.event.repository.name }}-modduo-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  316. path: |
  317. *.tar.gz
  318. modduox:
  319. runs-on: ubuntu-20.04
  320. steps:
  321. - uses: actions/checkout@v2
  322. with:
  323. submodules: recursive
  324. - name: Set up cache
  325. uses: actions/cache@v2
  326. id: mpb-cache
  327. with:
  328. path: |
  329. ~/mod-workdir
  330. key: modduox-v${{ env.CACHE_VERSION }}
  331. - name: Set up dependencies
  332. run: |
  333. sudo apt-get update -qq
  334. 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
  335. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  336. - name: Bootstrap toolchain
  337. if: steps.mpb-cache.outputs.cache-hit != 'true'
  338. run: |
  339. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  340. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  341. $(pwd)/deps/mod-plugin-builder/bootstrap.sh modduox-static minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh modduox-static
  342. - name: Build for modduox
  343. run: |
  344. make modduox HEADLESS=true WITH_LTO=true -j $(nproc)
  345. - name: Set sha8
  346. id: slug
  347. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  348. - name: Pack binaries
  349. run: |
  350. 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)
  351. - uses: actions/upload-artifact@v2
  352. with:
  353. name: ${{ github.event.repository.name }}-modduox-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  354. path: |
  355. *.tar.gz
  356. moddwarf:
  357. runs-on: ubuntu-20.04
  358. steps:
  359. - uses: actions/checkout@v2
  360. with:
  361. submodules: recursive
  362. - name: Set up cache
  363. uses: actions/cache@v2
  364. id: mpb-cache
  365. with:
  366. path: |
  367. ~/mod-workdir
  368. key: moddwarf-v${{ env.CACHE_VERSION }}
  369. - name: Set up dependencies
  370. run: |
  371. sudo apt-get update -qq
  372. 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
  373. sudo apt-get install -yqq pandoc texlive-latex-recommended texlive-latex-extra
  374. - name: Bootstrap toolchain
  375. if: steps.mpb-cache.outputs.cache-hit != 'true'
  376. run: |
  377. git clone --depth=1 https://github.com/moddevices/mod-plugin-builder.git deps/mod-plugin-builder
  378. sed -i "s/CT_LOG_PROGRESS_BAR=y/CT_LOG_PROGRESS_BAR=n/" deps/mod-plugin-builder/toolchain/*.config
  379. $(pwd)/deps/mod-plugin-builder/bootstrap.sh moddwarf minimal && $(pwd)/deps/mod-plugin-builder/.clean-install.sh moddwarf
  380. - name: Build for moddwarf
  381. run: |
  382. make moddwarf HEADLESS=true WITH_LTO=true -j $(nproc)
  383. - name: Set sha8
  384. id: slug
  385. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  386. - name: Pack binaries
  387. run: |
  388. 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)
  389. - uses: actions/upload-artifact@v2
  390. with:
  391. name: ${{ github.event.repository.name }}-moddwarf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  392. path: |
  393. *.tar.gz
  394. win32:
  395. runs-on: ubuntu-20.04
  396. steps:
  397. - uses: actions/checkout@v2
  398. with:
  399. submodules: recursive
  400. - name: Set up cache
  401. uses: actions/cache@v2
  402. with:
  403. path: |
  404. ~/PawPawBuilds
  405. key: win32-v${{ env.CACHE_VERSION }}
  406. - name: Fix GitHub's mess
  407. run: |
  408. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  409. sudo apt-get update -qq
  410. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  411. - name: Set up dependencies
  412. run: |
  413. sudo dpkg --add-architecture i386
  414. sudo apt-get update -qq
  415. sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  416. - name: Build extra dependencies
  417. run: |
  418. ./deps/PawPaw/bootstrap-cardinal.sh win32
  419. - name: Build win32 cross-compiled
  420. run: |
  421. pushd deps/PawPaw; source local.env win32; popd
  422. make features
  423. make NOOPT=true WITH_LTO=true -j $(nproc)
  424. - name: Set sha8
  425. id: slug
  426. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  427. - name: Pack binaries
  428. run: |
  429. 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)
  430. - uses: actions/upload-artifact@v2
  431. with:
  432. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  433. path: |
  434. *.zip
  435. win64:
  436. runs-on: ubuntu-20.04
  437. steps:
  438. - uses: actions/checkout@v2
  439. with:
  440. submodules: recursive
  441. - name: Set up cache
  442. uses: actions/cache@v2
  443. with:
  444. path: |
  445. ~/PawPawBuilds
  446. key: win64-v${{ env.CACHE_VERSION }}
  447. - name: Fix GitHub's mess
  448. run: |
  449. sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  450. sudo apt-get update -qq
  451. sudo apt-get install -yqq --allow-downgrades libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
  452. - name: Set up dependencies
  453. run: |
  454. sudo apt-get update -qq
  455. sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  456. - name: Build extra dependencies
  457. run: |
  458. ./deps/PawPaw/bootstrap-cardinal.sh win64
  459. - name: Build win64 cross-compiled
  460. run: |
  461. pushd deps/PawPaw; source local.env win64; popd
  462. make features
  463. make NOOPT=true WITH_LTO=true -j $(nproc)
  464. - name: Set sha8
  465. id: slug
  466. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  467. - name: Pack binaries
  468. run: |
  469. 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)
  470. - uses: actions/upload-artifact@v2
  471. with:
  472. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  473. path: |
  474. *.zip
  475. plugin-validation:
  476. runs-on: ubuntu-20.04
  477. steps:
  478. - uses: actions/checkout@v2
  479. with:
  480. submodules: recursive
  481. - name: Set up dependencies
  482. run: |
  483. # custom repos
  484. wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
  485. sudo dpkg -i kxstudio-repos_10.0.3_all.deb
  486. sudo apt-get update -qq
  487. # build-deps
  488. sudo apt-get install -yqq libgl1-mesa-dev liblo-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  489. # runtime testing
  490. sudo apt-get install -yqq carla-git lilv-utils lv2-dev lv2lint valgrind
  491. - name: Build plugins
  492. env:
  493. CFLAGS: -g
  494. CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
  495. LDFLAGS: -static-libgcc -static-libstdc++
  496. run: |
  497. make features
  498. make NOOPT=true SKIP_STRIPPING=true -j $(nproc)
  499. - name: Validate LV2 ttl syntax
  500. run: |
  501. lv2_validate \
  502. /usr/lib/lv2/mod.lv2/*.ttl \
  503. /usr/lib/lv2/kx-meta/*.ttl \
  504. /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \
  505. /usr/lib/lv2/kx-programs.lv2/*.ttl \
  506. ./bin/*.lv2/*.ttl
  507. #- name: Validate LV2 metadata and binaries
  508. #run: |
  509. #export LV2_PATH=/tmp/lv2-path
  510. #mkdir ${LV2_PATH}
  511. #cp -r bin/*.lv2 \
  512. #/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 \
  513. #${LV2_PATH}
  514. #lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls)
  515. - name: Test LV2 plugin
  516. run: |
  517. export LV2_PATH=/tmp/lv2-path
  518. for p in $(lv2ls); do \
  519. env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  520. valgrind \
  521. --error-exitcode=255 \
  522. --leak-check=no \
  523. --track-origins=yes \
  524. --suppressions=./dpf/utils/valgrind-dpf.supp \
  525. /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \
  526. done
  527. # - name: Test VST2 plugin
  528. # env:
  529. # CARLA_DO_NOT_USE_JUCE_FOR_VST2: 1
  530. # run: |
  531. # for p in $(ls bin/*.vst/*.so); do \
  532. # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  533. # valgrind \
  534. # --error-exitcode=255 \
  535. # --leak-check=no \
  536. # --track-origins=yes \
  537. # --suppressions=./dpf/utils/valgrind-dpf.supp \
  538. # /usr/lib/carla/carla-bridge-native vst2 ./${p} "" 1>/dev/null; \
  539. # done
  540. # - name: Test VST3 plugin
  541. # run: |
  542. # for p in $(ls bin/ | grep vst3); do \
  543. # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
  544. # valgrind \
  545. # --error-exitcode=255 \
  546. # --leak-check=no \
  547. # --track-origins=yes \
  548. # --suppressions=./dpf/utils/valgrind-dpf.supp \
  549. # /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
  550. # done