Skip to content

Commit 1945763

Browse files
authored
Merge pull request #3118 from sonic-pi-net/dev
v4 Release
2 parents ddecffb + bc5f326 commit 1945763

File tree

16,712 files changed

+835261
-243124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

16,712 files changed

+835261
-243124
lines changed

.github/workflows/build.yml

+140-42
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
name: Build
22

33
on:
4+
# Do it on every push or PR on these branches
45
push:
5-
branches: [ dev, main, workflow_dispatch, features/new-layout-and-api ]
6+
branches: [ dev, stable ]
67
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:
811

912
jobs:
13+
# Build Sonic Pi
1014
build:
1115
name: "${{matrix.title}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})"
1216
runs-on: ${{matrix.os}}
@@ -18,8 +22,8 @@ jobs:
1822
- { title: "Linux", os: "ubuntu-latest", cc: "clang", arch: "x64", build_type: "Debug" }
1923
- { title: "Linux", os: "ubuntu-latest", cc: "gcc", arch: "x64", build_type: "Release" }
2024
- { 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" }
2327
- { title: "Mac", os: "macos-latest", cc: "clang", arch: "x64", build_type: "Release" }
2428
- { title: "Mac", os: "macos-latest", cc: "clang", arch: "x64", build_type: "Debug" }
2529

@@ -28,20 +32,24 @@ jobs:
2832
# Get the code
2933
- uses: actions/checkout@v2
3034

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+
3141
# Install Ruby for the windows build
3242
- uses: ruby/setup-ruby@v1
3343
id: ruby-inst
3444
with:
35-
ruby-version: 2.7
45+
ruby-version: 3.1
3646
if: matrix.os == 'windows-latest'
3747

3848
# Install gems Windows
3949
- name: Setup Ruby Windows
4050
working-directory: ${{github.workspace}}/app
4151
run: |
42-
gem install win32-process
43-
gem install rugged --version 0.27.1
44-
gem install ffi
52+
gem install rugged
4553
gem install test-unit
4654
if: matrix.os == 'windows-latest'
4755

@@ -64,102 +72,192 @@ jobs:
6472

6573
# Keep a cached copy of the Qt build so we can speed up subsequent builds
6674
- name: Cache Qt
67-
id: cache-qt2
75+
id: cache-qt6
6876
uses: actions/cache@v1
6977
with:
70-
path: ../Qt2
71-
key: ${{ runner.os }}-QtCache2
78+
path: ../Qt6
79+
key: ${{ runner.os }}-Qt6Cache
7280

7381
# Get Qt
74-
- name: Install Qt
82+
- name: Install Qt 6
7583
uses: jurplel/install-qt-action@v2
7684
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 }}
7888

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
8192
with:
82-
otp-version: 23.2.1
93+
otp-version: '24'
94+
elixir-version: '1.12'
8395
if: matrix.os == 'ubuntu-latest'
8496

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
86107
continue-on-error: true
87108
run: |
88109
export HOMEBREW_NO_INSTALL_CLEANUP=1
89110
brew update
90-
brew install erlang
111+
brew install elixir
91112
if: matrix.os == 'macos-latest'
92113

114+
# Prebuild on Ubuntu
93115
- name: Prebuild Linux
94116
working-directory: ${{github.workspace}}/app
95117
env:
96-
CC: ${{ matrix.cc }}
97-
QT_INSTALL_LOCATION: ${{env.Qt5_DIR}}
118+
CC: ${{ matrix.cc }}
119+
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
98120
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
101123
if: matrix.os == 'ubuntu-latest'
102-
124+
125+
# Prebuild on Mac
103126
- name: Prebuild Mac
104127
working-directory: ${{github.workspace}}/app
105128
env:
106-
CC: ${{ matrix.cc }}
107-
QT_INSTALL_LOCATION: ${{env.Qt5_DIR}}
129+
CC: ${{ matrix.cc }}
130+
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
108131
run: |
109132
./mac-prebuild.sh
110133
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
113137
# Flac
114138
- name: Prebuild Windows
115139
working-directory: ${{github.workspace}}/app
116140
shell: cmd
117141
env:
118-
CC: ${{ matrix.cc }}
119-
QT_INSTALL_LOCATION: ${{env.Qt5_DIR}}
142+
CC: ${{ matrix.cc }}
143+
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
120144
run: |
121145
mv c:/msys64 c:/__msys64
122146
win-prebuild.bat
123147
if: matrix.os == 'windows-latest'
124-
148+
125149
#- name: Setup tmate session
126150
# uses: mxschmitt/action-tmate@v3
127-
151+
152+
# Run Configuration Config on Ubuntu
128153
- name: Config Linux
129154
working-directory: ${{github.workspace}}/app
130155
env:
131-
CC: ${{ matrix.cc }}
132-
QT_INSTALL_LOCATION: ${{env.Qt5_DIR}}
156+
CC: ${{ matrix.cc }}
157+
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
133158
run: |
134159
./linux-config.sh
135160
if: matrix.os == 'ubuntu-latest'
136-
161+
162+
# Run Configuration Config on Mac
137163
- name: Config Mac
138164
working-directory: ${{github.workspace}}/app
139165
env:
140-
CC: ${{ matrix.cc }}
141-
QT_INSTALL_LOCATION: ${{env.Qt5_DIR}}
166+
CC: ${{ matrix.cc }}
167+
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
142168
run: |
143169
./mac-config.sh
144170
if: matrix.os == 'macos-latest'
145-
171+
172+
# Run Configuration Config on Windows
146173
- name: Config Windows
147174
working-directory: ${{github.workspace}}/app
148175
shell: cmd
149176
env:
150-
CC: ${{ matrix.cc }}
151-
QT_INSTALL_LOCATION: ${{env.Qt5_DIR}}
177+
CC: ${{ matrix.cc }}
178+
QT_INSTALL_LOCATION: ${{env.Qt6_DIR}}
152179
run: |
153180
win-config.bat
154181
if: matrix.os == 'windows-latest'
155-
182+
183+
# Finally: Build
156184
- name: Do build
157185
working-directory: ${{github.workspace}}/app/build
158186
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+
160213
- name: Ruby Tests (Mac/Linux)
161214
working-directory: ${{github.workspace}}/app/server/ruby
162-
run: rake test
215+
run: rake test
163216
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
164217

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'
165248

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

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ build32
3232
# Core dumps
3333
*.dump
3434

35+
# Ignore vcpkg
36+
app/vcpkg
37+
3538
# QT GUI
3639
# --------
3740

@@ -58,6 +61,7 @@ app/gui/qt/moc_mainwindow.cpp
5861
app/gui/qt/moc_sonicpiudpserver.cpp
5962
app/gui/qt/qrc_SonicPi.cpp
6063
app/gui/qt/utils/ruby_help.h
64+
app/gui/qt/utils/lang_list.h
6165
app/gui/qt/help/*.html
6266
app/gui/qt/help_files.qrc
6367
app/gui/qt/lang/*.qm

0 commit comments

Comments
 (0)