@@ -5,83 +5,91 @@ stages:
55 - deploy
66 - release
77
8- setup-job :
9- tags :
10- - matlab
11- stage : setup
12- script :
13- - cd ..
14- - if (test-path utilities) { rm -r -force utilities }
15- - git clone git@insidelabs-git.mathworks.com:modular-curriculum-content/utilities.git
16- - cd $CI_PROJECT_NAME
17- allow_failure : false
8+ .setup_matlab_windows : &setup_matlab_windows
9+ - $env:MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
10+ - Set-Alias -Name matlab -Value "D:\MATLAB\$VERSION\bin\matlab-batch"
1811
12+ setup-job :
13+ tags :
14+ - training
15+ - windows
16+ stage : setup
17+ script :
18+ - cd ..
19+ - if (test-path utilities) { rm -r -force utilities }
20+ - git clone https://insidelabs-git.mathworks.com/modular-curriculum-content/utilities.git
21+ - cd $CI_PROJECT_NAME
22+ allow_failure : false
1923
2024smoke-test :
21- # Smoke tests should run all the time
22- tags :
23- # Add additional tags like (e.g. - arduino) as required
24- # Make sure that the runner you plan to use matches the tags
25- - matlab
26- stage : test
27- parallel :
28- matrix :
29- - VERSION : [R2024a,R2024b]
30- script :
31- - Set-Alias -Name matlab -Value "C:\Program Files\MATLAB\$VERSION\bin\matlab.exe"
32- - matlab -batch "openProject(pwd);RunAllTests"
33- when : always
34- allow_failure : true
35- artifacts :
36- name : " $VERSION"
37- paths :
38- - public/*
39- when : always
40-
25+ parallel :
26+ matrix :
27+ - VERSION : [R2024b,R2025a,R2025b]
28+ tags :
29+ - training
30+ - windows
31+ stage : test
32+ script :
33+ - *setup_matlab_windows
34+ - matlab "openProject(pwd);RunAllTests"
35+ when : always
36+ allow_failure : true
37+ artifacts :
38+ name : " $VERSION"
39+ paths :
40+ - public/*
41+ when : always
4142
4243pages :
43- tags :
44- - matlab
45- stage : deploy
46- script :
47- - matlab -batch "openProject(pwd);PostSmokeTest;"
48- artifacts :
49- paths :
50- - public
44+ variables :
45+ VERSION : " R2025a"
46+ tags :
47+ - training
48+ - windows
49+ stage : deploy
50+ script :
51+ - *setup_matlab_windows
52+ - matlab "openProject(pwd);PostSmokeTest;"
53+ artifacts :
54+ paths :
55+ - public
5156
5257file-test :
53- tags :
54- - matlab
55- stage : release
56- script :
57- - matlab -batch "proj = openProject(pwd);
58- addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
59- results = runtests('OpenCloseFileTest.m');
60- disp(table(results)); assertSuccess(results);"
61- rules :
62- # This test should always run when merging to main
63- # And be available for manual running on any push
64- - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
65- when : always
66- - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
67- when : manual
68- allow_failure : true
58+ variables :
59+ VERSION : " R2025a"
60+ tags :
61+ - training
62+ - windows
63+ stage : release
64+ script :
65+ - *setup_matlab_windows
66+ - matlab "proj = openProject(pwd);
67+ addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
68+ results = runtests('OpenCloseFileTest.m');
69+ disp(table(results)); assertSuccess(results);"
70+ rules :
71+ - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
72+ when : always
73+ - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
74+ when : manual
75+ allow_failure : true
6976
7077release-testing :
71- tags :
72- - matlab
73- stage : release
74- script :
75- - matlab -batch "proj = openProject(pwd);
76- cd ..;
77- addpath(genpath(fullfile('utilities','TestingResources')));
78- addpath(genpath(fullfile('utilities','Tools')));
79- runCMTests"
80- rules :
81- # This test should always run when merging to main
82- # And be available for manual running on any push
83- - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
84- when : always
85- - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
86- when : manual
87- allow_failure : true
78+ variables :
79+ VERSION : " R2025a"
80+ tags :
81+ - training
82+ - windows
83+ stage : release
84+ script :
85+ - matlab "proj = openProject(pwd);
86+ cd ..;
87+ addpath(genpath(fullfile('utilities','TestingResources')));
88+ addpath(genpath(fullfile('utilities','Tools')));
89+ runCMTests"
90+ rules :
91+ - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
92+ when : always
93+ - if : $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
94+ when : manual
95+ allow_failure : true
0 commit comments