Skip to content

Commit

Permalink
Build for a79e0a2
Browse files Browse the repository at this point in the history
  • Loading branch information
Release Action committed Jul 22, 2024
1 parent a79e0a2 commit f5f18c9
Show file tree
Hide file tree
Showing 19 changed files with 359 additions and 0 deletions.
Binary file added dist/bin/glnxa64/run-matlab-command
Binary file not shown.
27 changes: 27 additions & 0 deletions dist/bin/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2022-2024, The MathWorks, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. In all cases, the software is, and all modifications and derivatives of the
software shall be, licensed to you solely for use in conjunction with
MathWorks products and service offerings.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Binary file added dist/bin/maca64/run-matlab-command
Binary file not shown.
Binary file added dist/bin/maci64/run-matlab-command
Binary file not shown.
27 changes: 27 additions & 0 deletions dist/bin/thirdpartylicenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2013 Google. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Binary file added dist/bin/win64/run-matlab-command.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions dist/plugins/+ciplugins/+github/BuildSummaryPlugin.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
classdef BuildSummaryPlugin < matlab.buildtool.plugins.BuildRunnerPlugin

% Copyright 2024 The MathWorks, Inc.

methods (Access=protected)

function runTaskGraph(plugin, pluginData)
[email protected](plugin, pluginData);
[fID, msg] = fopen(fullfile(getenv("RUNNER_TEMP") ,"buildSummary" + getenv("GITHUB_RUN_ID") + ".json"), "w");

if fID == -1
warning("ciplugins:github:BuildSummaryPlugin:UnableToOpenFile","Unable to open a file required to create the MATLAB build summary table: %s", msg);
else
closeFile = onCleanup(@()fclose(fID));
taskDetails = struct();
for idx = 1:numel(pluginData.TaskResults)
taskDetails(idx).name = pluginData.TaskResults(idx).Name;
taskDetails(idx).description = pluginData.TaskGraph.Tasks(idx).Description;
taskDetails(idx).failed = pluginData.TaskResults(idx).Failed;
taskDetails(idx).skipped = pluginData.TaskResults(idx).Skipped;
taskDetails(idx).duration = string(pluginData.TaskResults(idx).Duration);
end
s = jsonencode(taskDetails);
fprintf(fID, "%s",s);
end
end
end
end
22 changes: 22 additions & 0 deletions dist/plugins/+ciplugins/+github/GitHubLogPlugin.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
classdef GitHubLogPlugin < matlab.buildtool.plugins.BuildRunnerPlugin

% Copyright 2024 The MathWorks, Inc.

methods (Access=protected)

function runTask(plugin, pluginData)
% Add Github workflow command for grouping the tasks
disp("::group::" + pluginData.TaskResults.Name);

[email protected](plugin, pluginData);

% Add Github workflow command ::error:: if the task is failed
if pluginData.TaskResults.Failed
disp("::error::" + pluginData.TaskResults.Name + " task failed");
end

% Complete the group command
disp("::endgroup::");
end
end
end
14 changes: 14 additions & 0 deletions dist/plugins/+ciplugins/+github/getDefaultPlugins.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function plugins = getDefaultPlugins(pluginProviderData)

% Copyright 2024 The MathWorks, Inc.

arguments
pluginProviderData (1,1) struct = struct();
end

plugins = [ ...
matlab.buildtool.internal.getFactoryDefaultPlugins(pluginProviderData) ...
ciplugins.github.GitHubLogPlugin() ...
ciplugins.github.BuildSummaryPlugin() ...
];
end
12 changes: 12 additions & 0 deletions lib/buildSummary.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export interface Task {
name: string;
description: string;
failed: boolean;
skipped: boolean;
duration: string;
}
export declare function getBuildSummaryTable(tasks: Task[]): string[][];
export declare function writeSummary(taskSummaryTableRows: string[][]): void;
export declare function processAndDisplayBuildSummary(): void;
export declare function getTaskDetails(tasks: Task): string[];
export declare function getTaskSummaryRows(task: Task, taskSummaryTableRows: string[][]): string[][];
109 changes: 109 additions & 0 deletions lib/buildSummary.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/buildSummary.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions lib/buildtool.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface RunBuildOptions {
Tasks?: string;
BuildOptions?: string;
}
export declare function generateCommand(options: RunBuildOptions): string;
41 changes: 41 additions & 0 deletions lib/buildtool.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/buildtool.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
67 changes: 67 additions & 0 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f5f18c9

Please sign in to comment.