Skip to content

Commit dc43ad7

Browse files
committed
build check our own details
1 parent 72e1629 commit dc43ad7

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ jobs:
4747
with:
4848
command: license('inuse'), stdlib.platform_tell()
4949

50-
- name: Check CodeIssues
51-
if: ${{ matrix.release >= 'R2024a' }}
52-
uses: ./.github/workflows/composite-check
50+
- name: Check codeIssues
51+
uses: matlab-actions/run-build@v2
52+
with:
53+
tasks: check
5354

5455
- name: Main Tests
5556
uses: ./.github/workflows/composite-nomex
@@ -81,6 +82,12 @@ jobs:
8182
with:
8283
command: license('inuse'), stdlib.platform_tell()
8384

85+
- name: Check codeIssues
86+
if: ${{ matrix.release >= 'R2022b' }}
87+
uses: matlab-actions/run-build@v2
88+
with:
89+
tasks: check
90+
8491
- name: Main Tests
8592
uses: ./.github/workflows/composite-nomex
8693

.github/workflows/composite-check/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ runs:
77
steps:
88

99
- name: Check task
10-
if: ${{ matrix.release >= 'R2024a' }}
10+
if: ${{ matrix.release >= 'R2022b' }}
1111
uses: matlab-actions/run-build@v2
1212
with:
1313
startup-options: ${{ matrix.startup-options }}
1414
tasks: check
1515

16-
- name: Upload CodeIssues
17-
if: failure()
18-
uses: actions/upload-artifact@v4
19-
with:
20-
name: ${{ matrix.release }}-${{ runner.os }}-codeissues
21-
path: .buildtool/CodeIssues.sarif
16+
# - name: Upload CodeIssues
17+
# if: failure()
18+
# uses: actions/upload-artifact@v4
19+
# with:
20+
# name: ${{ matrix.release }}-${{ runner.os }}-codeissues
21+
# path: .buildtool/CodeIssues.sarif

buildfile.m

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@
9191
plan("exe") = matlab.buildtool.Task(Inputs=srcs, Outputs=exes, Actions=@build_exe, ...
9292
Description="build demo executables for testing java_run");
9393

94-
if ~isMATLABReleaseOlderThan("R2023b")
95-
plan("check") = matlab.buildtool.tasks.CodeIssuesTask(plan.RootFolder, ...
96-
IncludeSubfolders=true, WarningThreshold=0);
97-
end
98-
9994
end
10095

10196

@@ -108,3 +103,18 @@ function publishTask(context)
108103
"https://github.com/geospace-code/matlab-stdlib", ...
109104
outdir)
110105
end
106+
107+
108+
function checkTask(context)
109+
root = context.Plan.RootFolder;
110+
111+
c = codeIssues(root, IncludeSubfolders=true);
112+
113+
if isempty(c.Issues)
114+
fprintf('%d files checked OK with %s under %s\n', numel(c.Files), c.Release, root)
115+
else
116+
disp(c.Issues)
117+
error("Errors found in " + join(c.Issues.Location, newline))
118+
end
119+
120+
end

0 commit comments

Comments
 (0)