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.

743 lines
32KB

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