Skip to content

Commit c7a816c

Browse files
committed
Re-enable cmake 4.1.2 and use install_vcpkg.sh to install vcpkg
1 parent 0897b02 commit c7a816c

File tree

1 file changed

+13
-29
lines changed

1 file changed

+13
-29
lines changed

.github/workflows/cpp_extra.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,6 @@ jobs:
370370
- name: Download Timezone Database
371371
shell: bash
372372
run: ci/scripts/download_tz_database.sh
373-
# Disable cmake for make it work with vcpkg.
374-
# - name: Install cmake
375-
# shell: bash
376-
# run: |
377-
# ci/scripts/install_cmake.sh 4.1.2 /usr
378373
- name: Install ccache
379374
shell: bash
380375
run: |
@@ -394,33 +389,22 @@ jobs:
394389
path: ${{ steps.ccache-info.outputs.cache-dir }}
395390
key: cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
396391
restore-keys: cpp-odbc-ccache-windows-x64-
397-
- name: Checkout vcpkg
398-
uses: actions/checkout@v6
399-
with:
400-
fetch-depth: 0
401-
path: vcpkg
402-
repository: microsoft/vcpkg
403-
- name: Bootstrap vcpkg
392+
- name: Install cmake
393+
shell: bash
404394
run: |
405-
vcpkg\bootstrap-vcpkg.bat
406-
$VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
407-
Write-Output ${VCPKG_ROOT} | `
408-
Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
409-
Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
410-
Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
411-
- name: Setup NuGet credentials for vcpkg caching
395+
ci/scripts/install_cmake.sh 4.1.2 /usr
396+
- name: Retrieve VCPKG version from arrow/.env
412397
shell: bash
413398
run: |
414-
$(vcpkg fetch nuget | tail -n 1) \
415-
sources add \
416-
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
417-
-storepasswordincleartext \
418-
-name "GitHub" \
419-
-username "$GITHUB_REPOSITORY_OWNER" \
420-
-password "${{ secrets.GITHUB_TOKEN }}"
421-
$(vcpkg fetch nuget | tail -n 1) \
422-
setapikey "${{ secrets.GITHUB_TOKEN }}" \
423-
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
399+
vcpkg_version=$(. "$(pwd)/.env" && echo "${VCPKG}")
400+
echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV
401+
- name: Install Vcpkg
402+
env:
403+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
404+
run: |
405+
arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
406+
- name: Add Vcpkg to PATH
407+
run: echo ${VCPKG_ROOT} >> $GITHUB_PATH
424408
- name: Show vcpkg NuGet pwsh
425409
shell: pwsh
426410
run: |

0 commit comments

Comments
 (0)