@@ -14,55 +14,7 @@ variables:
14
14
stages :
15
15
- stage : Build
16
16
jobs :
17
- - job : buildWindows
18
- pool :
19
- vmImage : windows-latest
20
- variables :
21
- 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
22
- 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
23
- steps :
24
- - script : |
25
- echo "Hello"
26
- git submodule update --init --recursive
27
- cd external/vcpkg
28
- bootstrap-vcpkg.bat
29
- displayName: "Build vcpkg"
30
- - script : |
31
- external\vcpkg\vcpkg.exe integrate install
32
- external\vcpkg\vcpkg.exe install zlib:x64-windows-static
33
- mkdir .\build\Windows\64
34
- cd .\build\Windows\64
35
- cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x64-windows-static -A x64 ..\..\..\external\libzip
36
- cmake --build . --config Release -v
37
- displayName: "x64 Build"
38
- - script : |
39
- external\vcpkg\vcpkg.exe integrate install
40
- external\vcpkg\vcpkg.exe install zlib:x86-windows-static
41
- mkdir .\build\Windows\32
42
- cd .\build\Windows\32
43
- cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x86-windows-static -A Win32 ..\..\..\external\libzip
44
- cmake --build . --config Release -v
45
- displayName: "x86 Build"
46
- - task : ArchiveFiles@2
47
- inputs :
48
- rootFolderOrFile : build\Windows\32\lib\Release\zip.dll
49
- includeRootFolder : false
50
- archiveType : 7z
51
- replaceExistingArchive : true
52
- archiveFile : $(Build.ArtifactStagingDirectory)\libzip-windows-x86.7z
53
- - task : ArchiveFiles@2
54
- inputs :
55
- rootFolderOrFile : build\Windows\64\lib\Release\zip.dll
56
- includeRootFolder : false
57
- archiveType : 7z
58
- replaceExistingArchive : true
59
- archiveFile : $(Build.ArtifactStagingDirectory)\libzip-windows-x64.7z
60
- - task : PublishBuildArtifacts@1
61
- displayName : upload artifacts
62
- inputs :
63
- artifactName : ' native'
64
- pathtoPublish : $(Build.ArtifactStagingDirectory)
65
- - job : buildlinux
17
+ - job : buildLinux
66
18
pool :
67
19
vmImage : ubuntu-16.04
68
20
steps :
@@ -72,9 +24,9 @@ stages:
72
24
sudo apt -f -u install ninja-build gcc-multilib lib32z1-dev zlib1g-dev libssl-dev libssl1.1:i386 libssl-dev:i386 libc-dev:i386 libc6-dev-i386 -y
73
25
git submodule update --init --recursive
74
26
displayName: 'Install Tools'
75
- - bash : |
76
- patch --verbose -d external/libzip -p1 -l < libzip-static.patch
77
- displayName: 'Apply Patch'
27
+ # - bash: |
28
+ # patch --verbose -d external/libzip -p1 -l < libzip-static.patch
29
+ # displayName: 'Apply Patch'
78
30
- bash : |
79
31
./build_native
80
32
displayName: 'Build Linux x64'
@@ -84,14 +36,14 @@ stages:
84
36
displayName: 'Build Linux x86'
85
37
- task : ArchiveFiles@2
86
38
inputs :
87
- rootFolderOrFile : build/Linux/32/lib/libzip.so.5.1
39
+ rootFolderOrFile : build/Linux/32/lib/libzip.so.5.3
88
40
includeRootFolder : false
89
41
archiveType : 7z
90
42
replaceExistingArchive : true
91
43
archiveFile : $(Build.ArtifactStagingDirectory)/libzip-linux-x86.7z
92
44
- task : ArchiveFiles@2
93
45
inputs :
94
- rootFolderOrFile : build/Linux/64/lib/libzip.so.5.1
46
+ rootFolderOrFile : build/Linux/64/lib/libzip.so.5.3
95
47
includeRootFolder : false
96
48
archiveType : 7z
97
49
replaceExistingArchive : true
@@ -101,25 +53,25 @@ stages:
101
53
inputs :
102
54
artifactName : ' native'
103
55
pathtoPublish : $(Build.ArtifactStagingDirectory)
104
- - job : build
105
- dependsOn :
106
- - buildlinux
107
- - buildWindows
56
+ - job : buildMacOS
57
+ dependsOn : buildLinux
108
58
pool :
109
59
vmImage : macOS-10.14
110
60
steps :
111
61
- bash : |
112
- brew install p7zip ninja
62
+ brew tap xamarin/xamarin-android-windeps
63
+ brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/a6542037a48a55061a4c319e6bb174b3715f7cbe/Formula/mingw-w64.rb
64
+ brew install mingw-w64 p7zip
65
+ brew install ninja xamarin/xamarin-android-windeps/mingw-zlib
113
66
git submodule update --init --recursive
67
+ displayName: 'Install toolchain'
114
68
- bash : |
115
69
HOSTOS=Darwin ./build_native
116
- displayName: 'Build Darwin'
117
- - bash : |
70
+ ./build_windows
118
71
mkdir -p build/Linux/64
119
72
mkdir -p build/Linux/32
120
- mkdir -p build/Windows/64
121
- mkdir -p build/Windows/32
122
73
find build/* | grep libzip
74
+ displayName: 'Build native and Windows'
123
75
- task : DownloadBuildArtifacts@0
124
76
displayName : download artifacts
125
77
inputs :
@@ -135,23 +87,10 @@ stages:
135
87
inputs :
136
88
archiveFilePatterns : $(Build.ArtifactStagingDirectory)/native/libzip-linux-x86.7z
137
89
destinationFolder : build/Linux/32
138
- - task : ExtractFiles@1
139
- displayName : Extract 64 bit Windows native
140
- inputs :
141
- archiveFilePatterns : $(Build.ArtifactStagingDirectory)/native/libzip-windows-x64.7z
142
- destinationFolder : build/Windows/64
143
- - task : ExtractFiles@1
144
- displayName : Extract 32 bit Windows native
145
- inputs :
146
- archiveFilePatterns : $(Build.ArtifactStagingDirectory)/native/libzip-windows-x86.7z
147
- destinationFolder : build/Windows/32
148
90
- bash : |
149
- mv build/Linux/32/libzip.so.5.1 build/Linux/32/libzip.so
150
- mv build/Linux/64/libzip.so.5.1 build/Linux/64/libzip.so
151
- mv build/Windows/32/zip.dll build/Windows/32/libzip.dll
152
- mv build/Windows/64/zip.dll build/Windows/64/libzip.dll
91
+ mv build/Linux/32/libzip.so.5.3 build/Linux/32/libzip.so
92
+ mv build/Linux/64/libzip.so.5.3 build/Linux/64/libzip.so
153
93
rm $(Build.ArtifactStagingDirectory)/native/libzip-linux-*.7z
154
- rm $(Build.ArtifactStagingDirectory)/native/libzip-windows-*.7z
155
94
displayName: 'Find libzip'
156
95
- task : MSBuild@1
157
96
displayName : ' Build solution libZipSharp.csproj'
@@ -181,7 +120,7 @@ stages:
181
120
artifactName : ' nuget'
182
121
pathtoPublish : $(Build.ArtifactStagingDirectory)
183
122
- stage : Test
184
- dependsOn : Build
123
+ dependsOn : Build
185
124
jobs :
186
125
- job : testlinux
187
126
displayName : ' Test Linux'
@@ -199,37 +138,22 @@ stages:
199
138
solution : LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
200
139
configuration : Release
201
140
msbuildArguments : /restore /t:RunNunitTests /p:ReferenceNuget=True /v:diag
202
- - task : DotNetCoreCLI@2
203
- displayName : " Run Tests under .net Core"
204
- inputs :
205
- command : test
206
- projects : ' LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
207
- arguments : ' --configuration Release --framework netcoreapp3.1 --no-build'
208
141
- job : testmacos
209
142
displayName : ' Test MacOS'
210
143
pool :
211
- vmImage : macOS-10.14
144
+ vmImage : macOS-10.14
212
145
steps :
213
146
- task : DownloadBuildArtifacts@0
214
147
displayName : download artifacts
215
148
inputs :
216
149
artifactName : NuGet
217
150
downloadPath : $(Build.SourcesDirectory)
218
- - task : UseDotNet@2
219
- inputs :
220
- version : ' 3.1.x'
221
151
- task : MSBuild@1
222
152
displayName : ' Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
223
153
inputs :
224
154
solution : LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
225
155
configuration : Release
226
156
msbuildArguments : /restore /t:RunNunitTests /p:ReferenceNuget=True /v:diag
227
- # - task: DotNetCoreCLI@2
228
- # displayName: "Run Tests under .net Core"
229
- # inputs:
230
- # command: test
231
- # projects: 'LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
232
- # arguments: '--configuration Release --framework netcoreapp3.1 --no-build'
233
157
- job : testwindows
234
158
displayName : ' Test Windows'
235
159
pool :
@@ -241,7 +165,7 @@ stages:
241
165
artifactName : NuGet
242
166
downloadPath : $(Build.SourcesDirectory)
243
167
- task : MSBuild@1
244
- displayName : ' Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj and Run tests '
168
+ displayName : ' Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
245
169
inputs :
246
170
solution : LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
247
171
configuration : Release
0 commit comments