-
Notifications
You must be signed in to change notification settings - Fork 54
/
azure-pipelines.yml
182 lines (149 loc) · 4.22 KB
/
azure-pipelines.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
jobs:
- job: win32
displayName: 'Windows (32-bit)'
pool:
vmImage: 'windows-2022'
steps:
- task: DownloadSecureFile@1
name: R2012b
inputs:
secureFile: R2012b-win32.zip
- task: ExtractFiles@1
inputs:
archiveFilePatterns: $(R2012b.secureFilePath)
destinationFolder: ThirdParty/R2012b
- script: |
cmake -G "Visual Studio 17 2022" -A Win32 -B build -DMATLAB_DIR=ThirdParty/R2012b .
cmake --build build --config Release
displayName: Build generic S-function
- task: PublishPipelineArtifact@1
inputs:
path: sfun_fmurun.mexw32
artifact: win32
- job: win64
displayName: 'Windows (64-bit)'
pool:
vmImage: 'windows-2022'
steps:
- task: DownloadSecureFile@1
name: R2012b
inputs:
secureFile: R2012b-win64.zip
- task: ExtractFiles@1
inputs:
archiveFilePatterns: $(R2012b.secureFilePath)
destinationFolder: ThirdParty/R2012b
- script: |
cmake -G "Visual Studio 17 2022" -A x64 -B build -DMATLAB_DIR=ThirdParty/R2012b .
cmake --build build --config Release
displayName: Build generic S-function
- task: PublishPipelineArtifact@1
inputs:
path: sfun_fmurun.mexw64
artifact: win64
- job: maci64
displayName: 'macOS'
pool:
vmImage: 'macos-11'
steps:
- task: DownloadSecureFile@1
name: MATLAB
inputs:
secureFile: R2018b-maci64.zip
- task: ExtractFiles@1
inputs:
archiveFilePatterns: $(MATLAB.secureFilePath)
destinationFolder: ThirdParty/MATLAB
- script: |
cmake --version
cmake -B build -DMATLAB_DIR=$PWD/ThirdParty/MATLAB .
cmake --build build --config Release
displayName: Build generic S-function
- task: PublishPipelineArtifact@1
inputs:
path: sfun_fmurun.mexmaci64
artifact: maci64
- job: glnxa64
displayName: 'Linux'
dependsOn:
- maci64
- win32
- win64
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: |
mkdir dist
- task: DownloadPipelineArtifact@2
inputs:
artifact: maci64
targetPath: dist
- task: DownloadPipelineArtifact@2
inputs:
artifact: win32
targetPath: dist
- task: DownloadPipelineArtifact@2
inputs:
artifact: win64
targetPath: dist
- task: DownloadSecureFile@1
name: MATLAB
inputs:
secureFile: R2018b-linux64.tar.gz
- script: |
find .
- task: ExtractFiles@1
inputs:
archiveFilePatterns: $(MATLAB.secureFilePath)
destinationFolder: ThirdParty
- script: |
find ThirdParty
mkdir build
cd build
cmake --version
cmake -DMATLAB_DIR=ThirdParty/R2018b-linux64 ..
cmake --build . --config Release
cd ..
displayName: Build generic S-function
- script: |
python -m pip install markdown2
python docs/md2html.py
displayName: Generate HTML documentation
- script: |
python merge_sfun.py
displayName: Merge S-function source
- task: Maven@3
inputs:
mavenPomFile: Java/pom.xml
goals: install
- script: |
cp -r +FMIKit dist/+FMIKit
cp -r examples dist/examples
cp -r grtfmi dist/grtfmi
cp -r html dist/html
mkdir dist/include
cp include/fmi2Functions.h dist/include
cp include/fmi2FunctionTypes.h dist/include
cp include/fmi2TypesPlatform.h dist/include
cp include/fmi3Functions.h dist/include
cp include/fmi3FunctionTypes.h dist/include
cp include/fmi3PlatformTypes.h dist/include
cp -r rtwsfcnfmi dist/rtwsfcnfmi
cp FMIKit_blocks_R2012b.slx dist
cp fmikit.jar dist
cp FMU_bare.png dist
cp forms_rt.jar dist
cp info.xml dist
cp LICENSE.txt dist
cp README.md dist
cp sfun_fmurun.mexa64 dist
cp sfun_fmurun.c dist
cp slblocks.m dist
cp swingx-1.6.jar dist
cd dist
zip -r ../FMIKit-Simulink.zip *
displayName: Create distribution archive
- task: PublishPipelineArtifact@1
inputs:
path: FMIKit-Simulink.zip
artifact: dist