How to Run MATLAB in GitHub Actions - MATLAB
Video Player is loading.
Current Time 0:00
Duration 1:58
Loaded: 8.37%
Stream Type LIVE
Remaining Time 1:58
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    Video length is 1:58

    How to Run MATLAB in GitHub Actions

    Use MATLAB® with GitHub® Actions, a cloud-hosted continuous integration (CI) platform. Leverage the MATLAB CI configuration examples repository, explore how to set up and use prebuilt actions, leverage prewritten example tests, and see corresponding YAML files and learn the basics of modifying those files. You will learn how to build and test across multiple releases using the automation features of GitHub Actions.

    Published: 4 Apr 2023

    Wondering how to get started using CICD in the cloud? You can start by googling MATLAB CI examples. From here, you should see our CI configuration examples repository, which can help you get started on several popular CI platforms by simply creating a fork. Once I have my own fork, I'll show how to use this using GitHub actions.

    The first step on your new fork is to simply enable actions for the repository. Once you've done this, you are set up and ready to roll. You can immediately kick off a build and see GitHub Actions in action. GitHub Actions is a service hosted in the cloud, so you don't need to worry about orchestrating or maintaining your build runners.

    MATLAB's specific actions are available to enable you to set up MATLAB on a GitHub-hosted runner and run all the tests in your repository. All of this can be done from a small snippet of YAML code. In this YAML, you can see how these MATLAB-specific actions are used to set up MATLAB the build machine and easily run the tests-- no build server setup, no maintenance of hardware, or installing different versions of MATLAB.

    In fact, let's edit our workflow file and run a matrix build across all releases since R2000 2020A. You just list the releases in a matrix strategy and provide this parameter to the setup MATLAB action. Now this build will run on all these releases in parallel. In under five minutes, we can enable actions, confirm our fork successfully runs MATLAB tests, and now we are running at a second time across the five most recent releases in parallel.

    In this repository, you can also see more examples of how to leverage other CI platforms. If you have your own CI architecture or using a CI platform that is container oriented like GitLab CICD, you can also build your own MATLAB docker image using the new MATLAB package manager API to achieve similar results. Happy building.

    View more related videos