Skip to content

Commit

Permalink
Add build-options (#16)
Browse files Browse the repository at this point in the history
* Added build options

* Update dependency

* Fixed parameter name

* Trying with if: always()

* Trying with continue-on-error

* Removed if: always()

* Fixed test case

* Update parameter name to build-options

* prep for release (#18)

* use new run-command version (#19)

* use new run-command version

* update package-lock too

* [skip ci] Bump v2.0.0

* Omitted by default addition of -ignoreUnknownOptions flag

* Bumped matlab-actions/run-matlab-command version

* Added build options

* Update dependency

* Fixed parameter name

* Trying with if: always()

* Trying with continue-on-error

* Removed if: always()

* Fixed test case

* Update parameter name to build-options

* Omitted by default addition of -ignoreUnknownOptions flag

* Bumped matlab-actions/run-matlab-command version

* Fix package-lock merge conflict

---------

Co-authored-by: David Buzinski <[email protected]>
Co-authored-by: Release Action <>
  • Loading branch information
mw-kapilg and davidbuzinski authored Feb 13, 2024
1 parent cd5dea1 commit 73d7093
Show file tree
Hide file tree
Showing 6 changed files with 2,938 additions and 135 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/bat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
function checkTask(~)
f = fopen('buildlog.txt', 'a+'); fprintf(f, 'checking\n'); fclose(f);
function errorTask(~)
f = fopen('buildlog.txt', 'a+'); fprintf(f, 'erroring\n'); fclose(f);
error('Error occured in errorTask');
_EOF
- name: Run build with default tasks
Expand Down Expand Up @@ -93,3 +97,35 @@ jobs:
! grep "check" buildlog2.txt
rm buildlog.txt
rm buildlog2.txt
- name: Run build with task skipping
uses: ./
with:
tasks: deploy
build-options: -skip test

- name: Verify correct tasks appear in buildlog.txt
run: |
set -e
grep "building" buildlog.txt
! grep "testing" buildlog.txt
grep "deploying" buildlog.txt
! grep "checking" buildlog.txt
rm buildlog.txt
- name: Run build with continue on failure
continue-on-error: true
uses: ./
with:
tasks: error deploy
build-options: -continueOnFailure

- name: Verify correct tasks appear in buildlog.txt
run: |
set -e
grep "erroring" buildlog.txt
grep "building" buildlog.txt
grep "testing" buildlog.txt
grep "deploying" buildlog.txt
! grep "checking" buildlog.txt
rm buildlog.txt
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ inputs:
Space-separated list of tasks to run
required: false
default: ""
build-options:
description: >-
Build options for MATLAB build tool
required: false
default: ""
startup-options:
description: >-
Startup options for MATLAB
Expand Down
Loading

0 comments on commit 73d7093

Please sign in to comment.