From 979b064b037f39912c2ab2ff382a4aaf8c7fb2b2 Mon Sep 17 00:00:00 2001
From: David Li
Date: Tue, 4 Aug 2026 10:55:51 +0900
Subject: [PATCH 1/4] ci: use common vcpkg setup script for Windows CI
Assisted-by: GPT-5.6 Sol
---
.github/workflows/native-windows.yml | 12 +++++-------
ci/scripts/install_vcpkg.sh | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/native-windows.yml b/.github/workflows/native-windows.yml
index 2a8d0c22b6..10e889a943 100644
--- a/.github/workflows/native-windows.yml
+++ b/.github/workflows/native-windows.yml
@@ -382,13 +382,11 @@ jobs:
# Needed for gendef tool in GoUtils.cmake
pacman --noconfirm -S mingw-w64-x86_64-tools
- # TODO(https://github.com/apache/arrow-adbc/issues/3825)
- - name: Clone vcpkg
- run: |
- git clone https://github.com/microsoft/vcpkg.git
- cd vcpkg
- git checkout ef7dbf94b9198bc58f45951adcf1f041fcbc5ea0
- .\bootstrap-vcpkg.bat
+ - name: Install vcpkg
+ shell: bash
+ env:
+ VCPKG_ROOT: ${{ github.workspace }}/vcpkg
+ run: ci/scripts/install_vcpkg.sh "$VCPKG_ROOT"
- name: Install vcpkg dependencies
working-directory: c
env:
diff --git a/ci/scripts/install_vcpkg.sh b/ci/scripts/install_vcpkg.sh
index 1908fc541c..743c15ce2c 100755
--- a/ci/scripts/install_vcpkg.sh
+++ b/ci/scripts/install_vcpkg.sh
@@ -35,7 +35,7 @@ vcpkg_version=${2:-$default_vcpkg_version}
vcpkg_ports_patch=${3:-$default_vcpkg_ports_patch}
# reduce the fetched data using a shallow clone
-git clone --shallow-since=2025-09-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
+git clone --shallow-since=2026-05-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
pushd ${vcpkg_destination}
From b5f48c6b7640aa8fcdd8cc816dcd51a821078613 Mon Sep 17 00:00:00 2001
From: David Li
Date: Tue, 4 Aug 2026 11:00:48 +0900
Subject: [PATCH 2/4] discard comments
---
ci/scripts/install_vcpkg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ci/scripts/install_vcpkg.sh b/ci/scripts/install_vcpkg.sh
index 743c15ce2c..6af80b9217 100755
--- a/ci/scripts/install_vcpkg.sh
+++ b/ci/scripts/install_vcpkg.sh
@@ -27,7 +27,7 @@ if [ "$#" -lt 1 ]; then
fi
arrow_dir=$(cd -- "$(dirname -- "$0")/../.." && pwd -P)
-default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
+default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG" | cut -d "=" -f2 | awk '{print $1}' | tr -d '"')
default_vcpkg_ports_patch="${arrow_dir}/ci/vcpkg/ports.patch"
vcpkg_destination=$1
From a68a922f35be350f00b6f58233b43e748eb44b83 Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 5 Aug 2026 12:55:33 +0900
Subject: [PATCH 3/4] remove more manual vcpkg installation spots
---
.github/workflows/java.yml | 5 ++---
.github/workflows/packaging.yml | 29 +++++------------------------
2 files changed, 7 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index 1eea725139..74182b8a23 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -127,13 +127,12 @@ jobs:
cache: "maven"
distribution: "temurin"
java-version: 11
- - name: Retrieve Go, VCPKG version from .env
+ - name: Retrieve Go from .env
run: |
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
- (. .env && echo "VCPKG_VERSION=${VCPKG}") >> $GITHUB_ENV
- name: Install vcpkg
run: |
- ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
+ ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "${{ env.GO_VERSION }}"
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index 441d5c1206..b0d707cb74 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -810,18 +810,10 @@ jobs:
- name: Install Homebrew dependencies
run: brew install autoconf bash pkg-config ninja
- - name: Retrieve VCPKG version from .env
- id: vcpkg_version
- run: |
- pushd adbc
- vcpkg_version=$(cat ".env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
- echo "VCPKG_VERSION=$vcpkg_version" | tee -a "$GITHUB_ENV"
- popd
-
- name: Install vcpkg
run: |
pushd adbc
- ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
+ ci/scripts/install_vcpkg.sh $VCPKG_ROOT
popd
- name: Get required Go version
@@ -952,8 +944,7 @@ jobs:
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
env:
PYTHON_VERSION: "${{ matrix.python_version }}"
- # Where to install vcpkg
- VCPKG_ROOT: "${{ github.workspace }}\\vcpkg"
+ VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
@@ -990,21 +981,11 @@ jobs:
choco install --no-progress -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install --no-progress -y visualcpp-build-tools
- - name: Retrieve VCPKG version from .env
- shell: pwsh
- run: |
- pushd adbc
- Select-String -Path .env -Pattern 'VCPKG="(.+)"' | % {"VCPKG_VERSION=$($_.matches.groups[1])"} >> $env:GITHUB_ENV
- popd
-
- name: Install vcpkg
- shell: pwsh
+ shell: bash
run: |
- echo $env:VCPKG_VERSION
- git clone --shallow-since=2024-06-01 https://github.com/microsoft/vcpkg $env:VCPKG_ROOT
- pushd $env:VCPKG_ROOT
- .\bootstrap-vcpkg.bat -disableMetrics
- popd
+ cd adbc
+ ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
From 2d4402ed1920f3e6dd237e655e90cb342e2fbfd0 Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 5 Aug 2026 13:05:09 +0900
Subject: [PATCH 4/4] nits
---
.github/workflows/java.yml | 2 +-
.github/workflows/packaging.yml | 4 ++--
ci/scripts/install_vcpkg.sh | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
index 74182b8a23..2fb37e113f 100644
--- a/.github/workflows/java.yml
+++ b/.github/workflows/java.yml
@@ -132,7 +132,7 @@ jobs:
(. .env && echo "GO_VERSION=${GO}") >> $GITHUB_ENV
- name: Install vcpkg
run: |
- ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT
+ ./ci/scripts/install_vcpkg.sh "$VCPKG_ROOT"
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "${{ env.GO_VERSION }}"
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index b0d707cb74..596addbbb1 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -813,7 +813,7 @@ jobs:
- name: Install vcpkg
run: |
pushd adbc
- ci/scripts/install_vcpkg.sh $VCPKG_ROOT
+ ci/scripts/install_vcpkg.sh "$VCPKG_ROOT"
popd
- name: Get required Go version
@@ -985,7 +985,7 @@ jobs:
shell: bash
run: |
cd adbc
- ./ci/scripts/install_vcpkg.sh $VCPKG_ROOT
+ ./ci/scripts/install_vcpkg.sh "$VCPKG_ROOT"
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
diff --git a/ci/scripts/install_vcpkg.sh b/ci/scripts/install_vcpkg.sh
index 6af80b9217..5e911b7cad 100755
--- a/ci/scripts/install_vcpkg.sh
+++ b/ci/scripts/install_vcpkg.sh
@@ -27,7 +27,7 @@ if [ "$#" -lt 1 ]; then
fi
arrow_dir=$(cd -- "$(dirname -- "$0")/../.." && pwd -P)
-default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG" | cut -d "=" -f2 | awk '{print $1}' | tr -d '"')
+default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG=" | cut -d "=" -f2 | awk '{print $1}' | tr -d '"')
default_vcpkg_ports_patch="${arrow_dir}/ci/vcpkg/ports.patch"
vcpkg_destination=$1