Skip to content

Feature request: Adding a timelimit option #84

@zaikunzhang

Description

@zaikunzhang

Hello,

Thank you again for these life-changing facilities of providing MATLAB on GitHub Actions.

Being probably one of the heaviest users of the facilities, may I request the following feature? It would be great if you could consider it.

  • The request. May I request adding a timelimit option to run-command? If the commands being executed do not stop before the value of timelimit, then terminate the current step and mark it as a success.

  • An example.

name: A time-consuming step
uses: matlab-actions/run-commans@v2
with:
   timelimit: 5h  # The maximum time allowed. If the commands below do not finish before this value, then terminate the step and mark it as a success.
   command:
       command1;
       command2;
       ...       
  • The motivation. As an example, imagine that you would like to stress test a piece of MATLAB software on large problems. For such a stress test, you regard it as a success as long as the code does not run into errors within a few hours. However, as a stress test, it will unlikely finish within six hours, the hard limit for the running time of GitHub-hosted runners; if it runs over six hours, GitHub will mark it as a failure, which is not desirable. That is why we may like to terminate the job within the prescribed timelimit value and mark the step as a success.

  • The implementation. Below is an example by me, but it works only with bash commands. Since we cannot run MATLAB in bash after matlab-actions/setup-matlab, an update on the run-command side would be great!

    https://github.com/equipez/run-bash-command/blob/main/run.sh

Thank you for your consideration.

Best wishes,
Zaikun
PhD and Professor in Applied Mathematics
Sun Yat-sent University

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions