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

Fixes to build MATLAB toolboxes on CI #3521

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

pepone
Copy link
Member

@pepone pepone commented Feb 7, 2025

This PR include fixes to build MATLAB toolboxes for Windows and Linux on CI.

@@ -25,7 +25,9 @@ jobs:
use_matlab: true

- name: Build MATLAB ToolBox
run: make -C matlab toolbox
run: |
make -C cpp srcs
Copy link
Member Author

Choose a reason for hiding this comment

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

We were missing the C++ dependencies here

@@ -130,8 +130,6 @@ jobs:
with:
working_directory: ${{ matrix.working_directory || '.' }}
flags: ${{ matrix.test_flags }}
# Don't test matlab on Windows (see setup-dependencies/action.yml)
if: matrix.config != 'matlab' || runner.os != 'Windows'
Copy link
Member Author

Choose a reason for hiding this comment

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

MATLAB For Windows should work with the fixes to Windows builds.

@@ -115,9 +115,15 @@ $(icetoolbox_file):: $(icethunk_target) $(slice2matlab_path) $(lang_srcdir)/lib/
cp -rf $(cpp_bindir)/slice2matlab $(lang_srcdir)/toolbox/build/
# Doc files
cp -rf $(lang_srcdir)/toolbox/doc $(lang_srcdir)/toolbox/build
ifneq (,$(MATLAB_COMMAND))
Copy link
Member Author

Choose a reason for hiding this comment

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

MATLAB_COMMAND is set by CI to the executable that we need to run. We were already using this in the tests, but there were a few additional places where we still used matlab directly.

@@ -6,36 +6,30 @@
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<RootDir>$([System.IO.Path]::GetFullPath( $(MSBuildThisFileDirectory)..\msbuild ))</RootDir>
<ToolboxDir>$(MSBuildThisFileDirectory)..\toolbox\build</ToolboxDir>
Copy link
Member Author

Choose a reason for hiding this comment

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

This MSBuild project was trying to guess the version and the matlab home using the matlab executable from path. It was far too complicated.

I simplified to use a default and allow override with env variables. It was the usage of matlab here what was causing the CI issues.

<MatlabVersion Condition="'$(MatlabVersion)' == ''">R2024a</MatlabVersion>
<MatlabHome Condition="'$(MatlabHome)' == ''">C:\Program Files\MATLAB\$(MatlabVersion)</MatlabHome>
<!-- Override with the env settings -->
<MatlabVersion Condition="'$(MATLAB_VERSION)' != ''">$(MATLAB_VERSION)</MatlabVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Should this go up on line 10?

Presumably if you set MATLAB_VERSION but not MATLAB_HOME, you want MatlabHome to be set correctly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Fixed

@pepone pepone merged commit c0adf06 into zeroc-ice:main Feb 10, 2025
23 checks passed
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.

3 participants