Skip to content

Commit 0bb3f77

Browse files
committed
Revert "Re-enable cmake 4.1.2 and use install_vcpkg.sh to install vcpkg"
This reverts commit 440b9cf.
1 parent 440b9cf commit 0bb3f77

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

.github/workflows/cpp_extra.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ 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
373378
- name: Install ccache
374379
shell: bash
375380
run: |
@@ -389,23 +394,33 @@ jobs:
389394
path: ${{ steps.ccache-info.outputs.cache-dir }}
390395
key: cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
391396
restore-keys: cpp-odbc-ccache-windows-x64-
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
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
398404
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 }}
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
404412
shell: bash
405413
run: |
406-
ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
407-
- name: Add Vcpkg to PATH
408-
run: echo ${VCPKG_ROOT} >> $GITHUB_PATH
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"
409424
- name: Show vcpkg NuGet pwsh
410425
shell: pwsh
411426
run: |

0 commit comments

Comments
 (0)