Skip to content

Commit

Permalink
Fix MATLAB toolbox build task (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
naegelejd authored Apr 18, 2024
1 parent 3f0ac97 commit 4648282
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/mrd_matlab.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Matlab
name: Test MRD Matlab

on:
push:
Expand All @@ -11,9 +11,8 @@ on:
workflow_dispatch:

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 0 additions & 2 deletions matlab/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
.buildtool/
release/
tests/results
10 changes: 2 additions & 8 deletions matlab/buildfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
import matlab.buildtool.tasks.CodeIssuesTask
import matlab.buildtool.tasks.TestTask

% Create a plan from task functions
plan = buildplan(localfunctions);

% Add a task to identify code issues
plan("check") = CodeIssuesTask(Results="tests/results/static-analysis-results.sarif");

% Add a task to run tests
plan("test") = TestTask("tests", SourceFiles="toolbox", TestResults="tests/results/test-results.xml");

% Make the "packageToolbox" task the default task in the plan
plan.DefaultTasks = "packageToolbox";
plan.DefaultTasks = ["check", "test"];

% Make the "packageToolbox" task dependent on the "check" and "test" tasks
plan("packageToolbox").Dependencies = ["check" "test"];
% plan("packageToolbox").Dependencies = ["check" "test"];
end

function packageToolboxTask(~)
Expand Down
2 changes: 2 additions & 0 deletions matlab/release/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions matlab/tests/results/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 4648282

Please sign in to comment.