-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuildfile.m
44 lines (35 loc) · 1.42 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function plan = buildfile
%BUILDFILE build tasks for automation
import matlab.buildtool.tasks.*
plan = buildplan(localfunctions);
plan("clean") = CleanTask;
plan("check") = CodeIssuesTask(...
SourceFiles="source", ...
IncludeSubfolders=true, ...
Results="analysis-results/codeIssues.sarif",...
WarningThreshold=38);
plan("test") = TestTask(...
SourceFiles="source", ...
TestResults=["test-results/results.xml" "test-results/test-report.html"], ...
LoggingLevel="detailed") ...
.addCodeCoverage(...
["test-results/coverage.xml", "test-results/coverage-report/index.html"], ...
MetricLevel="mcdc");
plan("toolbox").Dependencies = ["check" "test"];
plan("toolbox").Inputs = plan.RootFolder;
plan("toolbox").Outputs = "release/Tool Validation Kit.mltbx";
plan.DefaultTasks = "toolbox";
end
function toolboxTask(ctx)
opts = matlab.addons.toolbox.ToolboxOptions(ctx.Plan.RootFolder,"266fc400-0ecc-42c5-ad93-c19364dbaf03", ...
ToolboxVersion="4.2.2", ...
AuthorName="MathWorks Consulting", ...
AuthorCompany="MathWorks, Inc.", ...
MinimumMatlabRelease="R2024b", ...
ToolboxFiles=["app", "documentation", "icons", "source", ...
"documents", "release/Tool Validation Kit App.mlappinstall", ...
"release/Tool Validation Kit.prj", "demos", "license.txt", ...
"SECURITY.md"], ...
OutputFile=ctx.Task.Outputs.paths);
matlab.addons.toolbox.packageToolbox(opts);
end