Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit f8ebfc0

Browse files
authored
Merge pull request #27 from mathworks/CI_78_matrix_build_support
Update README for Matrix build support.
2 parents 84aee1d + 70f7d48 commit f8ebfc0

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,51 @@ This option enables you to develop your custom MATLAB commands for running tests
6060

6161
![new_custom_script_example](https://user-images.githubusercontent.com/47204011/55625021-32904400-57c5-11e9-86b7-478b930796c0.png)
6262

63+
## Configuring "Multi-configuration"(matrix) project.
64+
The Jenkins plugin for MATLAB can be used inside of "Multi-configuration" (matrix) projects. Matrix projects allow jobs to be repeated with different configurations, such as testing on multiple platforms or testing against multiple MATLAB versions.
65+
66+
#### Matrix build for "Automatic" option.
67+
68+
1) Create a "Multi-configuration" project.
69+
70+
![image](https://user-images.githubusercontent.com/47204011/62458632-0e586a00-b79b-11e9-8611-3671adb8c289.png)
71+
72+
2) Add User-defined axis for different MATLAB versions as shown below.
73+
74+
![image](https://user-images.githubusercontent.com/47204011/62603081-c2c8cc00-b912-11e9-83a4-c5462f58f607.png)
75+
76+
3) Replace the User-defined axis variable in MATLAB root appropriately.
77+
78+
![image](https://user-images.githubusercontent.com/47204011/62459137-3c8a7980-b79c-11e9-9bee-305b4cabfd42.png)
79+
80+
4) Save and run the build.
81+
82+
#### Matrix build for "Custom" option.
83+
84+
1) Create a "Multi-configuration" project.
85+
86+
![image](https://user-images.githubusercontent.com/47204011/62458632-0e586a00-b79b-11e9-8611-3671adb8c289.png)
87+
88+
2) Add User-defined axis for different MATLAB versions as shown below.
89+
90+
![image](https://user-images.githubusercontent.com/47204011/62603081-c2c8cc00-b912-11e9-83a4-c5462f58f607.png)
91+
92+
3) Add another User-defined axis for custom commands as shown below.
93+
94+
![image](https://user-images.githubusercontent.com/47204011/62517774-b6c30880-b845-11e9-86a0-8344a281fb27.png)
95+
96+
4) Replace the User-defined axis variable in MATLAB root appropriately.
97+
98+
![image](https://user-images.githubusercontent.com/47204011/62459137-3c8a7980-b79c-11e9-9bee-305b4cabfd42.png)
99+
100+
5) Select "Custom" option from "Test mode" drop-down and replace User-defined axis variable for custom command appropriately.
101+
102+
![image](https://user-images.githubusercontent.com/47204011/62686681-cd529680-b9e2-11e9-82c1-c211f1740be4.png)
103+
104+
6) Save and run the build.
105+
106+
107+
Note: Axis variables can be replaced in either "$VAR" or "${VAR}" formats. Do not use complete MATLAB root path as axis values. Multi-configuration project creates separate workspace folder for each User-defined axis values with same name, and file separators in complete path will cause Jenkins build to fail as folder creation fails.
63108

64109
## Contact Us
65110
If you have any questions or suggestions, please feel free to contact MathWorks.

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ steps:
2626
publishJUnitResults: true
2727
testResultsFiles: '**/surefire-reports/TEST-*.xml'
2828
codeCoverageToolOption: 'cobertura'
29-
goals: 'package'
29+
goals: 'verify'
3030
displayName: 'Build $(imageName)'
3131

src/main/java/com/mathworks/ci/MatlabBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public TestRunTypeList getTestRunTypeList() {
9090
}
9191

9292
private String getLocalMatlab() {
93-
return this.env == null ? getLocalMatlab(): this.env.expand(getMatlabRoot());
93+
return this.env == null ? getMatlabRoot(): this.env.expand(getMatlabRoot());
9494
}
9595

9696
private String getCustomMatlabCommand() {

0 commit comments

Comments
 (0)