Build and Install zlib 57/11757/16
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 12 Jul 2018 19:55:34 +0000 (15:55 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 18 Sep 2018 14:41:15 +0000 (10:41 -0400)
zlib libraries are needed to build several open source tools
on Windows.

Issue: RELENG-999
Change-Id: I137a07c3f9269c521f28f6f08d52c60a72bc1c76
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
provision/windows-builder.yaml

index d57cd95..e6bc00d 100644 (file)
       with_items:
         - visualstudio2017community
         - visualstudio2017-workload-nativedesktop
+
+    - name: Build and Install zlib
+      block:
+        - name: Ensure C:\temp exists
+          win_file:
+            path: C:\temp
+            state: directory
+        - name: Download zlib
+          win_get_url:
+            url: https://zlib.net/zlib1211.zip
+            dest: C:\temp\zlib.zip
+        - name: Unzip zlib
+          win_unzip:
+            src: C:\temp\zlib.zip
+            dest: C:\temp
+        - name: CMake
+          win_command: >
+              "C:\Program Files\CMake\Bin\cmake"
+              -DCMAKE_INSTALL_PREFIX=C:\lib\zlib
+              -G "Visual Studio 15 Win64"
+          args:
+            chdir: C:\temp\zlib-1.2.11
+        - name: msbuild
+          win_command: >
+              "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild"
+              zlib.sln
+          args:
+            chdir: C:\temp\zlib-1.2.11
+        - name: msbuild install
+          win_command: >
+              "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild"
+              INSTALL.vcxproj
+          args:
+            chdir: C:\temp\zlib-1.2.11
+        - name: Cleanup
+          win_file:
+            path: C:\temp
+            state: absent