forked from MaddTheSane/executor
-
Notifications
You must be signed in to change notification settings - Fork 10
/
azure-pipelines.yml
225 lines (199 loc) · 7.12 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
trigger:
- master
jobs:
- job: Windows
condition: true
pool:
vmImage: 'windows-2019'
steps:
- script: |
C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm bison"
displayName: 'msys/pacman install bison'
- script: |
pip install aqtinstall
C:
cd \
python -m aqt install -O C:\Qt 5.15.2 windows desktop win64_msvc2019_64
displayName: 'install qt'
- powershell: |
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/1.77.0/boost_1_77_0-msvc-14.2-64.exe/download"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\hostedtoolcache\windows\Boost\1.77.0\x86_64"
displayName: 'install boost'
- checkout: self
submodules: true
- script: |
mkdir build
cd build
set STUDIO=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
call "%STUDIO%\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\hostedtoolcache\windows\Boost\1.72.0\x86_64\lib64-msvc-14.2;%PATH%
cmake ^
.. ^
-G Ninja ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_C_COMPILER:FILEPATH=clang-cl.exe ^
-DCMAKE_CXX_COMPILER:FILEPATH=clang-cl.exe ^
-DCMAKE_LINKER:FILEPATH=lld-link.exe ^
-DCMAKE_PREFIX_PATH=C:\Qt\5.15.2\msvc2019_64\lib\cmake ^
-DBOOST_INCLUDEDIR=C:\hostedtoolcache\windows\Boost\1.77.0\x86_64 ^
-DBOOST_LIBRARYDIR=C:\hostedtoolcache\windows\Boost\1.77.0\x86_64\lib64-msvc-14.2 ^
-DBISON_COMMAND=c:\msys64\usr\bin\bison.exe ^
-DBoost_COMPILER=-vc142
type CMakeCache.txt
cmake --build .
displayName: 'Build'
- script: |
cd build
set STUDIO=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
call "%STUDIO%\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\hostedtoolcache\windows\Boost\1.72.0\lib;%PATH%
ctest . -LE xfail --no-compress-output -T test
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: build/Testing/**/*.xml
buildPlatform: 'x86_64-win64'
- script: |
cd build
set STUDIO=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
call "%STUDIO%\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\Program Files\LLVM\bin;C:\hostedtoolcache\windows\Boost\1.72.0\lib;%PATH%
cpack
displayName: 'CPack'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: build/Executor2000-0.1.0-win64.zip
artifactName: Executor2000-win64.zip
- job: WindowsMingw
condition: true
pool:
vmImage: 'windows-2019'
steps:
- script: |
set MSYSTEM=MINGW64
C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm bison perl ruby"
C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake"
C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm mingw-w64-x86_64-qt5 mingw-w64-x86_64-boost"
displayName: 'install msys packages'
- checkout: self
submodules: true
- script: |
mkdir build
cd build
set MSYSTEM=MINGW64
set CHERE_INVOKING=1
C:\msys64\usr\bin\bash --login -c "cmake .. -G 'MinGW Makefiles' -DCMAKE_BUILD_TYPE=Release && cmake --build ."
displayName: 'Build'
- script: |
cd build
set MSYSTEM=MINGW64
set CHERE_INVOKING=1
C:\msys64\usr\bin\bash --login -c "ctest . -LE xfail --no-compress-output -T test || true"
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: build/Testing/**/*.xml
buildPlatform: 'x86_64-mingw'
- script: |
cd build
set MSYSTEM=MINGW64
set CHERE_INVOKING=1
C:\msys64\usr\bin\bash --login -c "cpack"
displayName: 'CPack'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: build/Executor2000-0.1.0-win64-mingw.zip
artifactName: Executor2000-win64-mingw.zip
- job: macOS
condition: true
pool:
vmImage: 'macOS-12'
steps:
- checkout: self
submodules: true
- script: |
brew install boost qt@5 ninja ruby
displayName: 'Brew prerequisites'
- script: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5/lib/cmake
cmake --build .
displayName: Build
- script: |
cd build
ctest . -LE xfail --no-compress-output -T test || true
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: build/Testing/**/*.xml
buildPlatform: 'x86_64-macos'
- script: |
cd build
# hack: for some reason homebrew write-locks this framework.
# it is then copied by the fixup_bundle command, preserving the write-lock
# ... and that causes it to fail.
chmod +w /usr/local/Cellar/qt@5/*/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport
cpack
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: build/Executor2000-0.1.0-macOS.dmg
artifactName: Executor2000-macOS.dmg
- job: Linux
condition: true
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: true
- script: |
docker build -f docker/Dockerfile.x86_64 . -t executor-buildtools64
displayName: 'Install prerequisites'
- script: |
docker run --rm -v `pwd`:/files executor-buildtools64 sh -c 'mkdir -p build && cd build && cmake .. -G Ninja && cmake --build .'
displayName: 'Build'
- script: |
docker run --rm -v `pwd`:/files executor-buildtools64 sh -c 'cd build && ctest . -LE xfail --no-compress-output -T test || true'
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: build/Testing/**/*.xml
buildPlatform: 'x86_64-linux'
- script: |
docker run --rm -v `pwd`:/files executor-buildtools64 sh -c 'cd build && cpack'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: build/Executor2000-0.1.0-Linux.tar.bz2
artifactName: Executor2000-Linux.tar.bz2
- job: Linux32
condition: true
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: true
- script: |
docker build -f docker/Dockerfile.i386 . -t executor-buildtools32
displayName: 'Install prerequisites'
- script: |
docker run --rm -v `pwd`:/files executor-buildtools32 sh -c 'mkdir -p build && cd build && cmake .. -G Ninja && cmake --build .'
displayName: 'Build'
- script: |
docker run --rm -v `pwd`:/files executor-buildtools32 sh -c 'cd build && ctest . -LE xfail --no-compress-output -T test || true'
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: build/Testing/**/*.xml
buildPlatform: 'i386-linux'
- script: |
docker run --rm -v `pwd`:/files executor-buildtools32 sh -c 'cd build && cpack'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: build/Executor2000-0.1.0-Linux.tar.bz2
artifactName: Executor2000-Linux32.tar.bz2