|
1 | 1 | You can use the Jenkins™ plugin for MATLAB® in freestyle and multi-configuration projects. This guide demonstrates how to run MATLAB code on Jenkins, considering a Microsoft® Windows® platform. |
2 | 2 |
|
3 | | -- [Add MATLAB to System Path](#add-matlab-to-system-path) |
| 3 | +- [Use MATLAB for Build](#use-matlab-for-build) |
4 | 4 | - [Specify Build Steps](#specify-build-steps) |
5 | 5 | - [Run MATLAB Tests](#run-matlab-tests) |
6 | 6 | - [Run MATLAB Command](#run-matlab-command) |
7 | 7 | - [Set Up Freestyle Project](#set-up-freestyle-project) |
8 | 8 | - [Set Up Multi-Configuration Project](#set-up-multi-configuration-project) |
9 | 9 |
|
10 | | -## Add MATLAB to System Path |
| 10 | +## Use MATLAB for Build |
11 | 11 | Once you install the plugin on Jenkins, the **Use MATLAB version** checkbox appears in the **Build Environment** section of the project configuration window. |
12 | 12 |
|
13 | 13 |  |
14 | 14 |
|
15 | | -Select the **Use MATLAB version** checkbox to specify the full path to the MATLAB root folder that should be used for the build. The specified directory in the **MATLAB root** box is prepended to the PATH environment variable, and the matlab.exe file in the bin subdirectory is used to perform the build. You must not leave the **MATLAB root** box blank if no MATLAB directory exists on the path. If you do not select the checkbox or if you leave the text box blank, then the system tries to use the MATLAB directory closest to the top of the system path. |
| 15 | +Select the **Use MATLAB version** checkbox to specify the full path to the MATLAB root folder that should be used for the build. The information in the **MATLAB root** box enables the plugin to prepend MATLAB to the PATH environment variable of the build agent. |
| 16 | + |
| 17 | +If the build agent already has your desired MATLAB on the path, then you are not required to select the **Use MATLAB version** checkbox. When the checkbox is clear, the plugin uses the MATLAB directory closest to the top of the path. The build fails if the plugin cannot find MATLAB on the path. |
16 | 18 |
|
17 | 19 | ## Specify Build Steps |
18 | 20 | When you set up the **Build** section of the project configuration window, the plugin provides you with the **Run MATLAB Tests** and **Run MATLAB Command** build steps. |
@@ -67,9 +69,7 @@ You can define several axes in the **Configuration Matrix** section. For example |
67 | 69 |
|
68 | 70 |  |
69 | 71 |
|
70 | | -2) In the **Build Environment** section, select **Use MATLAB version** and then specify the locations where MATLAB is installed using the user-defined axis name. (You can skip this step if MATLAB has already been added to the path on the build agents.) |
71 | | - |
72 | | - In this example, **$VERSION** in the **MATLAB root** box will be replaced by one axis value per build iteration. |
| 72 | +2) In the **Build Environment** section, select **Use MATLAB version** and then specify the locations where MATLAB is installed using the user-defined axis name. In this example, **$VERSION** in the **MATLAB root** box will be replaced by one axis value per build iteration. |
73 | 73 |
|
74 | 74 |  |
75 | 75 |
|
|
0 commit comments