-
Notifications
You must be signed in to change notification settings - Fork 20
/
azure-pipelines.yml
150 lines (125 loc) · 4.54 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
# This pipeline builds WE-UQ and published the release artifacts
trigger:
- master
- release*
- conan
pr:
- master
variables:
- group: ConanVariables
strategy:
matrix:
linux:
imageName: "ubuntu-18.04"
CONAN_GCC_VERSIONS: 7
CONAN_CLANG_VERSIONS: ""
macOSXCatalina:
imageName: "macos-10.15"
CONAN_APPLE_CLANG_VERSIONS: 11.0
macOSXMojave:
imageName: "macos-10.14"
CONAN_APPLE_CLANG_VERSIONS: 11.0
windows:
imageName: "vs2017-win2016"
CONAN_VISUAL_VERSIONS: 15
CONAN_VISUAL_RUNTIMES: MD,MDd
maxParallel: 4
pool:
vmImage: $(imageName)
steps:
# Use Python version
- task: UsePythonVersion@0
displayName: Switch to Python 3.7
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- script: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install wheel
pip install conan --upgrade
conan user
conan remote add simcenter https://api.bintray.com/conan/nheri-simcenter/simcenter --insert 0
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
conan remote list
displayName: Conan Installation
- script: |
conan install qt/5.11.3@bincrafters/stable -o qt:qt3d=True -o qt:qtcharts=True -o qt:qttools=True -g virtualrunenv --build missing
displayName: Install Qt
- script: |
conan install mkl-static/2019.4@simcenter/stable --build
displayName: Install mkl-static Conan package(forcing build)
- script: |
mkdir build
cd build
conan install qt/5.11.3@bincrafters/stable -o qt:qt3d=True -o qt:qtcharts=True -o qt:qttools=True -g virtualrunenv
source activate_run.sh
qmake ../WE-UQ.pro "CONFIG+=Release"
make
condition: or(eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ))
displayName: Build WE-UQ on Linux or MacOS
- script: |
mkdir build
cd build
conan install qt/5.11.3@bincrafters/stable -o qt:qt3d=True -o qt:qtcharts=True -o qt:qttools=True -g virtualrunenv
call activate_run.bat
conan install jom_installer/1.1.2@bincrafters/stable -g virtualrunenv
call activate_run.bat
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
qmake ../WE-UQ.pro "CONFIG+=Release"
jom
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Build WE-UQ on Windows
- script: |
cd build
conan install qt/5.11.3@bincrafters/stable -o qt:qt3d=True -o qt:qtcharts=True -o qt:qttools=True -g virtualrunenv
source activate_run.sh
macdeployqt WE_UQ.app
zip -r WE-UQ_Mac.zip WE_UQ.app
mkdir Package
mv WE-UQ_MAC.zip Package
mv WE_UQ.app Package/WE_UQ.app
condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: Deploy Qt App on Mac
- script: |
cd build
conan install qt/5.11.3@bincrafters/stable -o qt:qt3d=True -o qt:qtcharts=True -o qt:qttools=True -g virtualrunenv
call activate_run.bat
mkdir Package\WE-UQ\applications
copy .\release\WE_UQ.exe Package\WE-UQ
xcopy /E /C .\release\applications Package\WE-UQ\applications
windeployqt Package\WE-UQ\WE_UQ.exe
powershell Compress-Archive -Path Package\WE-UQ -DestinationPath Package\WE-UQ_Windows_Download.zip
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Deploy Qt App on Windows
- task: PublishPipelineArtifact@1
inputs:
targetPath: './build/Package'
displayName: Publish WE-UQ Artifacts
condition: or(eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables['Agent.OS'], 'Darwin' ))
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: './build/Package'
artifactName: WE-UQ
condition: or(eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables['Agent.OS'], 'Darwin' ))
- script: |
cd build
conan install qt/5.11.3@bincrafters/stable -o qt:qt3d=True -o qt:qtcharts=True -o qt:qttools=True -g virtualrunenv
call activate_run.bat
conan install jom_installer/1.1.2@bincrafters/stable -g virtualrunenv
call activate_run.bat
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
qmake ../WE-UQTests.pro "CONFIG+=Release"
jom
cd Release
windeployqt WE-UQTests.exe
WE-UQTests.exe -xunitxml -o TestResults.xml
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Run Tests on Windows
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'build/Release/TestResults.xml'
testRunTitle: 'WE-UQ Workflow Tests'
condition: eq( variables['Agent.OS'], 'Windows_NT' )