This is an automated email from the ASF dual-hosted git repository.
sgilmore pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new c8cf61c569 GH-41385: [CI][MATLAB][Packaging] Add support for MATLAB
`R2024a` in CI and crossbow packaging workflows (#41504)
c8cf61c569 is described below
commit c8cf61c569886ff18c88e29c447a98ab6dedbd92
Author: Sarah Gilmore <[email protected]>
AuthorDate: Fri May 3 09:42:28 2024 -0400
GH-41385: [CI][MATLAB][Packaging] Add support for MATLAB `R2024a` in CI and
crossbow packaging workflows (#41504)
### Rationale for this change
MATLAB `R2024a` is the latest available version of MATLAB as of April 2024.
We are currently building against MATLAB `R2023a` in CI and for the
crossbow packaging workflow.
We should update the version of MATLAB we support to the latest available
version.
We previously created an issue to use `R2023b`
(https://github.com/apache/arrow/issues/37809). However, `R2024a` has become
publicly available since then.
### What changes are included in this PR?
1. Changed the `release` argument supplied to `matlab-actions/setup-matlab@
v2` to `R2024a` from `R2023a` in `.github/workflows/matlab.yml` and
`dev/tasks/matlab/github.yml`.
2. Updated the script used to package the MLTBX file
(`arrow/matlab/tools/packageMatlabInterface.m`) to specify the version of
MATLAB currently running as the only compatible version of MATLAB for the
interface.
3. Updated display tests to react to a change in how class names are
formatted when an objected is displayed in the Command Window.
### Are these changes tested?
Yes. Existing tests used.
### Are there any user-facing changes?
There are no changes to the MATLAB Arrow Interface. However, the MATLAB
release used to build, test, and package the interface has been upgraded.
### Future Work
1. We may want to consider building and packaging against multiple versions
of MATLAB in parallel, rather than just the latest. This would require some
more thought on how many releases back to support over time, however.
2. #41435
* GitHub Issue: #41385
Lead-authored-by: Sarah Gilmore <[email protected]>
Co-authored-by: Sarah Gilmore <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sarah Gilmore <[email protected]>
---
.github/workflows/matlab.yml | 6 +++---
dev/tasks/matlab/github.yml | 8 ++++----
.../+arrow/+internal/+test/+display/makeLinkString.m | 4 ++--
.../+arrow/+tabular/+internal/+display/getSchemaString.m | 2 +-
matlab/tools/packageMatlabInterface.m | 15 ++++++++++++---
5 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/matlab.yml b/.github/workflows/matlab.yml
index aa3692e587..8a0de8a365 100644
--- a/.github/workflows/matlab.yml
+++ b/.github/workflows/matlab.yml
@@ -70,7 +70,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
- release: R2023a
+ release: R2024a
- name: Install ccache
run: sudo apt-get install ccache
- name: Setup ccache
@@ -110,7 +110,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
- release: R2023a
+ release: R2024a
- name: Install ccache
run: brew install ccache
- name: Setup ccache
@@ -148,7 +148,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
- release: R2023a
+ release: R2024a
- name: Download Timezone Database
shell: bash
run: ci/scripts/download_tz_database.sh
diff --git a/dev/tasks/matlab/github.yml b/dev/tasks/matlab/github.yml
index 13fa36b501..7840fd1767 100644
--- a/dev/tasks/matlab/github.yml
+++ b/dev/tasks/matlab/github.yml
@@ -31,7 +31,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
- release: R2023a
+ release: R2024a
- name: Build MATLAB Interface
env:
{{ macros.github_set_sccache_envvars()|indent(8) }}
@@ -68,7 +68,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
- release: R2023a
+ release: R2024a
- name: Build MATLAB Interface
env:
{{ macros.github_set_sccache_envvars()|indent(8) }}
@@ -103,7 +103,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
- release: R2023a
+ release: R2024a
- name: Install sccache
shell: bash
run: arrow/ci/scripts/install_sccache.sh pc-windows-msvc $(pwd)/sccache
@@ -149,7 +149,7 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
- release: R2023a
+ release: R2024a
- name: Run commands
env:
MATLABPATH: arrow/matlab/tools
diff --git a/matlab/src/matlab/+arrow/+internal/+test/+display/makeLinkString.m
b/matlab/src/matlab/+arrow/+internal/+test/+display/makeLinkString.m
index 79065ba1c8..e99dd7d784 100644
--- a/matlab/src/matlab/+arrow/+internal/+test/+display/makeLinkString.m
+++ b/matlab/src/matlab/+arrow/+internal/+test/+display/makeLinkString.m
@@ -26,11 +26,11 @@ function link = makeLinkString(opts)
end
if opts.BoldFont
- link = compose("<a href=""matlab:helpPopup %s""" + ...
+ link = compose("<a href=""matlab:helpPopup('%s')""" + ...
" style=""font-weight:bold"">%s</a>", ...
opts.FullClassName, opts.ClassName);
else
- link = compose("<a href=""matlab:helpPopup %s"">%s</a>", ...
+ link = compose("<a href=""matlab:helpPopup('%s')"">%s</a>", ...
opts.FullClassName, opts.ClassName);
end
end
\ No newline at end of file
diff --git
a/matlab/src/matlab/+arrow/+tabular/+internal/+display/getSchemaString.m
b/matlab/src/matlab/+arrow/+tabular/+internal/+display/getSchemaString.m
index 7da945ca99..724b4873c9 100644
--- a/matlab/src/matlab/+arrow/+tabular/+internal/+display/getSchemaString.m
+++ b/matlab/src/matlab/+arrow/+tabular/+internal/+display/getSchemaString.m
@@ -43,7 +43,7 @@ function text = getSchemaString(schema)
classNameAndIDs = strings([1 numel(typeIDs) * 2]);
classNameAndIDs(1:2:end-1) = classNames;
classNameAndIDs(2:2:end) = typeIDs;
- typeIDs = compose("<a href=""matlab:helpPopup %s""
style=""font-weight:bold"">%s</a>", classNameAndIDs);
+ typeIDs = compose("<a href=""matlab:helpPopup('%s')""
style=""font-weight:bold"">%s</a>", classNameAndIDs);
end
text = names + ": " + typeIDs;
diff --git a/matlab/tools/packageMatlabInterface.m
b/matlab/tools/packageMatlabInterface.m
index 55b4d4241a..3d97000261 100644
--- a/matlab/tools/packageMatlabInterface.m
+++ b/matlab/tools/packageMatlabInterface.m
@@ -55,9 +55,18 @@ opts.SupportedPlatforms.Maci64 = true;
opts.SupportedPlatforms.Glnxa64 = true;
opts.SupportedPlatforms.MatlabOnline = true;
-% Interface is only qualified against R2023a at the moment
-opts.MinimumMatlabRelease = "R2023a";
-opts.MaximumMatlabRelease = "R2023a";
+% MEX files use run-time libraries shipped with MATLAB (e.g. libmx, libmex,
+% etc.). MEX files linked against earlier versions of MALTAB run-time libraries
+% will most likely work on newer versions of MATLAB. However, this may not
+% always be the case.
+%
+% For now, set the earliest and latest compatible releases of MATLAB to
+% the release of MATLAB used to build and package the MATLAB Arrow Interface.
+%
+% See:
https://www.mathworks.com/help/matlab/matlab_external/version-compatibility.html
+currentRelease = matlabRelease.Release;
+opts.MinimumMatlabRelease = currentRelease;
+opts.MaximumMatlabRelease = currentRelease;
opts.OutputFile = fullfile(outputFolder, compose("matlab-arrow-%s.mltbx",
toolboxVersionRaw));
disp("Output File: " + opts.OutputFile);