Skip to content

Commit a45c8f8

Browse files
committed
ci: matlab r2025b
1 parent 14e4f0c commit a45c8f8

3 files changed

Lines changed: 28 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
release: [R2023b, R2025a]
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626

2727
- uses: ./.github/workflows/composite-install-matlab
2828

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838

3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v5
4141

4242
- name: Setup Pages
4343
uses: actions/configure-pages@v5
@@ -53,7 +53,7 @@ jobs:
5353
# "Error using publish Only MATLAB code can be published"
5454

5555
- name: Upload artifact
56-
uses: actions/upload-pages-artifact@v3
56+
uses: actions/upload-pages-artifact@v4
5757
with:
5858
path: 'docs/'
5959

buildfile.m

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,40 @@
44

55
addpath(plan.RootFolder)
66

7-
pkg_name = "+matmap3d";
7+
if ~isMATLABReleaseOlderThan("R2024a")
8+
plan("coverage") = matlab.buildtool.tasks.TestTask(Description="code coverage", SourceFiles="test", Strict=false, CodeCoverageResults="code-coverage.xml");
9+
end
810

9-
if ~isMATLABReleaseOlderThan("R2023b")
10-
plan("check") = matlab.buildtool.tasks.CodeIssuesTask(pkg_name, IncludeSubfolders=true, WarningThreshold=0);
11-
plan("test") = matlab.buildtool.tasks.TestTask("test", Strict=false);
1211
end
1312

14-
if ~isMATLABReleaseOlderThan("R2024a")
15-
plan("coverage") = matlab.buildtool.tasks.TestTask(Description="code coverage", SourceFiles="test", Strict=false, CodeCoverageResults="code-coverage.xml");
13+
14+
function testTask(context)
15+
r = runtests(fullfile(context.Plan.RootFolder, "test"), Strict=false);
16+
% Parallel Computing Toolbox takes more time to startup than is worth it for this task
17+
18+
assert(~isempty(r), "No tests were run")
19+
assertSuccess(r)
20+
end
21+
22+
23+
24+
function checkTask(context)
25+
root = context.Plan.RootFolder;
26+
27+
c = codeIssues(root, IncludeSubfolders=true);
28+
29+
if isempty(c.Issues)
30+
fprintf('%d files checked OK with %s under %s\n', numel(c.Files), c.Release, root)
31+
else
32+
disp(c.Issues)
33+
error("Errors found in " + join(c.Issues.Location, newline))
1634
end
1735

1836
end
1937

2038

2139
function publishTask(context)
22-
% publish HTML inline documentation strings to individual HTML files
23-
outdir = fullfile(context.Plan.RootFolder, 'docs');
40+
outdir = fullfile(context.Plan.RootFolder, "docs");
2441

2542
publish_gen_index_html("matmap3d", ...
2643
"Geographic coordinate tranformation functions for Matlab.", ...

0 commit comments

Comments
 (0)