From ec0b52d5be1ce096d51e367fecad9742eb54e4e3 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Tue, 12 Nov 2024 13:31:28 -0500 Subject: [PATCH 1/5] Use MATLAB R2024b in MATLAB CI workflows. --- .github/workflows/matlab.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matlab.yml b/.github/workflows/matlab.yml index 17362206a81a7..2bdfd0743a547 100644 --- a/.github/workflows/matlab.yml +++ b/.github/workflows/matlab.yml @@ -75,7 +75,7 @@ jobs: - name: Install MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: R2024a + release: R2024b - name: Install ccache run: sudo apt-get install ccache - name: Setup ccache @@ -123,7 +123,7 @@ jobs: - name: Install MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: R2024a + release: R2024b - name: Install ccache run: brew install ccache - name: Setup ccache @@ -162,7 +162,7 @@ jobs: - name: Install MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: R2024a + release: R2024b - name: Download Timezone Database shell: bash run: ci/scripts/download_tz_database.sh From 1cfa7697cf9cac598f51f9c73ace4b9ef2f8c6d8 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Tue, 12 Nov 2024 13:32:45 -0500 Subject: [PATCH 2/5] Use MATLAB R2024b in MATLAB `crossbow` packaging workflows. --- dev/tasks/matlab/github.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tasks/matlab/github.yml b/dev/tasks/matlab/github.yml index 73dd9b6d1a7a8..3e8af430a96de 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@v2 with: - release: R2024a + release: R2024b - name: Build MATLAB Interface env: {{ macros.github_set_sccache_envvars()|indent(8) }} @@ -73,7 +73,7 @@ jobs: - name: Install MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: R2024a + release: R2024b - name: Build MATLAB Interface env: {{ macros.github_set_sccache_envvars()|indent(8) }} @@ -99,7 +99,7 @@ jobs: - name: Install MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: R2024a + release: R2024b - name: Install sccache shell: bash run: arrow/ci/scripts/install_sccache.sh pc-windows-msvc $(pwd)/sccache @@ -146,7 +146,7 @@ jobs: - name: Install MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: R2024a + release: R2024b - name: Run commands env: MATLABPATH: arrow/matlab/tools From 5fca60d9f05433268f60ad8a1c5bf9f3241adc94 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Tue, 12 Nov 2024 15:50:30 -0500 Subject: [PATCH 3/5] Bump `mathworks/libmexclass` version to commit cac7c3630a086bd5ba41413af44c833cef189c09 to work around https://github.com/mathworks/libmexclass/issues/92. --- matlab/tools/cmake/BuildMatlabArrowInterface.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/tools/cmake/BuildMatlabArrowInterface.cmake b/matlab/tools/cmake/BuildMatlabArrowInterface.cmake index 5ed68ec246ee5..8016cbf261b7c 100644 --- a/matlab/tools/cmake/BuildMatlabArrowInterface.cmake +++ b/matlab/tools/cmake/BuildMatlabArrowInterface.cmake @@ -24,7 +24,7 @@ set(MATLAB_ARROW_LIBMEXCLASS_CLIENT_FETCH_CONTENT_NAME libmexclass) # libmexclass is accessible for CI without permission issues. set(MATLAB_ARROW_LIBMEXCLASS_CLIENT_FETCH_CONTENT_GIT_REPOSITORY "https://github.com/mathworks/libmexclass.git") # Use a specific Git commit hash to avoid libmexclass version changing unexpectedly. -set(MATLAB_ARROW_LIBMEXCLASS_CLIENT_FETCH_CONTENT_GIT_TAG "ca3cea6") +set(MATLAB_ARROW_LIBMEXCLASS_CLIENT_FETCH_CONTENT_GIT_TAG "cac7c3630a086bd5ba41413af44c833cef189c09") set(MATLAB_ARROW_LIBMEXCLASS_CLIENT_FETCH_CONTENT_SOURCE_SUBDIR "libmexclass/cpp") # ------------------------------------------ From c9c36222a21f43187b8740192ba4a740afab9400 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Wed, 13 Nov 2024 11:32:57 -0500 Subject: [PATCH 4/5] Updated expected MATLAB MLTBX artifact name. --- dev/tasks/tasks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 8f542265fd02d..01f4f8f020c4e 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -693,7 +693,7 @@ tasks: ci: github template: matlab/github.yml artifacts: - - matlab-arrow-{no_rc_version}.mltbx + - matlab-arrow-[0-9]+.[0-9]+.[0-9]+.mltbx ############################## Arrow JAR's ################################## From 1af4cea0db4400e494a541305c3a474920f13a7f Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Thu, 14 Nov 2024 12:29:54 -0500 Subject: [PATCH 5/5] Add `no_rc_no_dev_version` as a `crossbow` property. --- dev/archery/archery/crossbow/core.py | 14 ++++++++++++++ dev/tasks/matlab/github.yml | 2 +- dev/tasks/tasks.yml | 2 +- matlab/tools/packageMatlabInterface.m | 16 +++++++--------- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/dev/archery/archery/crossbow/core.py b/dev/archery/archery/crossbow/core.py index 4e6b42e485c0c..0f5db1c88f714 100644 --- a/dev/archery/archery/crossbow/core.py +++ b/dev/archery/archery/crossbow/core.py @@ -803,6 +803,19 @@ def __init__(self, head, branch, remote, version, r_version, email=None): self.r_version = r_version self.no_rc_version = re.sub(r'-rc\d+\Z', '', version) self.no_rc_r_version = re.sub(r'-rc\d+\Z', '', r_version) + # MAJOR.MINOR.PATCH Versioning + # + # Excludes: + # + # 1. Release Candidate (RC) string components (e.g. -rc123) + # 2. Dev string components (e.g. .dev123) + # + # Example: + # + # '19.0.0.dev66' -> + # '19.0.0' + self.no_rc_no_dev_version = \ + re.sub(r'\.dev\d+\Z', '', self.no_rc_version) # Semantic Versioning 1.0.0: https://semver.org/spec/v1.0.0.html # # > A pre-release version number MAY be denoted by appending an @@ -1187,6 +1200,7 @@ def from_config(cls, config, target, tasks=None, groups=None, params=None): versions = { 'version': target.version, 'no_rc_version': target.no_rc_version, + 'no_rc_no_dev_version': target.no_rc_no_dev_version, 'no_rc_semver_version': target.no_rc_semver_version, 'no_rc_snapshot_version': target.no_rc_snapshot_version, 'r_version': target.r_version, diff --git a/dev/tasks/matlab/github.yml b/dev/tasks/matlab/github.yml index 3e8af430a96de..5de60c709ef30 100644 --- a/dev/tasks/matlab/github.yml +++ b/dev/tasks/matlab/github.yml @@ -152,7 +152,7 @@ jobs: MATLABPATH: arrow/matlab/tools ARROW_MATLAB_TOOLBOX_FOLDER: arrow/matlab/install/arrow_matlab ARROW_MATLAB_TOOLBOX_OUTPUT_FOLDER: artifacts/matlab-dist - ARROW_MATLAB_TOOLBOX_VERSION: {{ arrow.no_rc_version }} + ARROW_MATLAB_TOOLBOX_VERSION: {{ arrow.no_rc_no_dev_version }} uses: matlab-actions/run-command@v2 with: command: packageMatlabInterface diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 01f4f8f020c4e..63a2c777c0329 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -693,7 +693,7 @@ tasks: ci: github template: matlab/github.yml artifacts: - - matlab-arrow-[0-9]+.[0-9]+.[0-9]+.mltbx + - matlab-arrow-{no_rc_no_dev_version}.mltbx ############################## Arrow JAR's ################################## diff --git a/matlab/tools/packageMatlabInterface.m b/matlab/tools/packageMatlabInterface.m index 5c82763b25f8a..a90b84186d558 100644 --- a/matlab/tools/packageMatlabInterface.m +++ b/matlab/tools/packageMatlabInterface.m @@ -17,7 +17,11 @@ toolboxFolder = string(getenv("ARROW_MATLAB_TOOLBOX_FOLDER")); outputFolder = string(getenv("ARROW_MATLAB_TOOLBOX_OUTPUT_FOLDER")); -toolboxVersionRaw = string(getenv("ARROW_MATLAB_TOOLBOX_VERSION")); +toolboxVersion = string(getenv("ARROW_MATLAB_TOOLBOX_VERSION")); +if isempty(toolboxVersion) + error("ARROW_MATLAB_TOOLBOX_VERSION environment variable value is empty." + ... + "ARROW_MATLAB_TOOLBOX_VERSION should follow the general form: ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}."; +end appendLicenseText(fullfile(toolboxFolder, "LICENSE.txt")); appendNoticeText(fullfile(toolboxFolder, "NOTICE.txt")); @@ -27,13 +31,7 @@ disp("Toolbox Folder: " + toolboxFolder); disp("Output Folder: " + outputFolder); -disp("Toolbox Version Raw: " + toolboxVersionRaw); - -versionPattern = regexpPattern("^[0-9]+\.[0-9]+\.[0-9]+"); -toolboxVersion = extract(toolboxVersionRaw, versionPattern); -if isempty(toolboxVersion) - error("Unable to extract MAJOR.MINOR.PATCH version string from " + toolboxVersionRaw); -end +disp("Toolbox Version: " + toolboxVersion); disp("Toolbox Version:" + toolboxVersion); @@ -85,4 +83,4 @@ function appendNoticeText(filename) "This product includes software from The MathWorks, Inc. (Apache 2.0)" " * Copyright (C) 2024 The MathWorks, Inc."]; writelines(noticeText, filename, WriteMode="append"); -end \ No newline at end of file +end