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.

85 lines
2.3KB

  1. name: Build VCV Rack Plugin
  2. on: [push, pull_request]
  3. env:
  4. rack-sdk-version: 2.4.1
  5. rack-plugin-toolchain-dir: /home/build/rack-plugin-toolchain
  6. defaults:
  7. run:
  8. shell: bash
  9. jobs:
  10. build:
  11. name: ${{ matrix.platform }}
  12. runs-on: ubuntu-latest
  13. container:
  14. image: ghcr.io/qno/rack-plugin-toolchain-win-linux
  15. options: --user root
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. platform: [win-x64, lin-x64]
  20. steps:
  21. - uses: actions/checkout@v3
  22. with:
  23. submodules: recursive
  24. - name: Build plugin
  25. run: |
  26. export PLUGIN_DIR=$GITHUB_WORKSPACE
  27. pushd ${{ env.rack-plugin-toolchain-dir }}
  28. make plugin-build-${{ matrix.platform }}
  29. - name: Upload artifact
  30. uses: actions/upload-artifact@v3
  31. with:
  32. path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
  33. name: ${{ matrix.platform }}
  34. build-mac:
  35. name: mac
  36. runs-on: macos-12
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. platform: [x64, arm64]
  41. steps:
  42. - uses: actions/checkout@v3
  43. with:
  44. submodules: recursive
  45. - name: Get Rack-SDK
  46. run: |
  47. pushd $HOME
  48. curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-${{ matrix.platform }}.zip
  49. unzip Rack-SDK.zip
  50. - name: Build plugin
  51. run: |
  52. CROSS_COMPILE_TARGET_x64=x86_64-apple-darwin
  53. CROSS_COMPILE_TARGET_arm64=arm64-apple-darwin
  54. export RACK_DIR=$HOME/Rack-SDK
  55. export CROSS_COMPILE=$CROSS_COMPILE_TARGET_${{ matrix.platform }}
  56. make dep
  57. make dist
  58. echo "Plugin architecture '$(lipo -archs plugin.dylib)'"
  59. - name: Upload artifact
  60. uses: actions/upload-artifact@v3
  61. with:
  62. path: dist/*.vcvplugin
  63. name: mac-${{ matrix.platform }}
  64. publish:
  65. name: Publish plugin
  66. runs-on: ubuntu-latest
  67. needs: [build, build-mac]
  68. steps:
  69. - uses: actions/download-artifact@v3
  70. with:
  71. path: _artifacts
  72. - uses: "marvinpinto/action-automatic-releases@latest"
  73. with:
  74. repo_token: "${{ secrets.GITHUB_TOKEN }}"
  75. automatic_release_tag: "latest"
  76. prerelease: true
  77. title: "Development Build"
  78. files: |
  79. _artifacts/**/*.vcvplugin