Skip to content

Add MATLAB buildtool support for CI tasks#49

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/use-matlab-buildtool-for-ci
Draft

Add MATLAB buildtool support for CI tasks#49
Copilot wants to merge 2 commits intomainfrom
copilot/use-matlab-buildtool-for-ci

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

Adds support for MATLAB's buildtool framework (CodeIssuesTask, TestTask) as an alternative to the existing codecheckToolbox/testToolbox wrapper functions.

buildfile.m (root)

  • Defines setup, check, and test tasks using MATLAB's built-in task classes
  • check and test depend on setup for path initialization
  • Requires R2023b+
buildtool check   % Run code analysis via CodeIssuesTask
buildtool test    % Run tests via TestTask
buildtool         % Both (default tasks)

code/templates/buildfile.m

  • Template for downstream projects using MatBox, with conditional installMatBox() guard

GitHub Actions (check-code, test-code)

  • Actions now detect buildfile.m at repo root
  • Present → matlab-actions/run-build@v2
  • Absent → existing run-command fallback (no breaking change)
Original prompt

This section details on the original issue you should resolve

<issue_title>Suggestion: Use MATLAB's buildtool</issue_title>
<issue_description>Look into using MATLAB's buildtool for the CI tasks</issue_description>

Comments on the Issue (you are @copilot in this section)

@ehennestad MATLAB currently supports the following tasks for the buildtool: | Task Class | Description | |-------------------------------------------|-------------------------------| | `matlab.buildtool.tasks.CodeIssuesTask` | Task for identifying code issues | | `matlab.buildtool.tasks.TestTask` | Task for running tests |

These are more or less equivalent to testToolbox and codecheckToolbox

Pros of matlab.buildtool.tasks

Cons of matlab.buildtool.tasks


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

- Create buildfile.m at repository root with setup, check, and test tasks
  using MATLAB's CodeIssuesTask and TestTask
- Create code/templates/buildfile.m as a template for other projects
- Update check-code and test-code GitHub Actions to detect buildfile.m
  and use matlab-actions/run-build when available
- Maintain backward compatibility with existing wrapper functions

Co-authored-by: ehennestad <17237719+ehennestad@users.noreply.github.com>
Copilot AI changed the title [WIP] Suggest using MATLAB's buildtool for CI tasks Add MATLAB buildtool support for CI tasks Mar 18, 2026
Copilot AI requested a review from ehennestad March 18, 2026 12:02
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.

Suggestion: Use MATLAB's buildtool

2 participants