Coder Social home page Coder Social logo

scivision / setup-matlab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matlab-actions/setup-matlab

0.0 1.0 0.0 476 KB

Set up MATLAB on a GitHub-hosted runner.

License: BSD 3-Clause "New" or "Revised" License

JavaScript 1.13% TypeScript 98.87%

setup-matlab's 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 build and test your MATLAB project as part of your workflow. To execute code on the runner, include the Run MATLAB Build, Run MATLAB Tests, or Run MATLAB Command actions in your workflow.

Run MATLAB Build on GitHub-Hosted Runner

Set up a GitHub-hosted runner to run a specific task and its depended-on tasks that are specified in a file named buildfile.m in the root of your repository. To run tasks using the MATLAB build tool, include the Run MATLAB Build action in your workflow. This action is supported in MATLAB R2022b and later.

name: Run MATLAB Build on GitHub-Hosted Runner
on: [push]
jobs:
  my-job:
    name: Run MATLAB Build
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v3
      - name: Set up MATLAB
        uses: matlab-actions/setup-matlab@v1
      - name: Run build
        uses: matlab-actions/run-build@v1
        with:
          tasks: test

Run MATLAB Tests on GitHub-Hosted Runner

Set up a GitHub-hosted runner to 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@v3
      - 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

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@v3
      - name: Set up MATLAB
        uses: matlab-actions/setup-matlab@v1
      - name: Run script
        uses: matlab-actions/run-command@v1
        with:
          command: myscript

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: R2022a

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].

setup-matlab's People

Contributors

jwpereira avatar mcafaro avatar davidbuzinski avatar mw-hrastega avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.