|
1 | 1 | function plan = buildfile |
2 | 2 |
|
3 | | -plan = buildplan(); |
| 3 | +plan = buildplan(localfunctions); |
4 | 4 |
|
5 | 5 | plan.DefaultTasks = "test"; |
6 | 6 |
|
7 | 7 | pkg_name = "+matmap3d"; |
8 | 8 |
|
9 | | -if isMATLABReleaseOlderThan("R2023b") |
10 | | - plan("test") = matlab.buildtool.Task(Actions=@legacy_test); |
11 | | -else |
12 | | - plan("check") = matlab.buildtool.tasks.CodeIssuesTask(pkg_name, IncludeSubfolders=true, ... |
13 | | - WarningThreshold=0); |
14 | | - plan("test") = matlab.buildtool.tasks.TestTask("test", Strict=false); |
15 | | -end |
| 9 | +plan("check") = matlab.buildtool.tasks.CodeIssuesTask(pkg_name, Results="CodeIssues.sarif", ... |
| 10 | + IncludeSubfolders=true, WarningThreshold=0); |
| 11 | +plan("test") = matlab.buildtool.tasks.TestTask("test", TestResults="TestResults.xml", Strict=false); |
16 | 12 |
|
17 | 13 | if ~isMATLABReleaseOlderThan("R2024a") |
18 | 14 | plan("coverage") = matlab.buildtool.tasks.TestTask(Description="code coverage", SourceFiles="test", Strict=false, CodeCoverageResults="code-coverage.xml"); |
19 | 15 | end |
20 | 16 |
|
21 | | -plan("publish") = matlab.buildtool.Task(Description="HTML inline doc generate", Actions=@publish_html); |
22 | | - |
23 | | - |
24 | | -end |
25 | | - |
26 | | - |
27 | | -function legacy_test(context) |
28 | | -r = runtests(fullfile(context.Plan.RootFolder, "test"), Strict=false); |
29 | | -% Parallel Computing Toolbox takes more time to startup than is worth it for this task |
30 | | - |
31 | | -assert(~isempty(r), "No tests were run") |
32 | | -assertSuccess(r) |
33 | 17 | end |
34 | 18 |
|
35 | 19 |
|
36 | | -function publish_html(context) |
37 | | - outdir = fullfile(context.Plan.RootFolder, "docs"); |
| 20 | +function publishTask(context) |
| 21 | +% publish HTML inline documentation strings to individual HTML files |
| 22 | +outdir = fullfile(context.Plan.RootFolder, 'docs'); |
38 | 23 |
|
39 | | - publish_gen_index_html("matmap3d", ... |
| 24 | +publish_gen_index_html("matmap3d", ... |
40 | 25 | "Geographic coordinate tranformation functions for Matlab.", ... |
41 | 26 | "https://github.com/geospace-code/matmap3d", ... |
42 | 27 | outdir) |
|
0 commit comments