-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
95 lines (89 loc) · 2.16 KB
/
.gitlab-ci.yml
File metadata and controls
95 lines (89 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
stages:
# Set up two testing paths
- setup
- test
- deploy
- release
.setup_matlab_windows: &setup_matlab_windows
- $env:MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
- Set-Alias -Name matlab -Value "D:\MATLAB\$VERSION\bin\matlab-batch"
setup-job:
tags:
- training
- windows
stage: setup
script:
- cd ..
- if (test-path utilities) { rm -r -force utilities }
- git clone https://insidelabs-git.mathworks.com/modular-curriculum-content/utilities.git
- cd $CI_PROJECT_NAME
allow_failure: false
smoke-test:
parallel:
matrix:
- VERSION: [R2024b,R2025a,R2025b]
tags:
- training
- windows
stage: test
script:
- *setup_matlab_windows
- matlab "openProject(pwd);RunAllTests"
when: always
allow_failure: true
artifacts:
name: "$VERSION"
paths:
- public/*
when: always
pages:
variables:
VERSION: "R2025a"
tags:
- training
- windows
stage: deploy
script:
- *setup_matlab_windows
- matlab "openProject(pwd);PostSmokeTest;"
artifacts:
paths:
- public
file-test:
variables:
VERSION: "R2025a"
tags:
- training
- windows
stage: release
script:
- *setup_matlab_windows
- matlab "proj = openProject(pwd);
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
results = runtests('OpenCloseFileTest.m');
disp(table(results)); assertSuccess(results);"
rules:
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
when: always
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
when: manual
allow_failure: true
release-testing:
variables:
VERSION: "R2025a"
tags:
- training
- windows
stage: release
script:
- matlab "proj = openProject(pwd);
cd ..;
addpath(genpath(fullfile('utilities','TestingResources')));
addpath(genpath(fullfile('utilities','Tools')));
runCMTests"
rules:
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
when: always
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
when: manual
allow_failure: true