Skip to content

Commit c7e7057

Browse files
committed
Tau - add env var flag to disable MIDI subsystems completely
Use this to bypass loading MIDI subsystems on linux CI tests (which currently fail due to MIDI/hardward issues). Given that the tests don't currently cover any MIDI behaviour, it's ok to simply not load the MIDI subsystems in this case.
1 parent df33917 commit c7e7057

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,17 @@ jobs:
183183
run: mix test
184184
if: matrix.os == 'windows-latest'
185185

186-
- name: BEAM Tests (Mac/Linux)
186+
- name: BEAM Tests (Linux)
187187
working-directory: ${{github.workspace}}/app/server/beam/tau
188188
run: mix test
189-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
189+
if: matrix.os == 'ubuntu-latest'
190+
env:
191+
TAU_DISABLE_MIDI: true
192+
193+
- name: BEAM Tests (macOS)
194+
working-directory: ${{github.workspace}}/app/server/beam/tau
195+
run: mix test
196+
if: matrix.os == 'macos-latest'
190197

191198
- name: Ruby Tests (Mac/Linux)
192199
working-directory: ${{github.workspace}}/app/server/ruby

app/server/beam/tau/src/tau_server/tau_server_sup.erl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ init(_Args) ->
6868
#{id => tau_server_cue,
6969
start => {tau_server_cue, start_link, []}
7070
},
71-
#{id => tau_server_midi,
72-
start => {tau_server_midi, start_link, [CueServer]}
73-
},
7471
#{id => tau_server_link,
7572
start => {tau_server_link, start_link, [CueServer]}
7673
},
@@ -80,4 +77,18 @@ init(_Args) ->
8077

8178
],
8279

80+
ENV = os:getenv("TAU_DISABLE_MIDI", "false"),
81+
MIDIChildSpecs = if
82+
ENV == "true" ->
83+
ChildSpecs;
84+
85+
true ->
86+
[ChildSpecs | #{id => tau_server_midi,
87+
start => {tau_server_midi,
88+
start_link,
89+
[CueServer]}}]
90+
91+
92+
end,
93+
8394
{ok, {SupFlags, ChildSpecs}}.

0 commit comments

Comments
 (0)