forked from mathworks/ci-configuration-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildfile.m
28 lines (21 loc) · 833 Bytes
/
buildfile.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function plan = buildfile
import matlab.buildtool.tasks.TestTask;
import matlab.buildtool.tasks.MexTask;
% Create a plan from task functions
plan = buildplan(localfunctions);
% Add a task to build a MEX file
plan("mex") = MexTask("src/arrayProduct.c","toolbox");
% Add a task to run tests and generate test and coverage results
plan("test") = TestTask(TestResults="test-results/results.xml");
plan("test").Dependencies = ["mex"];
end
function packageToolboxTask(~)
% Create an mltbx toolbox package
dir toolbox/*.mex*;
identifier = "arrayProduct";
toolboxFolder = "toolbox";
opts = matlab.addons.toolbox.ToolboxOptions(toolboxFolder,identifier);
opts.ToolboxName = "Cross-Platform Array Product Toolbox";
opts.MinimumMatlabRelease = "R2024a";
matlab.addons.toolbox.packageToolbox(opts);
end