Skip to content

Commit ae99acd

Browse files
committed
install zlib using vcpkg
Signed-off-by: Junwang Zhao <[email protected]>
1 parent 73e64a7 commit ae99acd

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ jobs:
7272
shell: bash
7373
run: ci/scripts/build_example.sh $(pwd)/example
7474
windows:
75-
name: AMD64 Windows 2019
76-
runs-on: windows-2019
75+
name: AMD64 Windows 2022
76+
runs-on: windows-2022
7777
timeout-minutes: 30
7878
steps:
7979
- name: Checkout iceberg-cpp
@@ -83,14 +83,14 @@ jobs:
8383
- name: Install ZLIB
8484
shell: cmd
8585
run: |
86-
powershell -Command "(Invoke-WebRequest -Uri https://git.io/JnHTY -OutFile install_zlib.bat)"; ./install_zlib.bat; del install_zlib.bat
86+
vcpkg install zlib:x64-windows
8787
- name: Build Iceberg
8888
shell: cmd
8989
run: |
90-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
91-
bash -c "ci/scripts/build_iceberg.sh $(pwd)
90+
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
91+
bash -c "ci/scripts/build_iceberg_windows.sh $(pwd)
9292
- name: Build Example
9393
shell: cmd
9494
run: |
95-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
95+
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
9696
bash -c "ci/scripts/build_example.sh $(pwd)/example
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
set -eux
21+
22+
source_dir=${1}
23+
build_dir=${1}/build
24+
25+
mkdir ${build_dir}
26+
pushd ${build_dir}
27+
28+
cmake \
29+
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-${ICEBERG_HOME}} \
30+
-DICEBERG_BUILD_STATIC=ON \
31+
-DICEBERG_BUILD_SHARED=ON \
32+
${source_dir} \
33+
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
34+
cmake --build . --target install
35+
ctest --output-on-failure -C Debug
36+
37+
popd
38+
39+
# clean up between builds
40+
rm -rf ${build_dir}

0 commit comments

Comments
 (0)