26
26
- name : Build and test
27
27
uses : matlab-actions/run-command@v2
28
28
with :
29
- command : " install_sedumi -rebuild; cd examples; test_sedumi(1 , 1)"
29
+ command : " install_sedumi -rebuild; cd examples; test_sedumi(0 , 1)"
30
30
- name : Upload MATLAB MEX files
31
31
uses : actions/upload-artifact@v4
32
32
with :
35
35
build-oct :
36
36
runs-on : ${{ matrix.os }}
37
37
strategy :
38
+ fail-fast : false
38
39
matrix :
39
40
os : [ubuntu-20.04,windows-2019,macos-12,macos-14]
40
41
steps :
@@ -47,21 +48,24 @@ jobs:
47
48
run : |
48
49
if [ "${{ matrix.os }}" = ubuntu-20.04 ]; then
49
50
sudo apt update
50
- sudo apt install --no-install-recommends octave liboctave-dev libopenblas-dev
51
+ sudo snap install octave
52
+ sudo apt install --no-install-recommends libopenblas-dev
53
+ echo "OCTAVE=snap run octave" >>$GITHUB_ENV
51
54
elif [ "${{ matrix.os }}" = windows-2019 ]; then
52
55
choco install octave.portable
53
56
else
54
57
brew install octave
58
+ echo "OCTAVE=octave" >>$GITHUB_ENV
55
59
fi
56
60
- name : Build and test (Unix)
57
61
if : matrix.os != 'windows-2019'
58
- run : octave --eval "install_sedumi -rebuild; test_sedumi(1 , 1)"
62
+ run : $OCTAVE --eval "install_sedumi -rebuild; test_sedumi(0 , 1)"
59
63
- name : Build and test (Windows)
60
64
if : matrix.os == 'windows-2019'
61
65
shell : cmd
62
66
run : |
63
67
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
64
- octave-cli.exe --no-gui --eval "install_sedumi -rebuild; test_sedumi(1 , 1)"
68
+ octave-cli.exe --no-gui --eval "install_sedumi -rebuild; test_sedumi(0 , 1)"
65
69
if %errorlevel% neq 0 exit /b %errorlevel%
66
70
- name : Upload Octave MEX files
67
71
uses : actions/upload-artifact@v4
@@ -123,7 +127,7 @@ jobs:
123
127
- name : Run test
124
128
uses : matlab-actions/run-command@v2
125
129
with :
126
- command : " install_sedumi; cd examples; test_sedumi(1 , 1)"
130
+ command : " install_sedumi; cd examples; test_sedumi(0 , 1)"
127
131
octave-tests :
128
132
needs : package
129
133
runs-on : ${{ matrix.os }}
@@ -144,34 +148,42 @@ jobs:
144
148
if [ "${{ matrix.os }}" = ubuntu-latest ]; then
145
149
sudo apt update
146
150
sudo apt install --no-install-recommends octave snapd flatpak
151
+ echo 'OCTAVE=octave' >>$GITHUB_ENV
147
152
elif [ "${{ matrix.os }}" = windows-latest ]; then
148
153
choco install octave.portable
154
+ echo 'OCTAVE=/c/programdata/choclatey/bin/octave-cli.exe' >>$GITHUB_ENV
149
155
else
150
156
brew install octave
157
+ echo 'OCTAVE=octave' >>$GITHUB_ENV
151
158
fi
152
- - name : Run test
153
- if : matrix.os != 'windows-latest'
154
- run : octave --eval "install_sedumi; cd examples; test_sedumi(1 , 1)"
155
- - name : Run test
159
+ - name : Run test (Unix)
160
+ shell : bash
161
+ run : octave --eval "install_sedumi; cd examples; test_sedumi(0 , 1)"
162
+ - name : Run test (Windows)
156
163
if : matrix.os == 'windows-latest'
157
164
shell : cmd
158
165
run : |
159
166
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
160
- octave-cli.exe --no-gui --eval "install_sedumi; cd examples; test_sedumi(1, 1)"
167
+ octave-cli.exe --no-gui --eval "install_sedumi; cd examples; test_sedumi(0, 1)"
168
+ - name : Remove apt Octave
169
+ if : matrix.os == 'ubuntu-latest'
170
+ run : |
171
+ sudo apt remove octave -y
172
+ sudo apt autoremove
161
173
- name : Flatpak
162
174
if : matrix.os == 'ubuntu-latest'
163
175
run : |
164
176
flatpak remote-add --user --if-not-exists \
165
177
flathub https://flathub.org/repo/flathub.flatpakrepo
166
178
flatpak install --user -y flathub org.octave.Octave
167
- flatpak run org.octave.Octave --eval "install_sedumi; cd examples; test_sedumi(1 , 1)"
179
+ flatpak run org.octave.Octave --eval "install_sedumi; cd examples; test_sedumi(0 , 1)"
168
180
flatpak uninstall --user -y org.octave.Octave
169
- # - name: Snapd
170
- # if: matrix.os == 'ubuntu-latest'
171
- # run: |
172
- # sudo snap install octave
173
- # snap run octave --eval "install_sedumi; cd examples; test_sedumi(1 , 1)"
174
- # sudo snap remove octave
181
+ - name : Snapd
182
+ if : matrix.os == 'ubuntu-latest'
183
+ run : |
184
+ sudo snap install octave
185
+ snap run octave --eval "install_sedumi; cd examples; test_sedumi(0 , 1)"
186
+ sudo snap remove octave
175
187
publish :
176
188
needs : [matlab-tests,octave-tests]
177
189
if : startsWith(github.ref, 'refs/tags/')
0 commit comments