@@ -18,9 +18,6 @@ stages:
18
18
- job : buildWindows
19
19
pool :
20
20
vmImage : windows-latest
21
- variables :
22
- LIBZIP_FEATURES : -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DBUILD_TOOLS=OFF -DBUILD_REGRESS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF
23
- COMMON_CMAKE_PARAMS : -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
24
21
steps :
25
22
- script : |
26
23
echo "Hello"
@@ -31,25 +28,8 @@ stages:
31
28
git apply -v ../../libzip-changes.patch
32
29
displayName: "Apply Patches"
33
30
- script : |
34
- cd external/vcpkg
35
- bootstrap-vcpkg.bat
36
- displayName: "Build vcpkg"
37
- - script : |
38
- external\vcpkg\vcpkg.exe integrate install
39
- external\vcpkg\vcpkg.exe install zlib:x64-windows-static
40
- mkdir .\build\Windows\64
41
- cd .\build\Windows\64
42
- cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x64-windows-static -A x64 ..\..\..\external\libzip
43
- cmake --build . --config Release -v
44
- displayName: "x64 Build"
45
- - script : |
46
- external\vcpkg\vcpkg.exe integrate install
47
- external\vcpkg\vcpkg.exe install zlib:x86-windows-static
48
- mkdir .\build\Windows\32
49
- cd .\build\Windows\32
50
- cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x86-windows-static -A Win32 ..\..\..\external\libzip
51
- cmake --build . --config Release -v
52
- displayName: "x86 Build"
31
+ build_windows.bat
32
+ displayName: "Build"
53
33
- task : ArchiveFiles@2
54
34
inputs :
55
35
rootFolderOrFile : build\Windows\32\lib\Release\zip.dll
@@ -196,6 +176,8 @@ stages:
196
176
pathtoPublish : $(Build.ArtifactStagingDirectory)
197
177
- stage : Test
198
178
dependsOn : Build
179
+ variables :
180
+ DotNetCoreVersion : 3.1.201
199
181
jobs :
200
182
- job : testlinux
201
183
displayName : ' Test Linux'
@@ -213,11 +195,20 @@ stages:
213
195
solution : LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
214
196
configuration : Release
215
197
msbuildArguments : /restore /t:RunNunitTests /p:ReferenceNuget=True /v:diag
198
+ - task : DotNetCoreCLI@2
199
+ displayName : " Run Tests under .net Core"
200
+ inputs :
201
+ command : test
202
+ projects : ' LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
203
+ arguments : ' --configuration Release --framework netcoreapp3.1 --no-build'
216
204
- job : testmacos
217
205
displayName : ' Test MacOS'
218
206
pool :
219
207
vmImage : macOS-10.14
220
208
steps :
209
+ - template : yaml-templates/use-dot-net.yaml
210
+ parameters :
211
+ version : $(DotNetCoreVersion)
221
212
- task : DownloadBuildArtifacts@0
222
213
displayName : download artifacts
223
214
inputs :
@@ -234,6 +225,9 @@ stages:
234
225
pool :
235
226
vmImage : windows-2019
236
227
steps :
228
+ - template : yaml-templates/use-dot-net.yaml
229
+ parameters :
230
+ version : $(DotNetCoreVersion)
237
231
- task : DownloadBuildArtifacts@0
238
232
displayName : download artifacts
239
233
inputs :
0 commit comments