generated from iPlug2/iPlug2OOS
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (113 loc) · 4.05 KB
/
build-native.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
name: Build Native
on:
workflow_dispatch
# push:
# tags:
# - "v*"
env:
PROJECT_NAME: wasmworkshop
jobs:
build:
name: Build-native-plugins
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
include:
- os: macos-latest
build_dir: build-mac
artifact_ext: mac
- os: windows-latest
build_dir: build-win
artifact_ext: win
steps:
# - name: Checkout iPlug2
# uses: actions/checkout@v2
# with:
# repository: iPlug2/iPlug2
# path: iPlug2
# - name: Check out repository
# uses: actions/checkout@v2
# with:
# path: iPlug2/Projects/${{env.PROJECT_NAME}}
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Get VST3 SDK
run: |
cd iPlug2/Dependencies/IPlug
./download-iplug-sdks.sh
shell: bash
- name: Get Prebuilt Libs
run: |
cd iPlug2/Dependencies
./download-prebuilt-libs.sh
shell: bash
- name: Build macOS
if: matrix.os == 'macOS-latest'
run: |
cd ${{env.PROJECT_NAME}}/scripts
./makedist-mac.sh full zip
shell: bash
- name: Add msbuild to PATH (Windows)
if: matrix.os == 'windows-latest'
uses: microsoft/[email protected]
- name: Build Windows
if: matrix.os == 'windows-latest'
run: |
cd ${{env.PROJECT_NAME}}\scripts
.\makedist-win.bat full zip
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: ${{env.PROJECT_NAME}}-${{matrix.artifact_ext}}
path: ${{env.PROJECT_NAME}}/${{matrix.build_dir}}/out
test:
name: Test Native
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
include:
- os: macos-latest
artifact_ext: mac
- os: windows-latest
artifact_ext: win
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: ${{env.PROJECT_NAME}}-${{matrix.artifact_ext}}
# - name: Display structure of downloaded files
# run: ls -R
- name: Unzip files
run: |
unzip *-${{matrix.artifact_ext}}.zip
shell: bash
- name: Pluginval (macOS)
if: matrix.os == 'macos-latest'
run: |
curl -L "https://github.com/Tracktion/pluginval/releases/download/latest_release/pluginval_macOS.zip" -o pluginval.zip
unzip pluginval
pluginval.app/Contents/MacOS/pluginval --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{env.PROJECT_NAME}}.vst3 || exit 1
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
shell: bash
- name: Pluginval (Windows)
if: matrix.os == 'windows-latest'
run: |
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest https://github.com/Tracktion/pluginval/releases/download/latest_release/pluginval_Windows.zip -OutFile pluginval.zip"
powershell -Command "Expand-Archive pluginval.zip -DestinationPath ."
pluginval.exe --skip-gui-tests --validate-in-process --output-dir "./bin" --validate ${{env.PROJECT_NAME}}.vst3
if %ERRORLEVEL% neq 0 exit /b 1
shell: cmd
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: ${{env.PROJECT_NAME}}-${{matrix.artifact_ext}}-pluginval
path: ./bin/