Skip to content

Commit d7b91ff

Browse files
committed
buildtool coverage,publish streamline
1 parent d0bdfdb commit d7b91ff

File tree

3 files changed

+12
-41
lines changed

3 files changed

+12
-41
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Filesystem.class
2-
code-coverage/
3-
test-results/
2+
3+
code-coverage.xml
4+
45
.buildtool/
56
*.asv
67
docs/

buildfile.m

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function plan = buildfile
2-
plan = buildplan(localfunctions);
2+
plan = buildplan();
33

44
plan.DefaultTasks = "test";
55

@@ -14,6 +14,12 @@
1414
plan("test") = matlab.buildtool.tasks.TestTask("test", Strict=true);
1515
end
1616

17+
if ~isMATLABReleaseOlderThan("R2024a")
18+
plan("coverage") = matlab.buildtool.tasks.TestTask(Description="code coverage", Dependencies="clean", SourceFiles="test", Strict=true, CodeCoverageResults="code-coverage.xml");
19+
end
20+
21+
plan("publish") = matlab.buildtool.Task(Description="HTML inline doc generate", Actions=@publishTask);
22+
1723

1824
if isMATLABReleaseOlderThan("R2024b")
1925
plan("mex") = matlab.buildtool.Task(Actions=@legacyMexTask);
@@ -33,9 +39,10 @@
3339
plan("mex:" + name) = matlab.buildtool.tasks.MexTask(src, bindir, ...
3440
Options=[compiler_id, compiler_opt]);
3541
end
36-
3742
end
3843

44+
plan("mex").Description = "MEX build";
45+
3946
end
4047

4148

@@ -53,11 +60,6 @@ function legacyTestTask(context)
5360
end
5461

5562

56-
function coverageTask(context)
57-
coverage_run("stdlib", fullfile(context.Plan.RootFolder, "test"))
58-
end
59-
60-
6163
function publishTask(context)
6264
outdir = fullfile(context.Plan.RootFolder, "docs");
6365

private/coverage_run.m

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)