Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Action job to run MATLAB tests #917

Merged
merged 4 commits into from
Sep 16, 2021
Merged

Add GitHub Action job to run MATLAB tests #917

merged 4 commits into from
Sep 16, 2021

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Sep 15, 2021

Fix #872 .
Fix #393 .

This is done by:

  • Update MOxUnit to the latest version to support recent versions of MATLAB (see d6c4d78)
  • Fix MOxUnit test to follow the new format to support recent versions of MATLAB (see fa2cbc6)
  • Add GitHub Action to run MATLAB tests ( b5af25d )

@traversaro
Copy link
Member Author

Test fail with error:

60/60 Test #60: matlab_idyntree_tests .................................***Failed    1.87 sec
---------------------------------------------------------------------------
Error: Activation cannot proceed. You may either:
1. Set an X11 display, and restart the activation process
2. Use the silent activation feature
3. Activate using the license center
Errors while running CTest
---------------------------------------------------------------------------


98% tests passed, 1 tests failed out of 60

Total Test time (real) =  11.04 sec

The following tests FAILED:
	 60 - matlab_idyntree_tests (Failed)

Probably related to ami-iit/cmake-nightly-testing-runner#3 .

@traversaro
Copy link
Member Author

The problem should be fixed by 2de9e46 .

@traversaro
Copy link
Member Author

A minor issue is:

2021-09-15T10:35:27.6317673Z CMake Warning at cmake/FindMatlab.cmake:768 (message):
2021-09-15T10:35:27.6319050Z -- [MATLAB] Current version is unknown located /usr/local/MATLAB/R2020a
2021-09-15T10:35:27.6320511Z   [MATLAB] Unable to determine the version of Matlab.  Matlab call returned
2021-09-15T10:35:27.6321411Z   with error 1.
2021-09-15T10:35:27.6322467Z -- [MATLAB] Determining mex files extensions from '/usr/local/MATLAB/R2020a/bin' with program '/usr/local/MATLAB/R2020a/bin/mexext'
2021-09-15T10:35:27.6323440Z Call Stack (most recent call first):
2021-09-15T10:35:27.6324167Z   cmake/FindMatlab.cmake:1304 (matlab_get_version_from_matlab_run)
2021-09-15T10:35:27.6325270Z   cmake/FindMatlab.cmake:1608 (_Matlab_get_version_from_root)
2021-09-15T10:35:27.6326006Z   bindings/matlab/CMakeLists.txt:103 (find_package)

@traversaro
Copy link
Member Author

For some reason, no MATLAB tests are actually run.

@traversaro
Copy link
Member Author

For some reason, no MATLAB tests are actually run.

Apparently the reason is that we never updated MOxUnit for compatibility with MATLAB >= 2016, see MOxUnit/MOxUnit#42 .

@traversaro
Copy link
Member Author

For some reason, no MATLAB tests are actually run.

Apparently the reason is that we never updated MOxUnit for compatibility with MATLAB >= 2016, see MOxUnit/MOxUnit#42 .

Updating MOxUnit and updating the boilerplate of the test fixed the issue indeed.

@traversaro
Copy link
Member Author

Now the tests fail with:

61: Invalid MEX-file '/home/runner/work/idyntree/idyntree/build/lib/iDynTreeMEX.mexa64': /usr/local/MATLAB/R2020b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version
61: `GLIBCXX_3.4.26' not found (required by /home/runner/work/idyntree/idyntree/build/lib/libidyntree-inverse-kinematics.so)

The good old robotology/robotology-superbuild#64 .

@traversaro
Copy link
Member Author

Now the tests fail with:

61: Invalid MEX-file '/home/runner/work/idyntree/idyntree/build/lib/iDynTreeMEX.mexa64': /usr/local/MATLAB/R2020b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version
61: `GLIBCXX_3.4.26' not found (required by /home/runner/work/idyntree/idyntree/build/lib/libidyntree-inverse-kinematics.so)

The good old robotology/robotology-superbuild#64 .

This was solved by setting the env variable LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6, as done by @singhbal-baljinder in robotology/urdf2casadi-matlab#20, even if we are using conda-provided dependencies instead of apt-provided ones.

@traversaro
Copy link
Member Author

For some reason, no MATLAB tests are actually run.

Apparently the reason is that we never updated MOxUnit for compatibility with MATLAB >= 2016, see MOxUnit/MOxUnit#42 .

Updating MOxUnit and updating the boilerplate of the test fixed the issue indeed.

Apparently this was already documented in #393, but I never worked on it.

@traversaro
Copy link
Member Author

A minor issue is:

2021-09-15T10:35:27.6317673Z CMake Warning at cmake/FindMatlab.cmake:768 (message):
2021-09-15T10:35:27.6319050Z -- [MATLAB] Current version is unknown located /usr/local/MATLAB/R2020a
2021-09-15T10:35:27.6320511Z   [MATLAB] Unable to determine the version of Matlab.  Matlab call returned
2021-09-15T10:35:27.6321411Z   with error 1.
2021-09-15T10:35:27.6322467Z -- [MATLAB] Determining mex files extensions from '/usr/local/MATLAB/R2020a/bin' with program '/usr/local/MATLAB/R2020a/bin/mexext'
2021-09-15T10:35:27.6323440Z Call Stack (most recent call first):
2021-09-15T10:35:27.6324167Z   cmake/FindMatlab.cmake:1304 (matlab_get_version_from_matlab_run)
2021-09-15T10:35:27.6325270Z   cmake/FindMatlab.cmake:1608 (_Matlab_get_version_from_root)
2021-09-15T10:35:27.6326006Z   bindings/matlab/CMakeLists.txt:103 (find_package)

This problem will be tracked in https://gitlab.kitware.com/cmake/cmake/-/issues/22646 .

echo 'LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6' >> $GITHUB_ENV

- name: Dependencies
shell: bash -l {0}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid specifying that each shell is login you can set a default shell.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 695d813 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CI for MATLAB bindings tests Matlab tests do not run in Matlab 2017a
2 participants