@@ -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,20 @@ 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
404- 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
392+ - name : Install cmake
412393 shell : bash
413394 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"
395+ ci/scripts/install_cmake.sh 4.1.2 /usr
396+ - name : Retrieve VCPKG version from arrow/.env
397+ run : |
398+ vcpkg_version=$(. "arrow/.env" && echo "${VCPKG}")
399+ echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV
400+ - name : Install Vcpkg
401+ env :
402+ GITHUB_TOKEN : {{ '${{ secrets.GITHUB_TOKEN }}' }}
403+ run : arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
404+ - name : Add Vcpkg to PATH
405+ run : echo ${VCPKG_ROOT} >> $GITHUB_PATH
424406 - name : Show vcpkg NuGet pwsh
425407 shell : pwsh
426408 run : |
0 commit comments