forked from odufour-mw/Simulink-Target-support-for-ED247
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
124 lines (114 loc) · 2.6 KB
/
.gitlab-ci.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
stages:
- environment-building
- prepare
- compile
- test
- package
.windows-task:
tags:
- Windows
variables:
MW_MINGW64_LOC: "C:\\Tools\\MinGW64\\4.9.2-airbus"
LIBXML_LOC: "$CI_PROJECT_DIR\\deps\\libxml2"
ED247_LOC: "$CI_PROJECT_DIR\\deps\\ed247"
QNX_LOC: "$CI_PROJECT_DIR\\deps\\ed247_qnx"
cache:
paths:
- $CI_PROJECT_DIR/deps
before_script:
- $env:Path = [System.Environment]::ExpandEnvironmentVariables([System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User"))
- $env:ED247_TOOLS = [System.Environment]::ExpandEnvironmentVariables([System.Environment]::GetEnvironmentVariable("ED247_TOOLS","Machine"))
script:
- launch_matlab $RELEASE -batch "$CMD"
.linux-task:
tags:
- Linux
- Docker
image: matlab-ed247:r2020b
variables:
ED247_LOC: $CI_PROJECT_DIR/deps/ed247
HOME: /tmp
cache:
paths:
- $CI_PROJECT_DIR/deps
script:
matlab -r "$CMD"
linux:container:
tags:
- Linux
- Docker
stage: environment-building
needs: []
image: docker:19.03.12
script:
- docker build . -t matlab-ed247:r2020b
linux:prepare:
stage: prepare
needs: ["linux:container"]
extends: .linux-task
variables:
RELEASE: R2020b
CMD: ci.Dependencies.runOnGitLabCI()
windows:prepare:
stage: prepare
needs: []
extends: .windows-task
variables:
RELEASE: R2020b
CMD: ci.Dependencies.runOnGitLabCI()
linux:mex:
stage: compile
needs: ["linux:prepare"]
extends: .linux-task
variables:
RELEASE: R2020b
CMD: ci.Compile.runOnGitLabCI()
artifacts:
name: Linux-MEX
paths:
- libraries/ed247/*.mex*
windows:mex:
stage: compile
needs: ["windows:prepare"]
extends: .windows-task
variables:
RELEASE: R2020b
CMD: ci.Compile.runOnGitLabCI()
artifacts:
name: Windows-MEX
paths:
- libraries/ed247/*.mex*
linux:test:
stage: test
needs: ["linux:mex"]
extends: .linux-task
variables:
RELEASE: R2020b
CMD: ci.Test.runOnGitLabCI()
artifacts:
reports:
cobertura: ./Coverage.xml
junit: ./TestResults.xml
windows:test:
stage: test
needs: ["windows:mex"]
extends: .windows-task
variables:
RELEASE: R2020b
CMD: ci.Test.runOnGitLabCI()
artifacts:
reports:
cobertura: ./Coverage.xml
junit: ./TestResults.xml
create-toolbox:
stage: package
needs: ["windows:mex","linux:mex"]
extends: .linux-task
only:
- master
variables:
RELEASE: R2020b
CMD: ci.Package.runOnGitLabCI()
artifacts:
paths:
- ./*.mltbx