-
Notifications
You must be signed in to change notification settings - Fork 0
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 matlab to GitHub Actions CI #1
Conversation
The first failing output is (click to expand):
|
Clear errors:
|
Adding
So for now we can remove |
Now the clean step fails with:
|
@wsfulton, do we need to go through this? Using C99 or C11 would presumably get rid of these errors. |
I'm afraid so, SWIG is extremely conservative in the code that it generates, see http://swig.org/Doc4.0/Introduction.html#Introduction_nn13. You see those warnings because we test for ISO C90 compliance. Good news is they are usually very easy to fix. |
May I ask how |
Yes, MATLAB requires a license and is not available in apt, that is the reason why the custom action is required. In particolar, that action is provided by MathWorks itself, see https://github.com/matlab-actions/overview and https://github.com/matlab-actions/setup-matlab/ . To replicate what the action does locally, one needs to install MATLAB by having a license and downloading it via https://mathworks.com/downloads/ . |
Regarding how the action itself works, it basically executes two bash scripts (see https://github.com/matlab-actions/setup-matlab/blob/83047ffdd748c0c61de6db84c850b1389be4e1bb/src/install.ts and https://github.com/matlab-actions/setup-matlab/blob/bf7246a478e817e6aceef7a2519d5ef7db6faaa6/src/properties.json#L2):
We could try to replicate this logic without the action, but the risk is just that we make it more likely to break something if the action change. |
I strongly vote against that. Presumably the MATLAB action contains info on licensing etc, which is bound to only work on GHA. If people want to use MATLAB, they will need to install it according to MathWorks instructions. This is not our task. |
I've created jaeandersson#105. I suggest that we leave |
created jaeandersson#106 for the |
Thanks for the info @traversaro. It's quite a good setup as those SWIG developers who do not have a MATLAB license, can always ssh into a machine running the Github Action, using debugging-with-tmate for example, to debug if absolutely necessary. This should address any maintenance issues by SWIG developers who do not have a MATLAB license, but of course, the MATLAB module will be largely maintained by those that do have a local working MATLAB installation. |
.github/workflows/ci.yml
Outdated
- name: Do not use MATLAB's stdc++ to avoid incompatibilities with other libraries | ||
if: contains(matrix.SWIGLANG, 'matlab') | ||
run: | ||
echo 'LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6' >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required for the SWIG tests? If so, I wonder if we shouldn't compile the test-suite only with MATLAB supported versions of the compiler which should remove this requirement (although that might be hard to do)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply. In theory MATLAB after R2020b support 20.04, but the test do not pass in Ubuntu 20.04 if I remove this workaround (perhaps some GitHub Actions specific modifications?). However, by setting the os to ubuntu-18.04 I can get all the test to pass without any workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I guess this is because gcc
in 18.04 is older than in 20.04, and is therefore supported by MATLAB. I'm happy with this change (it's not our business to fix MATLAB...)
great. we're failing due to jaeandersson#106. I have no time to look into that at the moment, but suggest to merge (i.e. presumably create this PR on top of https://github.com/KrisThielemans/swig/tree/matlab-update) |
No description provided.