From 1b056b7d0acba54d99e183456a82cadb9891afa7 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:35:20 +0000 Subject: [PATCH] Update GitHub Actions workflow for Pyraview - Update 'Package Binaries' step to use 7-Zip on Windows runners to fix zip failures. - Simplify packaging logic for non-Windows platforms. - Update 'Package Toolbox' step to package the MATLAB toolbox programmatically, using the GitHub release tag for the version number and 'Van Hooser lab' as the author. - Generate a unique ToolboxIdentifier to satisfy packaging requirements. --- .github/workflows/build_and_release.yml | 36 ++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 3c34b16..6c54d00 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -49,12 +49,11 @@ jobs: run: | mkdir -p dist if [ "${{ runner.os }}" == "Windows" ]; then - # Windows CMake builds output to bin due to our CMakeLists.txt fix - zip -j dist/pyraview-win-x64.zip build/bin/*.dll build/bin/*.exe - elif [ "${{ runner.os }}" == "macOS" ]; then - zip -j dist/pyraview-mac-arm.zip build/bin/*.dylib build/bin/run_tests + # Use 7-Zip (pre-installed on Windows runners) + # 'a' is add, '-j' junk paths (like zip -j) + 7z a -tzip dist/pyraview-win-x64.zip ./build/bin/*.dll ./build/bin/*.exe else - zip -j dist/pyraview-linux-x64.zip build/bin/*.so build/bin/run_tests + zip -j dist/pyraview-${{ runner.os }}-${{ runner.arch }}.zip build/bin/* fi - name: Upload Artifacts @@ -127,9 +126,34 @@ jobs: # Run the packaging command - name: Package Toolbox uses: matlab-actions/run-command@v2 + env: + RELEASE_TAG: ${{ github.ref_name }} with: command: | - opts = matlab.addons.toolbox.ToolboxOptions('toolboxPackaging.prj'); + % Create the options object without a PRJ file + opts = matlab.addons.toolbox.ToolboxOptions(pwd); + opts.ToolboxName = 'Pyraview'; + + % 2. CRITICAL: Generate and assign a unique identifier + % This satisfies the 'Unique toolbox identifier must be specified' error + opts.ToolboxIdentifier = char(java.util.UUID.randomUUID()); + + % Grab version from environment variable + v = getenv('RELEASE_TAG'); + if startsWith(v, 'v') + v = v(2:end); + end + opts.ToolboxVersion = v; + + opts.AuthorName = 'Van Hooser lab'; + opts.ToolboxImage = ''; + opts.Description = 'High-performance multi-resolution decimation engine.'; + opts.OutputFile = 'Pyraview.mltbx'; + + % Important: Include the folder with the MEX files + opts.ToolboxFiles = {fullfile(pwd, 'src', 'matlab')}; + + % Package it matlab.addons.toolbox.packageToolbox(opts); # Upload the .mltbx as an artifact so the release job can pick it up