@@ -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,28 @@ 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
394+ run : |
395+ ci/scripts/install_cmake.sh 4.1.2 /usr
396+ - name : Retrieve VCPKG version from arrow/.env
397+ shell : bash
398+ run : |
399+ vcpkg_version=$(. ".env" && echo "${VCPKG}")
400+ echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV
401+ - name : Install Vcpkg
402+ env :
403+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
404+ shell : bash
405+ run : |
406+ ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
407+ - name : Add Vcpkg to PATH
404408 run : |
405- vcpkg\bootstrap-vcpkg.bat
406409 $VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
407410 Write-Output ${VCPKG_ROOT} | `
408411 Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
409412 Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
410413 Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
411- - name : Setup NuGet credentials for vcpkg caching
412- shell : bash
413- 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"
424414 - name : Show vcpkg NuGet pwsh
425415 shell : pwsh
426416 run : |
0 commit comments