-
-
Notifications
You must be signed in to change notification settings - Fork 923
336 lines (303 loc) · 10.2 KB
/
build.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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
name: Build
on:
# Do it on every push or PR on these branches
push:
branches: [dev, stable]
pull_request:
branches: [dev, stable]
# Do build on demand
workflow_dispatch:
jobs:
# Build Sonic Pi
build:
name: "${{matrix.title}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})"
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- {
title: "Linux",
os: "ubuntu-latest",
cc: "clang",
arch: "x64",
build_type: "Release",
}
- {
title: "Linux",
os: "ubuntu-latest",
cc: "clang",
arch: "x64",
build_type: "Debug",
}
- {
title: "Linux",
os: "ubuntu-latest",
cc: "gcc",
arch: "x64",
build_type: "Release",
}
- {
title: "Linux",
os: "ubuntu-latest",
cc: "gcc",
arch: "x64",
build_type: "Debug",
}
- {
title: "Windows",
os: "windows-latest",
cc: "vs2022",
arch: "x64",
build_type: "Release",
}
- {
title: "Windows",
os: "windows-latest",
cc: "vs2022",
arch: "x64",
build_type: "Debug",
}
- {
title: "Mac",
os: "macos-latest",
cc: "clang",
arch: "x64",
build_type: "Release",
}
- {
title: "Mac",
os: "macos-latest",
cc: "clang",
arch: "x64",
build_type: "Debug",
}
- {
title: "Mac",
os: "macos-latest",
cc: "clang",
arch: "arm64",
build_type: "Release",
}
- {
title: "Mac",
os: "macos-latest",
cc: "clang",
arch: "arm64",
build_type: "Debug",
}
steps:
# Get the code
- uses: actions/checkout@v4
# Install Ruby for the windows build
- uses: ruby/setup-ruby@v1
id: ruby-inst
with:
ruby-version: 3.2
if: matrix.os == 'windows-latest'
# Install gems Windows
- name: Setup Ruby Windows
working-directory: ${{github.workspace}}/app
run: |
gem install rugged
gem install test-unit
if: matrix.os == 'windows-latest'
# Install gems Linux/Max - needs sudo
- name: Setup Ruby Gems
working-directory: ${{github.workspace}}/app
run: |
sudo gem install rugged
sudo gem install test-unit
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
# For windows we build a symlink in the bash shell because the windows method does not seem to work.
- name: Add SymLink for Windows
working-directory: ${{github.workspace}}/app/server/native
run: |
ln -s ${{steps.ruby-inst.outputs.ruby-prefix}} ruby
if: matrix.os == 'windows-latest'
# Get Qt
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
modules: "qtpositioning qtwebchannel qtwebengine qtwebsockets"
version: "6.7.0"
# Install Elixir on Ubuntu
- name: Linux Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "27"
elixir-version: "1.17"
if: matrix.os == 'ubuntu-latest'
# Install Elixir on Windows
- name: Win Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "27"
elixir-version: "1.17"
if: matrix.os == 'windows-latest'
# Install Elixir on MacOS
- name: Mac Elixir
continue-on-error: true
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew update
brew install elixir
if: matrix.os == 'macos-latest'
# Prebuild on Ubuntu
- name: Prebuild Linux
working-directory: ${{github.workspace}}/app
env:
CC: ${{ matrix.cc }}
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
run: |
sudo apt install -y pulseaudio dbus-x11 libssl-dev ruby-dev supercollider-server sc3-plugins-server alsa-base alsa-utils jackd2 libjack-jackd2-dev libjack-jackd2-0 libasound2-dev librtmidi-dev pulseaudio-module-jack
./linux-prebuild.sh
if: matrix.os == 'ubuntu-latest'
# Prebuild on Mac
- name: Prebuild Mac
working-directory: ${{github.workspace}}/app
env:
CC: ${{ matrix.cc }}
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
run: |
./mac-prebuild.sh
if: matrix.os == 'macos-latest'
# Prebuild on Windows
# Note that we 'hide' the msys folders on windows to stop conflicts when building
# Flac
- name: Prebuild Windows
working-directory: ${{github.workspace}}/app
shell: cmd
env:
CC: ${{ matrix.cc }}
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
run: |
mv c:/msys64 c:/__msys64
win-prebuild.bat
if: matrix.os == 'windows-latest'
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# Run Configuration Config on Ubuntu
- name: Config Linux
working-directory: ${{github.workspace}}/app
env:
CC: ${{ matrix.cc }}
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
run: |
./linux-config.sh --config ${{ matrix.build_type }}
if: matrix.os == 'ubuntu-latest'
# Run Configuration Config on Mac
- name: Config Mac
working-directory: ${{github.workspace}}/app
env:
CC: ${{ matrix.cc }}
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
run: |
./mac-config.sh --config ${{ matrix.build_type }}
if: matrix.os == 'macos-latest'
# Run Configuration Config on Windows
- name: Config Windows
working-directory: ${{github.workspace}}/app
shell: cmd
env:
CC: ${{ matrix.cc }}
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
run: |
win-config.bat ${{ matrix.build_type }}
if: matrix.os == 'windows-latest'
# Finally: Build
- name: Build Linux
working-directory: ${{github.workspace}}/app
run: ./linux-build-gui.sh
if: matrix.os == 'ubuntu-latest'
- name: Build Mac
working-directory: ${{github.workspace}}/app
run: ./mac-build-gui.sh
if: matrix.os == 'macos-latest'
- name: Build Windows
working-directory: ${{github.workspace}}/app
shell: cmd
run: win-build-gui.bat ${{ matrix.build_type }}
if: matrix.os == 'windows-latest'
# Build Tau server
- name: Build Tau Server (Linux)
working-directory: ${{github.workspace}}/app
run: ./linux-post-tau-prod-release.sh
if: matrix.os == 'ubuntu-latest'
- name: Build Tau Server (Mac)
working-directory: ${{github.workspace}}/app
run: ./mac-post-tau-prod-release.sh
if: matrix.os == 'macos-latest'
- name: Build Tau Server (Windows)
working-directory: ${{github.workspace}}/app
shell: cmd
run: win-post-tau-prod-release.bat
if: matrix.os == 'windows-latest'
- name: BEAM Tests Windows
shell: cmd
working-directory: ${{github.workspace}}/app/server/beam/tau
run: mix test
env:
TAU_ENV: test
TAU_LOG_PATH: ${{github.workspace}}/tau_log.txt
if: matrix.os == 'windows-latest'
- name: BEAM Tests (Linux)
working-directory: ${{github.workspace}}/app/server/beam/tau
run: mix test
env:
TAU_ENV: test
TAU_LOG_PATH: ${{github.workspace}}/tau_log.txt
if: matrix.os == 'ubuntu-latest'
- name: BEAM Tests (macOS)
working-directory: ${{github.workspace}}/app/server/beam/tau
run: mix test
env:
TAU_ENV: test
TAU_LOG_PATH: ${{github.workspace}}/tau_log.txt
if: matrix.os == 'macos-latest'
- name: Ruby Tests (Mac/Linux)
working-directory: ${{github.workspace}}/app/server/ruby
run: rake test
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- name: API Tests - Mac
working-directory: ${{github.workspace}}/app/build/api-tests
env:
SONIC_PI_ENV: test
run: ctest --verbose
if: matrix.os == 'macos-latest'
- name: API Tests - Linux
working-directory: ${{github.workspace}}/app/build/api-tests
env:
SONIC_PI_ENV: test
run: |
jackd -rd dummy &
ctest --verbose
if: matrix.os == 'ubuntu-latest'
- name: API Tests Windows - Install Scream Audio Device
shell: powershell
run: |
Start-Service audio*
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip
Expand-7ZipArchive -Path C:\Scream3.6.zip -DestinationPath C:\Scream
$cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate
$store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine")
$store.Open("ReadWrite")
$store.Add($cert)
$store.Close()
cd C:\Scream\Install\driver
C:\Scream\Install\helpers\devcon install Scream.inf *Scream
if: matrix.os == 'windows-latest'
- name: API Tests - Windows
shell: cmd
working-directory: ${{github.workspace}}/app/build/api-tests
env:
SONIC_PI_ENV: test
run: ctest --verbose
if: matrix.os == 'windows-latest'
- name: Archive Logs
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Logs_${{matrix.title}}_${{matrix.cc}}_${{matrix.arch}}_${{matrix.build_type}}
path: |
~/.sonic-pi/log/*.log