@@ -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,25 @@ 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=$(. ".env" && echo "${VCPKG}")
400+ echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV
401+ - name : Set Vcpkg PATH
402+ shell : pwsh
403+ run : |
404+ echo "VCPKG_ROOT=${{ github.workspace }}\vcpkg" >> $env:GITHUB_ENV
405+ - name : Install Vcpkg
406+ env :
407+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
408+ shell : bash
409+ run : |
410+ ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
424411 - name : Show vcpkg NuGet pwsh
425412 shell : pwsh
426413 run : |
0 commit comments