• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

matlab-actions/setup-matlab: Set up MATLAB on a GitHub-hosted runner.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

matlab-actions/setup-matlab

开源软件地址(OpenSource Url):

https://github.com/matlab-actions/setup-matlab

开源编程语言(OpenSource Language):

TypeScript 98.9%

开源软件介绍(OpenSource Introduction):

Action for Setting Up MATLAB on GitHub-Hosted Runner

Before you run MATLAB® code and Simulink® models on a GitHub®-hosted runner, first use the Setup MATLAB action. The action sets up the specified MATLAB release on a Linux® virtual machine. If you do not specify a release, the action sets up the latest release of MATLAB.

The Setup MATLAB action is not supported on self-hosted runners. Currently, it is available only for public projects. It does not set up transformation products, such as MATLAB Coder™ and MATLAB Compiler™.

Usage Examples

Once you set up MATLAB, you can use the runner to execute MATLAB scripts, functions, or statements. You also can use the runner to execute MATLAB and Simulink tests and generate artifacts. To execute code on the runner, include the Run MATLAB Command or Run MATLAB Tests actions in your workflow.

Run MATLAB Script on GitHub-Hosted Runner

Set up a GitHub-hosted runner to run the commands in a file named myscript.m in the root of your repository. To run the script, include the Run MATLAB Command action in your workflow.

name: Run MATLAB Script on GitHub-Hosted Runner
on: [push]
jobs:
  my-job:
    name: Run MATLAB Script
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v2
      - name: Set up MATLAB
        uses: matlab-actions/setup-matlab@v1
      - name: Run script
        uses: matlab-actions/run-command@v1
        with:
          command: myscript

Run MATLAB Tests on GitHub-Hosted Runner

Set up a GitHub-hosted runner to automatically run the tests in your MATLAB project and generate a JUnit test results report and a Cobertura code coverage report. To run the tests and generate the artifacts, include the Run MATLAB Tests action in your workflow.

name: Run MATLAB Tests on GitHub-Hosted Runner
on: [push]
jobs:
  my-job:
    name: Run MATLAB Tests and Generate Artifacts
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v2
      - name: Set up MATLAB
        uses: matlab-actions/setup-matlab@v1
      - name: Run tests and generate artifacts
        uses: matlab-actions/run-tests@v1
        with:
          test-results-junit: test-results/results.xml
          code-coverage-cobertura: code-coverage/coverage.xml

Set Up MATLAB

When you define your workflow in the .github/workflows directory of your repository, specify the Setup MATLAB action as matlab-actions/setup-matlab@v1. The action accepts an optional input.

Input Description
release (Optional) MATLAB release to set up. You can specify R2020a or a later release. If you do not specify release, the action sets up the latest release of MATLAB.
Example: R2021a

Notes

When you use the Setup MATLAB action, you execute third-party code that is licensed under separate terms.

See Also

Contact Us

If you have any questions or suggestions, please contact MathWorks® at [email protected].




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap