Skip to content

Commit 3af07dd

Browse files
committed
Add new build-mac ci script
1 parent b019489 commit 3af07dd

File tree

3 files changed

+145
-4
lines changed

3 files changed

+145
-4
lines changed

.github/workflows/build-mac.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Build macOS
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
concurrency:
8+
group: ${{github.ref}}
9+
cancel-in-progress: true
10+
11+
env:
12+
PROJECT_NAME: TemplateProject
13+
BUILD_DIR: build-mac
14+
ARTIFACT_EXT: mac
15+
PLUGINVAL_VER: v1.0.2
16+
VST3_VER: v3.7.9_build_61
17+
18+
jobs:
19+
build-mac:
20+
name: Build macOS
21+
runs-on: macos-latest
22+
23+
steps:
24+
- name: Check out repository
25+
uses: actions/[email protected]
26+
with:
27+
submodules: recursive
28+
29+
- name: Cache Prebuilt Libs
30+
id: cache-deps
31+
uses: actions/cache@v3
32+
with:
33+
path: |
34+
iPlug2/Dependencies/Build
35+
iPlug2/Dependencies/iPlug
36+
key: ${{runner.os}}-${{hashFiles('iPlug2/Dependencies/download-prebuilt-libs.sh', 'iPlug2/Dependencies/IGraphics/build-igraphics-libs-mac.sh', 'iPlug2/Dependencies/IGraphics/build-skia-mac.sh')}}
37+
38+
- name: Cache VST3 SDK
39+
id: cache-vst3
40+
uses: actions/cache@v3
41+
with:
42+
path: |
43+
iPlug2/Dependencies/IPlug/VST3_SDK
44+
key: ${{runner.os}}-vst3-${{env.VST3_VER}}
45+
46+
- name: Get Prebuilt Libs
47+
if: steps.cache-deps.outputs.cache-hit != 'true'
48+
shell: bash
49+
run: |
50+
cd iPlug2/Dependencies
51+
./download-prebuilt-libs.sh
52+
53+
- name: Get VST3 SDK
54+
if: steps.cache-vst3.outputs.cache-hit != 'true'
55+
shell: bash
56+
run: |
57+
cd iPlug2/Dependencies/IPlug
58+
./download-iplug-sdks.sh
59+
60+
# - name: Checkout VST3 SDK
61+
# if: steps.cache-deps.outputs.cache-hit != 'true'
62+
# uses: actions/[email protected]
63+
# with:
64+
# repository: steinbergmedia/vst3sdk
65+
# submodules: recursive
66+
# path: "iPlug2/Dependencies/IPlug/VST3_SDK"
67+
68+
- name: Build
69+
shell: bash
70+
run: |
71+
cd ${{env.PROJECT_NAME}}/scripts
72+
./makedist-mac.sh full zip
73+
74+
- name: Upload artifact
75+
uses: actions/upload-artifact@v3
76+
with:
77+
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}
78+
path: |
79+
${{env.PROJECT_NAME}}/${{env.BUILD_DIR}}/out
80+
81+
test-mac:
82+
name: Test macOS
83+
runs-on: macos-latest
84+
needs: build-mac
85+
86+
steps:
87+
- name: Download artifact
88+
uses: actions/download-artifact@v3
89+
with:
90+
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}
91+
92+
- name: Unzip files
93+
shell: bash
94+
run: |
95+
unzip *-${{env.ARTIFACT_EXT}}.zip
96+
unzip *-${{env.ARTIFACT_EXT}}-auval.zip
97+
98+
- name: Cache Pluginval
99+
id: cache-pluginval
100+
uses: actions/cache@v3
101+
with:
102+
path: |
103+
./pluginval.app
104+
key: ${{runner.os}}-pluginval-${{env.PLUGINVAL_VER}}
105+
106+
- name: Get Pluginval
107+
if: steps.cache-pluginval.outputs.cache-hit != 'true'
108+
shell: bash
109+
run: |
110+
curl -L "https://github.com/Tracktion/pluginval/releases/download/${{env.PLUGINVAL_VER}}/pluginval_macOS.zip" -o pluginval.zip
111+
unzip pluginval
112+
113+
- name: Pluginval VST3
114+
shell: bash
115+
run: |
116+
pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{env.PROJECT_NAME}}.vst3 || exit 1
117+
118+
- name: Pluginval AUv2
119+
shell: bash
120+
run: |
121+
mkdir -p ~/Library/Audio/Plug-Ins/Components
122+
mv ${{env.PROJECT_NAME}}.component ~/Library/Audio/Plug-Ins/Components
123+
pgrep -x AudioComponentRegistrar >/dev/null && killall -9 AudioComponentRegistrar; echo "killed AudioComponentRegistrar" || echo "AudioComponentRegistrar Process not found"
124+
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
125+
126+
- name: auval AUv2
127+
shell: bash
128+
run: |
129+
./validate_audiounit.sh config.h
130+
131+
- name: auval AUv2 real time safety
132+
shell: bash
133+
run: |
134+
./validate_audiounit.sh config.h rtsafe
135+
136+
- name: Upload artifact
137+
uses: actions/upload-artifact@v3
138+
with:
139+
name: ${{env.PROJECT_NAME}}-${{env.ARTIFACT_EXT}}-pluginval
140+
path: ./bin

.github/workflows/build-native.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Build Native
22

33
on:
4-
# workflow_dispatch
5-
push:
4+
workflow_dispatch
5+
# push:
66
# tags:
77
# - "v*"
88

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.DS_Store
22
xcuserdata
33
*.RPP-bak
4-
build-*
5-
4+
build-mac/
5+
build-win/
6+
build-web/
67
*.ipch
78
*.db
89
*.suo

0 commit comments

Comments
 (0)