{"id":3303,"date":"2025-06-19T14:52:05","date_gmt":"2025-06-19T18:52:05","guid":{"rendered":"https:\/\/blogs.mathworks.com\/developer\/?p=3303"},"modified":"2025-06-19T16:11:06","modified_gmt":"2025-06-19T20:11:06","slug":"ci-for-example","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/developer\/2025\/06\/19\/ci-for-example\/","title":{"rendered":"CI, for example"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction-->\r\n<p>Hello everyone, it has been a long time! I am excited to resurrect the conversation a bit here because we have a number of topics that are in the pipeline. Actually, there have always been plenty of topics in the ol' blog pipeline, but the good news now is that we actually have been able to sit down and write some of them.<\/p>\r\n<p>Over the next little while Ajay Puvvala will be publishing a series of posts related to some exciting features we have in MATLAB around test selection. Super exciting stuff so be sure to keep an eye out for these.<\/p>\r\n<p>While you wait, I also wanted to quickly plug a couple of GitHub repositories that we've published to help with your CI workflows.<\/p>\r\n<!--\/introduction-->\r\n<h3>Contents<\/h3>\r\n<div>\r\n<ul>\r\n<li>\r\n<a href=\"#19155a1d-a79b-4ace-99ee-8873b9c1b5ad\">The simplest config that works<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#36f92e4e-f9a1-4824-8f89-1e8bdd8b119c\">(Slightly) more advanced configurations<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#4bfda38c-9869-4c61-ba8e-f70adbcecb64\">Multi-platform Toolbox Creation<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#552350a2-6694-4821-89fe-69827e2f70a3\">Multi-release deployment to integrate with Python&reg;<\/a>\r\n<\/li>\r\n<\/ul>\r\n<\/div>\r\n<h4>The simplest config that works<a name=\"19155a1d-a79b-4ace-99ee-8873b9c1b5ad\"><\/a>\r\n<\/h4>\r\n<p>First, if you want to just get up and going on your CI platform with the simplest of configs, take a look at the <a href=\"https:\/\/github.com\/mathworks\/ci-configuration-examples\">CI Configuration Examples<\/a> repository. This shows a basic \"Hello World!\" example for GitHub&reg; Actions, GitLab&reg; CI\/CD, Jenkins&trade;, Azure&reg; DevOps, and CircleCI&reg;. You can go there right now, fork it, and immediately use cloud hosted runners on GitHub, Azure DevOps, or CircleCI to see the CI process in action. Note, GitHub makes it particularly easy because Actions are just built into GitHub itself.<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/developer\/files\/2025-ci-config-examples.png\" alt=\"\"> <\/p>\r\n<h4>(Slightly) more advanced configurations<a name=\"36f92e4e-f9a1-4824-8f89-1e8bdd8b119c\"><\/a>\r\n<\/h4>\r\n<p>Additionally, for those looking for more advanced configurations, check out the <a href=\"https:\/\/github.com\/mathworks\/advanced-ci-configuration-examples\">Advanced CI Configuration Examples<\/a> repository. This includes more complex setups and best practices for integrating MATLAB with these CI\/CD tools. In this repository you will currently find two workflows that are demonstrated on 4 CI platforms: GitHub Actions, Azure DevOps, Jenkins, and CircleCI.<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/developer\/files\/2025-advanced-config.png\" alt=\"\"> <\/p>\r\n<h4>Multi-platform Toolbox Creation<a name=\"4bfda38c-9869-4c61-ba8e-f70adbcecb64\"><\/a>\r\n<\/h4>\r\n<p>The first example goes through the build of a MATLAB toolbox across 3 platforms to produce and release a single <b><tt>.mltbx<\/tt><\/b> file. This workflow currently shows:<\/p>\r\n<div>\r\n<ul>\r\n<li>How to use a matrix build across platforms (Linux, Windows, and Mac)<\/li>\r\n<li>Building platform specific mex files<\/li>\r\n<li>Uploading these artifacts on each<\/li>\r\n<li>Retrieving the built mex files for each platform and packaging the toolbox<\/li>\r\n<li>Publishing the toolbox to a GitHub release for distribution<\/li>\r\n<\/ul>\r\n<\/div>\r\n<h4>Multi-release deployment to integrate with Python&reg;<a name=\"552350a2-6694-4821-89fe-69827e2f70a3\"><\/a>\r\n<\/h4>\r\n<p>The second example shows how you can leverage the MATLAB Compiler SDK&trade; to create a python package from this algorithm. It does this across releases and operating systems. Some highlights of this workflow:<\/p>\r\n<div>\r\n<ul>\r\n<li>A double matrix build (across MATLAB releases and operating systems)<\/li>\r\n<li>Creation and deployment of a python package from the MATLAB code using Compiler SDK<\/li>\r\n<li>Equivalence testing of the deployed algorithm using <a href=\"https:\/\/www.mathworks.com\/products\/matlab-test.html\">MATLAB Test<\/a>\r\n<\/li>\r\n<li>Using <a href=\"https:\/\/github.com\/mathworks-ref-arch\/matlab-dockerfile\/blob\/main\/alternates\/non-interactive\/MATLAB-BATCH.md\">batch tokens<\/a> for licensing of MATLAB Compiler SDK on cloud hosted runners. While licensing of many MathWorks products is provided for public projects, batch tokens allow you to leverage other products not supported (like Coders and Compilers). They also enable you to leverage CI for private projects.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<p>It's great to be back! Stay tuned for more and we'd love to hear how you are doing and what you'd like to learn more about!<\/p>\r\n<script language=\"JavaScript\"> <!-- \r\n    function grabCode_926d43d8b90b4d5a9eadbd68596b9931() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='926d43d8b90b4d5a9eadbd68596b9931 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 926d43d8b90b4d5a9eadbd68596b9931';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2025 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\">\r\n<br>\r\n<a href=\"javascript:grabCode_926d43d8b90b4d5a9eadbd68596b9931()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript>\r\n<\/span><\/a>\r\n<br>\r\n<br>\r\n      Published with MATLAB&reg; R2025a<br>\r\n<\/p>\r\n<\/div>\r\n<!--\r\n926d43d8b90b4d5a9eadbd68596b9931 ##### SOURCE BEGIN #####\r\n%%\r\n% Hello everyone, it has been a long time! I am excited to resurrect the\r\n% conversation a bit here because we have a number of topics that are in\r\n% the pipeline. Actually, there have always been plenty of topics in the\r\n% ol' blog pipeline, but the good news now is that we actually have been\r\n% able to sit down and write some of them.\r\n%\r\n% Over the next little while Ajay Puvvala will be publishing a series of\r\n% posts related to some exciting features we have in MATLAB around test\r\n% selection. Super exciting stuff so be sure to keep an eye out for these.\r\n%\r\n% While you wait, I also wanted to quickly plug a couple of GitHub\r\n% repositories that we've published to help with your CI workflows. \r\n%\r\n%% The simplest config that works\r\n% First, if you want to just get up and going on your CI platform with the\r\n% simplest of configs, take a look at the\r\n% <https:\/\/github.com\/mathworks\/ci-configuration-examples CI Configuration\r\n% Examples> repository. This shows a basic \"Hello World!\" example for\r\n% GitHub(R) Actions, GitLab(R) CI\/CD, Jenkins(TM), Azure(R) DevOps, and\r\n% CircleCI(R). You can go there right now, fork it, and immediately use\r\n% cloud hosted runners on GitHub, Azure DevOps, or CircleCI to see the CI\r\n% process in action. Note, GitHub makes it particularly easy because\r\n% Actions are just built into GitHub itself.\r\n%\r\n% <<2025-ci-config-examples.png>>\r\n%\r\n%\r\n%% (Slightly) more advanced configurations\r\n% Additionally, for those looking for more advanced configurations, check out the\r\n% <https:\/\/github.com\/mathworks\/advanced-ci-configuration-examples Advanced CI Configuration\r\n% Examples> repository. This includes more complex setups and best practices\r\n% for integrating MATLAB with these CI\/CD tools. In this repository you\r\n% will currently find two workflows that are demonstrated on 4 CI\r\n% platforms: GitHub Actions, Azure DevOps, Jenkins, and CircleCI.\r\n%\r\n% <<2025-advanced-config.png>>\r\n%\r\n%% Multi-platform Toolbox Creation\r\n% The first example goes through the build of a MATLAB toolbox across 3\r\n% platforms to produce and release a single *|.mltbx|* file. This workflow\r\n% currently shows:\r\n% \r\n% * How to use a matrix build across platforms (Linux, Windows, and Mac)\r\n% * Building platform specific mex files\r\n% * Uploading these artifacts on each \r\n% * Retrieving the built mex files for each platform and packaging the\r\n% toolbox\r\n% * Publishing the toolbox to a GitHub release for distribution\r\n% \r\n%% Multi-release deployment to integrate with Python(R)\r\n% The second example shows how you can leverage the MATLAB Compiler SDK(TM)\r\n% to create a python package from this algorithm. It does this across\r\n% releases and operating systems. Some highlights of this workflow:\r\n%\r\n% * A double matrix build (across MATLAB releases and operating systems)\r\n% * Creation and deployment of a python package from the MATLAB code using\r\n% Compiler SDK\r\n% * Equivalence testing of the deployed algorithm using\r\n% <https:\/\/www.mathworks.com\/products\/matlab-test.html MATLAB Test>\r\n% * Using\r\n% <https:\/\/github.com\/mathworks-ref-arch\/matlab-dockerfile\/blob\/main\/alternates\/non-interactive\/MATLAB-BATCH.md\r\n% batch tokens> for licensing of MATLAB Compiler SDK on cloud hosted\r\n% runners. While licensing of many MathWorks products is provided for public\r\n% projects, batch tokens allow you to leverage other products not supported\r\n% (like Coders and Compilers). They also enable you to leverage CI for\r\n% private projects.\r\n%\r\n% It's great to be back! Stay tuned for more and we'd love to hear how you\r\n% are doing and what you'd like to learn more about!\r\n##### SOURCE END ##### 926d43d8b90b4d5a9eadbd68596b9931\r\n-->\r\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/developer\/files\/2025-advanced-config.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction-->\r\n<p>Hello everyone, it has been a long time! I am excited to resurrect the conversation a bit here because we have a number of topics that are in the pipeline. Actually, there have always been plenty of topics in the ol' blog pipeline, but the good news now is that we actually have been able to sit down and write some of them.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/developer\/2025\/06\/19\/ci-for-example\/\">read more >><\/a><\/p>","protected":false},"author":90,"featured_media":3321,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39,4,17,21,44,28,33],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/posts\/3303"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/comments?post=3303"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/posts\/3303\/revisions"}],"predecessor-version":[{"id":3336,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/posts\/3303\/revisions\/3336"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/media\/3321"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/media?parent=3303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/categories?post=3303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/developer\/wp-json\/wp\/v2\/tags?post=3303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}