Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,325 changes: 785 additions & 3,540 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"package": "ncc build --minify",
"test": "jest",
"all": "npm test && npm run build && npm run package",
"ci": "npm run clean && npm run deps && npm ci && npm run all"
"ci": "npm run clean && npm ci && npm run deps && npm run all"
},
"files": [
"lib/"
],
"dependencies": {
"@actions/core": "^1.4.0",
"@actions/exec": "^1.1.0",
"run-matlab-command-action": "github:matlab-actions/run-command#v2.1.0"
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"common-utils": "https://github.com/matlab-actions/common-utils#kapilg/refactor"
},
"devDependencies": {
"@types/jest": "^29.1.1",
Expand Down
47 changes: 0 additions & 47 deletions plugins/+ciplugins/+github/BuildSummaryPlugin.m

This file was deleted.

22 changes: 0 additions & 22 deletions plugins/+ciplugins/+github/GitHubLogPlugin.m

This file was deleted.

70 changes: 0 additions & 70 deletions plugins/+ciplugins/+github/ParallelizableBuildSummaryPlugin.m

This file was deleted.

20 changes: 0 additions & 20 deletions plugins/+ciplugins/+github/getDefaultPlugins.m

This file was deleted.

32 changes: 3 additions & 29 deletions scripts/setupdeps.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
#!/bin/bash

RMC_BASE_URL='https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2'
SUPPORTED_OS=('win64' 'maci64' 'maca64' 'glnxa64')
source ./node_modules/common-utils/scripts/setupdeps.sh

# Create dist directory if it doesn't already exist
DISTDIR="$(pwd)/dist/bin"
mkdir -p $DISTDIR

# Create plugin directory and copy plugin code
cp -R plugins $(pwd)/dist/

# Download and extract in a temporary directory
WORKINGDIR=$(mktemp -d -t rmc_build.XXXXXX)
cd $WORKINGDIR

wget -O "$WORKINGDIR/license.txt" "$RMC_BASE_URL/license.txt"
wget -O "$WORKINGDIR/thirdpartylicenses.txt" "$RMC_BASE_URL/thirdpartylicenses.txt"

for os in ${SUPPORTED_OS[@]}
do
if [[ $os == 'win64' ]] ; then
bin_ext='.exe'
else
bin_ext=''
fi
mkdir -p "$WORKINGDIR/$os"
wget -O "$WORKINGDIR/$os/run-matlab-command$bin_ext" "$RMC_BASE_URL/$os/run-matlab-command$bin_ext"
done

mv -f ./* "$DISTDIR/"
rm -rf $WORKINGDIR
mv -f ./* "$DISTDIR/bin"
rm -rf $WORKINGDIR
69 changes: 0 additions & 69 deletions src/buildSummary.ts

This file was deleted.

46 changes: 0 additions & 46 deletions src/buildSummary.unit.test.ts

This file was deleted.

17 changes: 13 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import * as core from "@actions/core";
import * as exec from "@actions/exec";
import { matlab } from "run-matlab-command-action";
import * as buildtool from "./buildtool";
import * as buildSummary from "./buildSummary";
// TODO: update common-utils version when new version is released
import { matlab, testResultsSummary, buildSummary } from "common-utils";

/**
* Gather action inputs and then run action.
Expand All @@ -27,7 +27,7 @@ async function run() {
const execOptions = {
env: {
...process.env,
"MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE": "ciplugins.github.getDefaultPlugins",
"MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE": "buildframework.getDefaultPlugins",
}
};

Expand All @@ -38,7 +38,16 @@ async function run() {
(cmd, args) => exec.exec(cmd, args, execOptions),
startupOptions
).finally(() => {
buildSummary.processAndDisplayBuildSummary();
const runnerTemp = process.env.RUNNER_TEMP || '';
const runId = process.env.GITHUB_RUN_ID || '';
const actionName = process.env.GITHUB_ACTION || '';

buildSummary.processAndDisplayBuildSummary(runnerTemp, runId, actionName);

const testResultsData = testResultsSummary.getTestResults(runnerTemp, runId, workspaceDir);
if(testResultsData) {
testResultsSummary.writeSummary(testResultsData, actionName);
}
});

}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES6",
"target": "ES2022",
"module": "CommonJS",
"declaration": true,
"sourceMap": true,
Expand Down
Loading