From 315d9b5eaeecfb05a18f6173c40f954ca24dfe54 Mon Sep 17 00:00:00 2001 From: "Simms, Andrew" Date: Wed, 30 Sep 2026 21:04:10 -0600 Subject: [PATCH 1/2] Actions: Update build and release versions for 1.1 release --- .github/workflows/build_release.yml | 21 +++++++++++++++++---- scripts/build_release.m | 5 +++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 7c1c5f2b7..cb93a2cc4 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -4,6 +4,18 @@ on: branches: - master - develop + # Builds the toolbox on pull requests so packaging problems show up before + # merging. Releases are only created on pushes to master and develop. + pull_request: + branches: + - master + - develop + paths: + - 'mhkit/**' + - 'scripts/build_release.m' + - 'pyproject.toml' + - 'mhkit_python_utils/**' + - '.github/workflows/build_release.yml' jobs: build-toolbox: runs-on: ubuntu-latest @@ -56,13 +68,14 @@ jobs: run: | echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV + # Keep in sync with the release used to test local builds - name: Set up MATLAB - uses: matlab-actions/setup-matlab@v2 + uses: matlab-actions/setup-matlab@v3 with: - release: R2024a + release: R2025b - name: Build Toolbox - uses: matlab-actions/run-command@v2 + uses: matlab-actions/run-command@v3 with: command: addpath('scripts'); build_release @@ -101,7 +114,7 @@ jobs: if-no-files-found: error - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' with: files: | diff --git a/scripts/build_release.m b/scripts/build_release.m index fd3e5bb94..c31e65352 100644 --- a/scripts/build_release.m +++ b/scripts/build_release.m @@ -73,6 +73,11 @@ toolbox_matlab_path = strsplit(genpath(mhkit_path), pathsep); toolbox_matlab_path = toolbox_matlab_path(~cellfun(@isempty, toolbox_matlab_path)); toolbox_matlab_path = toolbox_matlab_path(~cellfun(is_excluded, toolbox_matlab_path)); +% Only folders that directly contain packaged files, older releases (R2024a) +% reject path folders that only contain subfolders, such as mhkit itself +packaged_folders = unique(cellfun(@fileparts, toolbox_files, 'UniformOutput', false)); +toolbox_matlab_path = toolbox_matlab_path(ismember(toolbox_matlab_path, packaged_folders)); +fprintf('Adding %d folders to the MATLAB path\n', numel(toolbox_matlab_path)); fprintf('\nStarting MATLAB toolbox build of %s version %s\n', project_name, project_version); From f585f3ff12174e8533c6a3084028d7db94650c7f Mon Sep 17 00:00:00 2001 From: "Simms, Andrew" Date: Wed, 30 Sep 2026 21:09:14 -0600 Subject: [PATCH 2/2] Actions: Clean up temporary toolbox build --- .github/workflows/build_release.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index cb93a2cc4..96cbed3eb 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -4,18 +4,6 @@ on: branches: - master - develop - # Builds the toolbox on pull requests so packaging problems show up before - # merging. Releases are only created on pushes to master and develop. - pull_request: - branches: - - master - - develop - paths: - - 'mhkit/**' - - 'scripts/build_release.m' - - 'pyproject.toml' - - 'mhkit_python_utils/**' - - '.github/workflows/build_release.yml' jobs: build-toolbox: runs-on: ubuntu-latest