Skip to content

Commit 3bedcf9

Browse files
committed
Update build matrix and improve Octave test robustness
- Updated `build.yml` to include `ubuntu-24.04` for building binaries, ensuring the use of Octave 8.4. - Modified Octave unit tests to exit with status code 1 on failure, enhancing test robustness.
1 parent 216c14e commit 3bedcf9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
runs-on: ${{ matrix.os }}
2323
strategy:
2424
matrix:
25+
# Note: We use the latest version of Ubuntu 24.04 in order to get a more recent version of Octave (we get 8.4 currently)
26+
# We better should use a version >6.4, otherwise the Octave-mex-support seems to be missing some functions.
2527
os: [ubuntu-24.04, windows-latest] # Windows and Linux builds
2628
outputs:
2729
linuxx64_matlab_artifact: ${{ steps.prepare_linux_artifact.outputs.linuxx64_matlab_build }}
@@ -116,16 +118,16 @@ jobs:
116118
run: |
117119
cd tests/octave
118120
ls -l ../../OctaveMex
119-
octave --eval "addpath('../../OctaveMex'),test('test_basic_operation.m')"
120-
octave --eval "addpath('../../OctaveMex'),test('test_write.m')"
121+
octave --eval "addpath('../../OctaveMex'),result=test('test_basic_operation.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
122+
octave --eval "addpath('../../OctaveMex'),result=test('test_write.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
121123
- name: Octave Unit-Tests (Windows)
122124
if: runner.os == 'Windows'
123125
shell: cmd
124126
run: |
125127
cd tests/octave
126128
set GITHUB_WORKSPACE_FORWARD_SLASHES=%GITHUB_WORKSPACE:\=/%
127-
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),test('test_basic_operation.m')"
128-
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),test('test_write.m')"
129+
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),result=test('test_basic_operation.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
130+
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),result=test('test_write.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
129131
- name: Prepare MATLAB-mex artifact (Windows)
130132
id: prepare_windows_matlab_artifact
131133
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)