-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (159 loc) · 4.76 KB
/
build_vcv_plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Build VCV Rack Plugin
on:
workflow_dispatch:
inputs:
linux_x64:
description: 'Build Linux x64 plugin'
required: true
default: false
type: boolean
win_x64:
description: 'Build Windows x64 plugin'
required: true
default: false
type: boolean
mac_x64:
description: 'Build Mac x64 plugin'
required: true
default: false
type: boolean
mac_arm64:
description: 'Build Mac arm64 plugin'
required: true
default: false
type: boolean
push:
tags:
- 'vcv-v[0-9]+.[0-9]+.[0-9]+'
branches:
- main
paths:
- 'shared/**'
- 'vcv/**'
- '!**.md' # Skip docs
- '!shared/svgextract' # Skip generator script (still run CI if generated files change)
- '!shared/gen_minblep' # Skip generator script (still run CI if generated files change)
- '!shared/tableGen' # Skip generator script (still run CI if generated files change)
env:
rack-sdk-version: latest
rack-plugin-toolchain-dir: /home/build/rack-plugin-toolchain
defaults:
run:
shell: bash
jobs:
build-lin-x64:
if: ${{ github.event_name == 'push' || inputs.linux_x64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: lin-x64
runs-on: ubuntu-latest
container:
image: ghcr.io/qno/rack-plugin-toolchain-win-linux
options: --user root
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build plugin
run: |
export PLUGIN_DIR=$GITHUB_WORKSPACE/vcv
pushd ${{ env.rack-plugin-toolchain-dir }}
make plugin-build-lin-x64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
name: lin-x64
build-win-x64:
if: ${{ inputs.win_x64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: win-x64
runs-on: ubuntu-latest
container:
image: ghcr.io/qno/rack-plugin-toolchain-win-linux
options: --user root
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build plugin
run: |
export PLUGIN_DIR=$GITHUB_WORKSPACE/vcv
pushd ${{ env.rack-plugin-toolchain-dir }}
make plugin-build-win-x64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
name: win-x64
build-mac-x64:
if: ${{ inputs.mac_x64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: mac_x64
runs-on: macos-12
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Get Rack-SDK
run: |
pushd $HOME
wget -O Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-x64.zip
unzip Rack-SDK.zip
- name: Build plugin
run: |
cd vcv
export RACK_DIR=$HOME/Rack-SDK
export CROSS_COMPILE=x86_64-apple-darwin
make dep
make dist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: vcv/dist/*.vcvplugin
name: mac-x64
build-mac-arm64:
if: ${{ inputs.mac_arm64 || startsWith(github.ref, 'refs/tags/vcv-v') }}
name: mac_arm64
runs-on: macos-12
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Get Rack-SDK
run: |
pushd $HOME
wget -O Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-arm64.zip
unzip Rack-SDK.zip
- name: Build plugin
run: |
cd vcv
export RACK_DIR=$HOME/Rack-SDK
export CROSS_COMPILE=arm64-apple-darwin
make dep
make dist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: vcv/dist/*.vcvplugin
name: mac-arm64
publish:
if: startsWith(github.ref, 'refs/tags/vcv-v')
name: Publish plugin
runs-on: ubuntu-latest
needs: [build-lin-x64, build-win-x64, build-mac-x64, build-mac-arm64]
steps:
- uses: actions/download-artifact@v3
with:
path: _artifacts
- uses: FranzDiebold/github-env-vars-action@v2
- uses: softprops/action-gh-release@v1
with:
name: "Development Build: ${{ env.CI_REF_NAME }}"
body: "VCV plugin version as of tag ${{ env.CI_REF_NAME }}"
files: |
_artifacts/**/*.vcvplugin