1
1
name : Build
2
2
3
3
on :
4
+ # Do it on every push or PR on these branches
4
5
push :
5
- branches : [ dev, main, workflow_dispatch, features/new-layout-and-api ]
6
+ branches : [ dev, stable ]
6
7
pull_request :
7
- branches : [ dev, main, workflow_dispatch, features/new-layout-and-api ]
8
+ branches : [ dev, stable ]
9
+ # Do build on demand
10
+ workflow_dispatch :
8
11
9
12
jobs :
13
+ # Build Sonic Pi
10
14
build :
11
15
name : " ${{matrix.title}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})"
12
16
runs-on : ${{matrix.os}}
18
22
- { title: "Linux", os: "ubuntu-latest", cc: "clang", arch: "x64", build_type: "Debug" }
19
23
- { title: "Linux", os: "ubuntu-latest", cc: "gcc", arch: "x64", build_type: "Release" }
20
24
- { title: "Linux", os: "ubuntu-latest", cc: "gcc", arch: "x64", build_type: "Debug" }
21
- - { title: "Windows", os: "windows-latest", cc: "vs2019 ", arch: "x64", build_type: "Release" }
22
- - { title: "Windows", os: "windows-latest", cc: "vs2019 ", arch: "x64", build_type: "Debug" }
25
+ - { title: "Windows", os: "windows-latest", cc: "vs2022 ", arch: "x64", build_type: "Release" }
26
+ - { title: "Windows", os: "windows-latest", cc: "vs2022 ", arch: "x64", build_type: "Debug" }
23
27
- { title: "Mac", os: "macos-latest", cc: "clang", arch: "x64", build_type: "Release" }
24
28
- { title: "Mac", os: "macos-latest", cc: "clang", arch: "x64", build_type: "Debug" }
25
29
@@ -28,20 +32,24 @@ jobs:
28
32
# Get the code
29
33
- uses : actions/checkout@v2
30
34
35
+ # hardcode cmake version
36
+ - name : Setup cmake
37
+ uses : jwlawson/actions-setup-cmake@v1.12
38
+ with :
39
+ cmake-version : ' 3.22.3'
40
+
31
41
# Install Ruby for the windows build
32
42
- uses : ruby/setup-ruby@v1
33
43
id : ruby-inst
34
44
with :
35
- ruby-version : 2.7
45
+ ruby-version : 3.1
36
46
if : matrix.os == 'windows-latest'
37
47
38
48
# Install gems Windows
39
49
- name : Setup Ruby Windows
40
50
working-directory : ${{github.workspace}}/app
41
51
run : |
42
- gem install win32-process
43
- gem install rugged --version 0.27.1
44
- gem install ffi
52
+ gem install rugged
45
53
gem install test-unit
46
54
if : matrix.os == 'windows-latest'
47
55
@@ -64,102 +72,192 @@ jobs:
64
72
65
73
# Keep a cached copy of the Qt build so we can speed up subsequent builds
66
74
- name : Cache Qt
67
- id : cache-qt2
75
+ id : cache-qt6
68
76
uses : actions/cache@v1
69
77
with :
70
- path : ../Qt2
71
- key : ${{ runner.os }}-QtCache2
78
+ path : ../Qt6
79
+ key : ${{ runner.os }}-Qt6Cache
72
80
73
81
# Get Qt
74
- - name : Install Qt
82
+ - name : Install Qt 6
75
83
uses : jurplel/install-qt-action@v2
76
84
with :
77
- cached : ${{ steps.cache-qt2.outputs.cache-hit }}
85
+ modules : " qtwebenginewidgets"
86
+ version : ' 6.2.2'
87
+ cached : ${{ steps.cache-qt6.outputs.cache-hit }}
78
88
79
- # Latest Erlang on Ubuntu
80
- - uses : gleam-lang/setup-erlang@v1.1.2
89
+ # Install Elixir on Ubuntu
90
+ - name : Linux Elixir
91
+ uses : erlef/setup-beam@v1
81
92
with :
82
- otp-version : 23.2.1
93
+ otp-version : ' 24'
94
+ elixir-version : ' 1.12'
83
95
if : matrix.os == 'ubuntu-latest'
84
96
85
- - name : Mac Erlang
97
+ # Install Elixir on Windows
98
+ - name : Win Elixir
99
+ uses : erlef/setup-beam@v1
100
+ with :
101
+ otp-version : ' 24'
102
+ elixir-version : ' 1.12'
103
+ if : matrix.os == 'windows-latest'
104
+
105
+ # Install Elixir on MacOS
106
+ - name : Mac Elixir
86
107
continue-on-error : true
87
108
run : |
88
109
export HOMEBREW_NO_INSTALL_CLEANUP=1
89
110
brew update
90
- brew install erlang
111
+ brew install elixir
91
112
if : matrix.os == 'macos-latest'
92
113
114
+ # Prebuild on Ubuntu
93
115
- name : Prebuild Linux
94
116
working-directory : ${{github.workspace}}/app
95
117
env :
96
- CC : ${{ matrix.cc }}
97
- QT_INSTALL_LOCATION : ${{env.Qt5_DIR }}
118
+ CC : ${{ matrix.cc }}
119
+ QT_INSTALL_LOCATION : ${{env.Qt6_DIR }}
98
120
run : |
99
- sudo apt install -y libssl-dev ruby-dev supercollider-server sc3-plugins-server alsa-utils jackd2 libjack-jackd2-dev libjack-jackd2-0 libasound2-dev librtmidi-dev pulseaudio-module-jack
100
- ./linux-prebuild.sh --build-aubio
121
+ 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
122
+ ./linux-prebuild.sh
101
123
if : matrix.os == 'ubuntu-latest'
102
-
124
+
125
+ # Prebuild on Mac
103
126
- name : Prebuild Mac
104
127
working-directory : ${{github.workspace}}/app
105
128
env :
106
- CC : ${{ matrix.cc }}
107
- QT_INSTALL_LOCATION : ${{env.Qt5_DIR }}
129
+ CC : ${{ matrix.cc }}
130
+ QT_INSTALL_LOCATION : ${{env.Qt6_DIR }}
108
131
run : |
109
132
./mac-prebuild.sh
110
133
if : matrix.os == 'macos-latest'
111
-
112
- # Note that we 'hide' the msys folders on windows to stop conflicts when building
134
+
135
+ # Prebuild on Windows
136
+ # Note that we 'hide' the msys folders on windows to stop conflicts when building
113
137
# Flac
114
138
- name : Prebuild Windows
115
139
working-directory : ${{github.workspace}}/app
116
140
shell : cmd
117
141
env :
118
- CC : ${{ matrix.cc }}
119
- QT_INSTALL_LOCATION : ${{env.Qt5_DIR }}
142
+ CC : ${{ matrix.cc }}
143
+ QT_INSTALL_LOCATION : ${{env.Qt6_DIR }}
120
144
run : |
121
145
mv c:/msys64 c:/__msys64
122
146
win-prebuild.bat
123
147
if : matrix.os == 'windows-latest'
124
-
148
+
125
149
# - name: Setup tmate session
126
150
# uses: mxschmitt/action-tmate@v3
127
-
151
+
152
+ # Run Configuration Config on Ubuntu
128
153
- name : Config Linux
129
154
working-directory : ${{github.workspace}}/app
130
155
env :
131
- CC : ${{ matrix.cc }}
132
- QT_INSTALL_LOCATION : ${{env.Qt5_DIR }}
156
+ CC : ${{ matrix.cc }}
157
+ QT_INSTALL_LOCATION : ${{env.Qt6_DIR }}
133
158
run : |
134
159
./linux-config.sh
135
160
if : matrix.os == 'ubuntu-latest'
136
-
161
+
162
+ # Run Configuration Config on Mac
137
163
- name : Config Mac
138
164
working-directory : ${{github.workspace}}/app
139
165
env :
140
- CC : ${{ matrix.cc }}
141
- QT_INSTALL_LOCATION : ${{env.Qt5_DIR }}
166
+ CC : ${{ matrix.cc }}
167
+ QT_INSTALL_LOCATION : ${{env.Qt6_DIR }}
142
168
run : |
143
169
./mac-config.sh
144
170
if : matrix.os == 'macos-latest'
145
-
171
+
172
+ # Run Configuration Config on Windows
146
173
- name : Config Windows
147
174
working-directory : ${{github.workspace}}/app
148
175
shell : cmd
149
176
env :
150
- CC : ${{ matrix.cc }}
151
- QT_INSTALL_LOCATION : ${{env.Qt5_DIR }}
177
+ CC : ${{ matrix.cc }}
178
+ QT_INSTALL_LOCATION : ${{env.Qt6_DIR }}
152
179
run : |
153
180
win-config.bat
154
181
if : matrix.os == 'windows-latest'
155
-
182
+
183
+ # Finally: Build
156
184
- name : Do build
157
185
working-directory : ${{github.workspace}}/app/build
158
186
run : cmake --build . --config ${{ matrix.build_type }}
159
-
187
+
188
+ - name : BEAM Tests Windows
189
+ shell : cmd
190
+ working-directory : ${{github.workspace}}/app/server/beam/tau
191
+ run : mix test
192
+ env :
193
+ TAU_ENV : test
194
+ TAU_LOG_PATH : ${{github.workspace}}/tau_log.txt
195
+ if : matrix.os == 'windows-latest'
196
+
197
+ - name : BEAM Tests (Linux)
198
+ working-directory : ${{github.workspace}}/app/server/beam/tau
199
+ run : mix test
200
+ env :
201
+ TAU_ENV : test
202
+ TAU_LOG_PATH : ${{github.workspace}}/tau_log.txt
203
+ if : matrix.os == 'ubuntu-latest'
204
+
205
+ - name : BEAM Tests (macOS)
206
+ working-directory : ${{github.workspace}}/app/server/beam/tau
207
+ run : mix test
208
+ env :
209
+ TAU_ENV : test
210
+ TAU_LOG_PATH : ${{github.workspace}}/tau_log.txt
211
+ if : matrix.os == 'macos-latest'
212
+
160
213
- name : Ruby Tests (Mac/Linux)
161
214
working-directory : ${{github.workspace}}/app/server/ruby
162
- run : rake test
215
+ run : rake test
163
216
if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
164
217
218
+ - name : API Tests - Mac
219
+ working-directory : ${{github.workspace}}/app/build/api-tests
220
+ env :
221
+ SONIC_PI_ENV : test
222
+ run : ctest --verbose
223
+ if : matrix.os == 'macos-latest'
224
+
225
+ - name : API Tests - Linux
226
+ working-directory : ${{github.workspace}}/app/build/api-tests
227
+ env :
228
+ SONIC_PI_ENV : test
229
+ run : |
230
+ jackd -rd dummy &
231
+ ctest --verbose
232
+ if : matrix.os == 'ubuntu-latest'
233
+
234
+ - name : API Tests Windows - Install Scream Audio Device
235
+ shell : powershell
236
+ run : |
237
+ Start-Service audio*
238
+ Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip
239
+ Extract-7Zip -Path C:\Scream3.6.zip -DestinationPath C:\Scream
240
+ $cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate
241
+ $store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine")
242
+ $store.Open("ReadWrite")
243
+ $store.Add($cert)
244
+ $store.Close()
245
+ cd C:\Scream\Install\driver
246
+ C:\Scream\Install\helpers\devcon install Scream.inf *Scream
247
+ if : matrix.os == 'windows-latest'
165
248
249
+ - name : API Tests - Windows
250
+ shell : cmd
251
+ working-directory : ${{github.workspace}}/app/build/api-tests
252
+ env :
253
+ SONIC_PI_ENV : test
254
+ run : ctest --verbose
255
+ if : matrix.os == 'windows-latest'
256
+
257
+ - name : Archive Logs
258
+ uses : actions/upload-artifact@v2
259
+ if : ${{ always() }}
260
+ with :
261
+ name : Logs_${{matrix.title}}_${{matrix.cc}}_${{matrix.arch}}_${{matrix.build_type}}
262
+ path : |
263
+ ~/.sonic-pi/log/*.log
0 commit comments