Skip to content

Commit b9602d0

Browse files
authored
Update test-setup-matlab.yml
1 parent 5a59c40 commit b9602d0

File tree

1 file changed

+48
-4
lines changed

1 file changed

+48
-4
lines changed

.github/workflows/test-setup-matlab.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,55 @@ jobs:
4141
run: |
4242
cd scripts
4343
python -m setup_matlab -d
44+
45+
- name: Set environment variable with MATLAB path
46+
shell: bash
47+
run: |
48+
matlab_path=$(python -m setup_matlab -p)
49+
echo "MATLAB_PATH=$matlab_path" >> $GITHUB_ENV
50+
51+
- name: Run tests (Mac Apple Silicon)
52+
if: matrix.os_name == 'macOS_Apple_Silicon'
53+
run: |
54+
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}\
55+
${{ env.MATLAB_PATH }}/runtime/maca64:\
56+
${{ env.MATLAB_PATH }}/bin/maca64:\
57+
${{ env.MATLAB_PATH }}/sys/os/maca64:\
58+
${{ env.MATLAB_PATH }}/extern/bin/maca64"
59+
export PYTHONHOME=${{ env.pythonLocation }}
60+
mwpython -m unittest discover tests -v
4461
4562
- name: Run tests (Mac Intel)
46-
if: matrix.platform == 'Mac'
47-
run: mwpython -m unittest discover tests -v
63+
if: matrix.os_name == 'macOS_Intel'
64+
run: |
65+
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}\
66+
${{ env.MATLAB_PATH }}/runtime/maci64:\
67+
${{ env.MATLAB_PATH }}/bin/maci64:\
68+
${{ env.MATLAB_PATH }}/sys/os/maci64:\
69+
${{ env.MATLAB_PATH }}/extern/bin/maci64"
70+
export PYTHONHOME=${{ env.pythonLocation }}
71+
mwpython -m unittest discover tests -v
72+
73+
- name: Run tests (Windows)
74+
if: matrix.os_name == 'Windows'
75+
shell: bash
76+
run: |
77+
export PATH="${{ env.MATLAB_PATH }}/runtime/win64:\
78+
${{ env.MATLAB_PATH }}/bin/win64:\
79+
${{ env.MATLAB_PATH }}/sys/os/win64:\
80+
${{ env.MATLAB_PATH }}/extern/bin/win64\
81+
${{ env.MATLAB_PATH }}/runtime/win32:\
82+
${{ env.MATLAB_PATH }}/bin/win32:\
83+
${{ env.MATLAB_PATH }}/sys/os/win32:\
84+
${{ env.MATLAB_PATH }}/extern/bin/win32:${PATH}"
85+
python -m unittest discover tests -v
4886
4987
- name: Run tests (Linux)
50-
if: matrix.os_name != 'Mac'
51-
run: python -m unittest discover tests -v
88+
if: runner.os == 'Linux'
89+
run: |
90+
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}\
91+
${{ env.MATLAB_PATH }}/runtime/glnxa64:\
92+
${{ env.MATLAB_PATH }}/bin/glnxa64:\
93+
${{ env.MATLAB_PATH }}/sys/os/glnxa64:\
94+
${{ env.MATLAB_PATH }}/extern/bin/glnxa64"
95+
python -m unittest discover tests -v

0 commit comments

Comments
 (0)