This repository includes examples of advanced workflows in MATLAB® for common CI platforms. For example, you can use matrix-build templates to package and distribute toolboxes across operating systems or build and deploy standalone applications for multiple MATLAB releases. The repository includes all the required source code, tests, and configuration files for each workflow and CI platform.
This repository provides workflow examples for these platforms:
For starter workflows, use the ci-configuration-examples
repository instead.
The repository contains examples for packaging and distributing a toolbox, as well as building and uploading Python® packages.
-
Package and Distribute Toolbox: Using a matrix build across multiple platforms, compile, link, and test your C source files to produce a binary MEX file per operating system. Then, bundle the resulting binaries into a toolbox and distribute it as a GitHub release.
To access the configuration files for this workflow, follow the links in this table.
Platform File Path Azure DevOps AzureDevOps/ToolboxDistribution.yml
CircleCI .circleci/ToolboxDistribution.yml
GitHub Actions .github/workflows/ToolboxDistribution.yml
Jenkins Jenkins/ToolboxDistribution.yml
-
Build and Upload Python Packages: Using a matrix build across multiple platforms and MATLAB releases, build python packages by compiling MATLAB functions (requires MATLAB Compiler SDK™) and upload the resulting packages as artifacts.
To access the configuration files for this workflow, follow the links in this table.
Platform File Path Azure DevOps AzureDevOps/CrossPlatformBuilder.yml
CircleCI .circleci/CrossPlatformBuilder.yml
GitHub Actions .github/workflows/CrossPlatformBuilder.yml
Jenkins Jenkins/CrossPlatformBuilder.yml
Here's how to quickly get this repository running on a CI system:
- Fork the repository to your own GitHub account.
- Go to one of the supported CI platforms and install the available CI integration for MATLAB. (GitHub Actions does not require this step.)
- Create a new CI job using your forked repository. You need to specify which file to use based on the workflow you intend to run.
- Enjoy using MATLAB with CI!
That's really it!
Product licensing for your workflow depends on your project visibility as well as the type of products to install:
- Public project — If your workflow does not include transformation products, such as MATLAB Coder™ and MATLAB Compiler, then MathWorks® automatically licenses any products that you install. If your workflow includes transformation products, you can request a MATLAB batch licensing token by submitting the MATLAB Batch Licensing Pilot form.
- Private project — MathWorks does not automatically license any products for you. You can request a batch licensing token by submitting the MATLAB Batch Licensing Pilot form.
- Continuous Integration (CI) configuration examples for MATLAB
- Continuous Integration with MATLAB and Simulink®
If you have any questions or suggestions, contact MathWorks at continuous-integration@mathworks.com.