Skip to content
Merged
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
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ jobs:
path: |
buildUtilities/.buildtool

- name: Download firmware artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.REPO_READ_TOKEN }}
workflow: main.yml
repo: sync2brain/bossdevice-firmware
branch: main
search_artifacts: true
name: bossdevice-firmware-${{ matrix.matlabVer }}
path: toolbox/dependencies/firmware/${{ matrix.matlabVer }}
if_no_artifact_found: fail

- name: Run MATLAB command
run: |
&"$env:ProgramFiles\MATLAB\${{ matrix.matlabVer }}\bin\matlab.exe" -batch "openProject(pwd); cd('buildUtilities'); buildtool test({'noHW','bdConnected'})"
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'v*'

jobs:
package:
packageToolbox:
# The type of runner that the job will run on
runs-on: matlab

Expand All @@ -28,6 +28,19 @@ jobs:
path: |
buildUtilities/.buildtool

# Download firmware mldatx file from bossdevice-firmware. Must create a step for every MATLAB release to add
- name: Download R2023a firmware artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.REPO_READ_TOKEN }}
workflow: main.yml
repo: sync2brain/bossdevice-firmware
branch: main
search_artifacts: true
name: bossdevice-firmware-R2023a
path: toolbox/dependencies/firmware
if_no_artifact_found: fail

- name: Run MATLAB command
run: |
&"$env:ProgramFiles\MATLAB\$env:MATLAB_VER\bin\matlab.exe" -batch "openProject(pwd); cd('buildUtilities'); buildtool test('bdConnected') package('${{ github.ref_name }}','${{ github.actor }}')"
Expand Down
9 changes: 2 additions & 7 deletions buildUtilities/buildfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@
Actions = @(~) updateSGdeps,...
Outputs = fullfile(projObj.RootFolder,"toolbox/dependencies/sg/**"));

plan("updateFirmwareDeps") = Task( ...
Description = "Update Firmware dependencies", ...
Actions = @(~) updateFirmwareDeps,...
Outputs = fullfile(projObj.RootFolder,"toolbox/dependencies/firmware/**"));

% Create the "test" task and add it to the plan
plan("test") = Task( ...
Description = "Run unit tests", ...
Actions = @(~,tags) testTask(tags),...
Inputs = [fullfile(projObj.RootFolder,'**/*.m'),...
plan("updateSGdeps").Outputs,...
plan("updateFirmwareDeps").Outputs]);
fullfile(projObj.RootFolder,"toolbox/dependencies/firmware/**")]);

plan("buildDoc") = Task( ...
Description = "Build HTML doc from sources", ...
Expand All @@ -43,7 +38,7 @@
Description = "Package toolbox", ...
Dependencies = ["check" "test"], ...
Actions = @(~,toolboxVer,authorName) releaseTask(toolboxVer,authorName),...
Inputs = [plan("buildDoc").Outputs, plan("updateSGdeps").Outputs plan("updateFirmwareDeps").Outputs]);
Inputs = [plan("buildDoc").Outputs, plan("updateSGdeps").Outputs fullfile(projObj.RootFolder,"toolbox/dependencies/firmware/**")]);

% Set default tasks in the plan
plan.DefaultTasks = ["check" "test"];
Expand Down
6 changes: 1 addition & 5 deletions buildUtilities/testTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
runner.addPlugin(XMLPlugin.producingJUnitFormat(fullfile(projObj.RootFolder,'results.xml')));

results = runner.run(suite);

% CI workflows evaluate test success from Test Report
if ~batchStartupOptionUsed
results.assertSuccess;
end
results.assertSuccess;

end

Expand Down
16 changes: 0 additions & 16 deletions buildUtilities/updateFirmwareDeps.m

This file was deleted.

This file was deleted.

This file was deleted.