Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
12 changes: 12 additions & 0 deletions .github/workflows/bat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ jobs:

- name: Perform 'setup-matlab'
uses: matlab-actions/setup-matlab@v2
with:
products: MATLAB_Test

- name: Create buildfile.m in project root for tests
run: |
cat <<'_EOF' >> "buildfile.m"
function plan = buildfile
import matlab.buildtool.tasks.TestTask

plan = buildplan(localfunctions);
plan("preMadeTest") = TestTask;
plan("preMadeTest").Dependencies = "build";
Comment thread
mw-kapilg marked this conversation as resolved.
Comment thread
mw-kapilg marked this conversation as resolved.
plan("test").Dependencies = "build";
plan("deploy").Dependencies = "test";

Expand Down Expand Up @@ -185,6 +191,12 @@ jobs:
grep "::error::error task failed" console.log
rm console.log

- name: Run build with premade TestTask for test summary
# continue-on-error: true
Comment thread
mw-kapilg marked this conversation as resolved.
Outdated
uses: ./
with:
tasks: preMadeTest

- name: Run build with invalid task
continue-on-error: true
uses: ./
Expand Down
4,331 changes: 788 additions & 3,543 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": "github: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
Comment thread
mw-kapilg marked this conversation as resolved.

# 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.

Loading
Loading