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.

78 lines
2.0KB

  1. name: Build VCV Rack Plugin
  2. on: [push, pull_request]
  3. env:
  4. rack-sdk-version: 1.1.6
  5. defaults:
  6. run:
  7. shell: bash
  8. jobs:
  9. build:
  10. name: ${{ matrix.config.name }}
  11. runs-on: ${{ matrix.config.os }}
  12. strategy:
  13. matrix:
  14. config:
  15. - {
  16. name: Linux,
  17. os: ubuntu-18.04,
  18. prepare-os: sudo apt install -y libglu-dev
  19. }
  20. - {
  21. name: MacOS,
  22. os: macos-latest,
  23. prepare-os: ""
  24. }
  25. - {
  26. name: Windows,
  27. os: windows-latest,
  28. prepare-os: export CC=gcc
  29. }
  30. steps:
  31. - uses: actions/checkout@v2
  32. with:
  33. submodules: recursive
  34. - name: Get Rack-SDK
  35. run: |
  36. pushd $HOME
  37. curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}.zip
  38. unzip Rack-SDK.zip
  39. - name: Patch plugin.mk, use 7zip on Windows
  40. if: runner.os == 'Windows'
  41. run: |
  42. sed -i 's/zip -q -9 -r/7z a -tzip -mx=9/' $HOME/Rack-SDK/plugin.mk
  43. - name: Patch Makefile to use old glibc versions
  44. if: runner.os == 'Linux'
  45. run: |
  46. echo "FLAGS += -include force_link_glibc_2.23.h" >> Makefile
  47. - name: Build plugin
  48. run: |
  49. ${{ matrix.config.prepare-os }}
  50. export RACK_DIR=$HOME/Rack-SDK
  51. make -j dep
  52. make -j dist
  53. - name: Upload artifact
  54. uses: actions/upload-artifact@v2
  55. with:
  56. path: dist
  57. name: ${{ matrix.config.name }}
  58. publish:
  59. name: Publish plugin
  60. runs-on: ubuntu-18.04
  61. needs: build
  62. steps:
  63. - uses: actions/download-artifact@v2
  64. with:
  65. path: _artifacts
  66. - uses: "marvinpinto/action-automatic-releases@latest"
  67. with:
  68. repo_token: "${{ secrets.GITHUB_TOKEN }}"
  69. automatic_release_tag: "latest"
  70. prerelease: true
  71. title: "Development Build"
  72. files: |
  73. _artifacts/**/*.zip