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/Jenkinsfile
-
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/Jenkinsfile
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 types of products the workflow uses:
- Public project — The CI integration for MATLAB automatically licenses all products for you, except for transformation products, such as MATLAB Coder™ and MATLAB Compiler™.
- Private project — The CI integration does not automatically license any products for you.
To license products that are not automatically licensed, you can request a MATLAB batch licensing token by submitting the MATLAB Batch Licensing Pilot form. Batch licensing tokens are strings that enable MATLAB to start in noninteractive environments.
- Continuous Integration (CI) configuration examples for MATLAB
- Continuous Integration with MATLAB and Simulink®
If you encounter a product licensing issue, consider requesting a MATLAB batch licensing token to use in your workflow. For more information, see Licensing.
If you have an enhancement request or other feedback, create an issue on the Issues page.
For support, contact MathWorks Technical Support.