-
Notifications
You must be signed in to change notification settings - Fork 4
224 lines (179 loc) · 6.85 KB
/
build-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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: Build Six Sines
on:
push:
branches:
- main
- rel_*
tags:
- 'v**'
pull_request:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
jobs:
build_plugin:
name: Build - ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
name: windows-x64
cmake_args: -DCMAKE_CXX_COMPLIER=clang++ -DCMAKE_C_COMPILER=clang -GNinja
- os: macos-latest
name: macos
cmake_args: -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -GNinja
- os: ubuntu-latest
name: linux-x64
cmake_args: -GNinja
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare for JUCE
uses: surge-synthesizer/sst-githubactions/prepare-for-juce@main
with:
os: ${{ runner.os }}
- uses: apple-actions/import-codesign-certs@v3
if: runner.os == 'macOS' && github.event_name != 'pull_request'
with:
p12-file-base64: ${{ secrets.MAC_CERTS_P12 }}
p12-password: ${{ secrets.CERT_PWD }}
- name: Build release version
if: github.event_name != 'pull_request'
run: |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
cmake --build ./build --config Release --target six-sines_all --parallel 3
- name: Make windows zip
if: github.event_name != 'pull_request' && runner.os == 'Windows'
run: |
mkdir build/inst
mkdir build/insttmp
mv build/CLAP/*.clap build/insttmp
mv build/*.vst3 build/insttmp
mv build/*.exe build/insttmp
pushd build/insttmp
ls -al
popd
7z a -r build/inst/six-sines-windows-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.zip build/insttmp/*
- name: Make linux tgz
if: github.event_name != 'pull_request' && runner.os == 'Linux'
run: |
find build -name "Six Sines*" -print
mkdir build/inst
mkdir build/insttmp
mv build/*.clap build/insttmp
mv "build/Six Sines" build/insttmp
mv build/Release/*.vst3 build/insttmp
find build -name "Six Sines*" -print
cd build/insttmp
ls -al
tar cvzf ../inst/six-sines-linux-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.tgz .
- name: Make Mac
if: github.event_name != 'pull_request' && runner.os == 'macOS'
run: |
export MAC_SIGNING_CERT="${{ secrets.MAC_SIGNING_CERT_NAME }}"
export MAC_INSTALLING_CERT="${{ secrets.MAC_INSTALLING_CERT_NAME }}"
export MAC_SIGNING_ID="${{ secrets.MAC_SIGNING_ID }}"
export MAC_SIGNING_1UPW="${{ secrets.MAC_SIGNING_1UPW }}"
export MAC_SIGNING_TEAM="${{ secrets.MAC_SIGNING_TEAM }}"
mkdir build/inst
cd build
../libs/sst/sst-plugininfra/scripts/installer_mac/make_installer.sh "Six Sines" . ../resources/mac_installer inst `date +"%Y-%m-%d"`-`git rev-parse --short HEAD`
codesign -d --entitlement - installer-tmp/APP/Six\ Sines.app
- name: Configure pull request version
if: github.event_name == 'pull_request'
run: |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
- name: Build pull request version
if: github.event_name == 'pull_request'
run: |
cmake --build ./build --config Debug --target six-sines_all --parallel 3
- name: Find all the six sines
run: |
find build -name "Six Sines*" -print
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: build/inst
name: dawplugin-${{ matrix.name }}
build_plugin_docker:
name: Docker Build Ubuntu20 ${{ matrix.name }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build in Docker
uses: surge-synthesizer/sst-githubactions/cmake-in-docker@main
with:
image: ghcr.io/surge-synthesizer/sst-dockerimages/ubuntu20_gcc11:main
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
cmakeArgs: -DCMAKE_BUILD_TYPE=Release -GNinja -DCOPY_AFTER_BUILD=FALSE -DGITHUB_ACTIONS_BUILD=TRUE
target: six-sines_all
- name: Make linux tgz
run: |
find build -name "Six Sines*" -print
mkdir build/inst
mkdir build/insttmp
mv build/*.clap build/insttmp
mv "build/Six Sines" build/insttmp
mv build/Release/*.vst3 build/insttmp
find build -name "Six Sines*" -print
cd build/insttmp
ls -al
tar cvzf ../inst/six-sines-linux-`date +"%Y-%m-%d"`-`git rev-parse --short HEAD`.tgz .
- name: Show Installer Directory
run: |
ls -l ./build/inst
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
path: build/installer
name: build-docker-linux
publish-plugin-nightly:
name: Publish Nightlu
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'baconpaul' }}
runs-on: ubuntu-latest
needs: [build_plugin, build_plugin_docker]
steps:
- name: Upload to Nightly
uses: surge-synthesizer/sst-githubactions/upload-to-release@main
with:
tag: Nightly
reuse_tag: true
create_tag: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Post to Discord
uses: surge-synthesizer/sst-githubactions/discord-release-notify@main
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tag: Nightly
title: "A New Six Sines Nightly is Available"
subtitle: "Have fun!"
publish-plugin-release:
name: Publish Release
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'baconpaul'
runs-on: ubuntu-latest
needs: [build_plugin, build_plugin_docker]
steps:
- name: Upload to Release
uses: surge-synthesizer/sst-githubactions/upload-to-release@main
with:
tag: ${{ github.ref_name }}
reuse_tag: false
create_tag: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Post to Discord
uses: surge-synthesizer/sst-githubactions/discord-release-notify@main
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tag: ${{ github.ref_name }}
title: "A New Six Sines Release is Available"
subtitle: "But really, what does stable mean?"