Skip to content

Commit 8a0be7d

Browse files
author
Release Action
committed
Build for 07838b9
1 parent 07838b9 commit 8a0be7d

File tree

16 files changed

+342
-0
lines changed

16 files changed

+342
-0
lines changed
6 MB
Binary file not shown.

dist/bin/license.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2022-2024, The MathWorks, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
3. In all cases, the software is, and all modifications and derivatives of the
15+
software shall be, licensed to you solely for use in conjunction with
16+
MathWorks products and service offerings.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

dist/bin/maca64/run-matlab-command

5.77 MB
Binary file not shown.

dist/bin/maci64/run-matlab-command

6.13 MB
Binary file not shown.

dist/bin/thirdpartylicenses.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2013 Google. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following disclaimer
11+
in the documentation and/or other materials provided with the
12+
distribution.
13+
* Neither the name of Google Inc. nor the names of its
14+
contributors may be used to endorse or promote products derived from
15+
this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6.17 MB
Binary file not shown.

dist/index.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
classdef BuildSummaryPlugin < matlab.buildtool.plugins.BuildRunnerPlugin
2+
3+
% Copyright 2024-25 The MathWorks, Inc.
4+
5+
properties (Access=private)
6+
TaskDetails = {};
7+
end
8+
9+
methods (Access=protected)
10+
function runTaskGraph(plugin, pluginData)
11+
runTaskGraph@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
12+
13+
[fID, msg] = fopen(fullfile(getenv("RUNNER_TEMP") ,"buildSummary" + getenv("GITHUB_RUN_ID") + ".json"), "w");
14+
if fID == -1
15+
warning("buildframework:BuildSummaryPlugin:UnableToOpenFile","Unable to open a file required to create the MATLAB build summary table: %s", msg);
16+
else
17+
closeFile = onCleanup(@()fclose(fID));
18+
s = jsonencode(plugin.TaskDetails);
19+
fprintf(fID, "%s",s);
20+
end
21+
end
22+
23+
function runTask(plugin, pluginData)
24+
runTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
25+
26+
taskDetail = getCommonTaskDetail(pluginData);
27+
plugin.TaskDetails = [plugin.TaskDetails, taskDetail];
28+
end
29+
30+
function skipTask(plugin, pluginData)
31+
skipTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
32+
33+
taskDetail = getCommonTaskDetail(pluginData);
34+
taskDetail.skipReason = pluginData.SkipReason;
35+
plugin.TaskDetails = [plugin.TaskDetails, taskDetail];
36+
end
37+
end
38+
end
39+
40+
function taskDetail = getCommonTaskDetail(pluginData)
41+
taskDetail = struct();
42+
taskDetail.name = pluginData.TaskResults.Name;
43+
taskDetail.description = pluginData.TaskGraph.Tasks.Description;
44+
taskDetail.failed = pluginData.TaskResults.Failed;
45+
taskDetail.skipped = pluginData.TaskResults.Skipped;
46+
taskDetail.duration = string(pluginData.TaskResults.Duration);
47+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
classdef GitHubLogPlugin < matlab.buildtool.plugins.BuildRunnerPlugin
2+
3+
% Copyright 2024-25 The MathWorks, Inc.
4+
5+
methods (Access=protected)
6+
7+
function runTask(plugin, pluginData)
8+
% Add Github workflow command for grouping the tasks
9+
disp("::group::" + pluginData.TaskResults.Name);
10+
11+
runTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
12+
13+
% Add Github workflow command ::error:: if the task is failed
14+
if pluginData.TaskResults.Failed
15+
disp("::error::" + pluginData.TaskResults.Name + " task failed");
16+
end
17+
18+
% Complete the group command
19+
disp("::endgroup::");
20+
end
21+
end
22+
end
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
classdef ParallelizableBuildSummaryPlugin < matlab.buildtool.plugins.BuildRunnerPlugin
2+
3+
% Copyright 2025 The MathWorks, Inc.
4+
5+
properties
6+
TempFolder
7+
end
8+
9+
methods
10+
function plugin = ParallelizableBuildSummaryPlugin()
11+
tempRoot = getenv("RUNNER_TEMP");
12+
plugin.TempFolder = fullfile(tempRoot, "taskDetails");
13+
end
14+
end
15+
16+
methods (Access=protected)
17+
function runBuild(plugin, pluginData)
18+
% Create temp folder
19+
mkdir(plugin.TempFolder);
20+
cleanup = onCleanup(@()rmdir(plugin.TempFolder, "s"));
21+
22+
runBuild@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
23+
24+
% Construct task details
25+
taskDetails = {};
26+
fs = what(plugin.TempFolder).mat;
27+
for i = 1:numel(fs)
28+
f = fs{i};
29+
s = load(fullfile(plugin.TempFolder, f));
30+
taskDetails = [taskDetails s.taskDetail]; %#ok<AGROW>
31+
end
32+
33+
% Write to file
34+
[fID, msg] = fopen(fullfile(getenv("RUNNER_TEMP"), "buildSummary" + getenv("GITHUB_RUN_ID") + ".json"), "w");
35+
if fID == -1
36+
warning("buildframework:BuildSummaryPlugin:UnableToOpenFile","Unable to open a file required to create the MATLAB build summary table: %s", msg);
37+
else
38+
closeFile = onCleanup(@()fclose(fID));
39+
s = jsonencode(taskDetails);
40+
fprintf(fID, "%s", s);
41+
end
42+
end
43+
44+
function runTask(plugin, pluginData)
45+
runTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
46+
47+
name = fullfile(plugin.TempFolder, pluginData.Name + ".mat");
48+
taskDetail = getCommonTaskDetail(pluginData);
49+
save(name, "taskDetail");
50+
end
51+
52+
function skipTask(plugin, pluginData)
53+
skipTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData);
54+
55+
name = fullfile(plugin.TempFolder, pluginData.Name + ".mat");
56+
taskDetail = getCommonTaskDetail(pluginData);
57+
taskDetail.skipReason = pluginData.SkipReason;
58+
save(name, "taskDetail");
59+
end
60+
end
61+
end
62+
63+
function taskDetail = getCommonTaskDetail(pluginData)
64+
taskDetail = struct();
65+
taskDetail.name = pluginData.TaskResults.Name;
66+
taskDetail.description = pluginData.TaskGraph.Tasks.Description;
67+
taskDetail.failed = pluginData.TaskResults.Failed;
68+
taskDetail.skipped = pluginData.TaskResults.Skipped;
69+
taskDetail.duration = string(pluginData.TaskResults.Duration);
70+
end

0 commit comments

Comments
 (0)