-
Notifications
You must be signed in to change notification settings - Fork 22
155 lines (131 loc) · 4.47 KB
/
build-mac.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
name: Build macOS
on:
workflow_dispatch:
push:
concurrency:
group: ${{github.ref}}
cancel-in-progress: true
env:
PROJECT_NAME: TemplateProject
BUILD_DIR: build-mac
ARTIFACT_EXT: mac
PLUGINVAL_VER: v1.0.2
VST3_VER: v3.7.7_build_19
jobs:
build-mac:
name: Build macOS
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/[email protected]
with:
submodules: recursive
- name: Cache Prebuilt Libs
id: cache-deps
uses: actions/cache@v3
with:
path: |
iPlug2/Dependencies/Build
iPlug2/Dependencies/iPlug
key: ${{runner.os}}-deps-${{hashFiles('iPlug2/Dependencies/download-prebuilt-libs.sh', 'iPlug2/Dependencies/IGraphics/build-igraphics-libs-mac.sh', 'iPlug2/Dependencies/IGraphics/build-skia-mac.sh')}}
- name: Get Prebuilt Libs
if: steps.cache-deps.outputs.cache-hit != 'true'
shell: bash
run: |
cd iPlug2/Dependencies
./download-prebuilt-libs.sh
- name: Cache VST3 SDK
id: cache-vst3
uses: actions/cache@v3
with:
path: |
iPlug2/Dependencies/IPlug/VST3_SDK
key: ${{runner.os}}-vst3-${{env.VST3_VER}}
- name: Get VST3 SDK
if: steps.cache-vst3.outputs.cache-hit != 'true'
shell: bash
run: |
cd iPlug2/Dependencies/IPlug
./download-vst3-sdk.sh ${{env.VST3_VER}} build-validator
- name: Get VST2 SDK
shell: bash
env:
VST2_SDK: ${{secrets.VST2_SDK}}
run: |
mkdir tmp
echo $VST2_SDK | base64 -d > tmp/tmp.zip
unzip tmp/tmp.zip -d tmp
mv tmp/VST2_SDK/* iPlug2/Dependencies/IPlug/VST2_SDK
- name: Build
shell: bash
run: |
cd ${{env.PROJECT_NAME}}/scripts
./makedist-mac.sh full zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}
path: |
${{env.PROJECT_NAME}}/${{env.BUILD_DIR}}/out
test-mac:
name: Test macOS
runs-on: macos-latest
needs: build-mac
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}
- name: Unzip files
shell: bash
run: |
unzip *-${{env.ARTIFACT_EXT}}.zip
unzip *-${{env.ARTIFACT_EXT}}-auval.zip
- name: Cache Pluginval
id: cache-pluginval
uses: actions/cache@v3
with:
path: |
./pluginval.app
key: ${{runner.os}}-pluginval-${{env.PLUGINVAL_VER}}
- name: Get Pluginval
if: steps.cache-pluginval.outputs.cache-hit != 'true'
shell: bash
run: |
curl -L "https://github.com/Tracktion/pluginval/releases/download/${{env.PLUGINVAL_VER}}/pluginval_macOS.zip" -o pluginval.zip
unzip pluginval
- name: Restore VST3 SDK
id: cache-vst3
uses: actions/cache/restore@v3
with:
path: |
iPlug2/Dependencies/IPlug/VST3_SDK
key: ${{runner.os}}-vst3-${{env.VST3_VER}}
- name: Test VST3 with VST3 Validator
shell: bash
run: |
./iPlug2/Dependencies/IPlug/VST3_SDK/validator ${{env.PROJECT_NAME}}.vst3
- name: Test VST3 with Pluginval
shell: bash
run: |
pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{env.PROJECT_NAME}}.vst3 || exit 1
- name: Test AUv2 with Pluginval
shell: bash
run: |
mkdir -p ~/Library/Audio/Plug-Ins/Components
mv ${{env.PROJECT_NAME}}.component ~/Library/Audio/Plug-Ins/Components
pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar Process not found"
pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ~/Library/Audio/Plug-Ins/Components/${{env.PROJECT_NAME}}.component || exit 1
- name: Test AUv2 with auval
shell: bash
run: |
./validate_audiounit.sh config.h
# - name: Test AUv2 with auval (RTSafe)
# shell: bash
# run: |
# ./validate_audiounit.sh config.h rtsafe
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}-pluginval
path: ./bin