]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: drop vcpkg cache and most vcpkg logic with it
authorViktor Szakats <commit@vsz.me>
Sat, 26 Apr 2025 16:37:39 +0000 (18:37 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 29 Apr 2025 17:35:55 +0000 (19:35 +0200)
The unplanned dropping of the granular vcpkg binary cache indeed fell
into the cracks between Microsoft's various departments. The old method
is now official dropped, without replacement either on the vcpkg side or
the GitHub cache provider side.

Without a granular cache, vcpkg is impractical for builds larger than
a small dependency tree in CI, for performance reasons.

A granular cache is critical for CI use. Building dependencies is not
a goal of this CI, so a more desirable option would be pre-built binary
downloads. This would also allow keeping job timeouts low, which is
important for quick iteration in GHA when a flaky job requiring a manual
retry needs all other jobs to finish first. (GHA often disregards
step timeouts, which is another contributing factor here.)

Windows remains tested extensively with MSYS2, curl-for-win, and via
AppVeyor CI with MSVC + OpenSSL, and also in GHA via scaled back vcpkg
jobs that perform well without caching. What's lost is the recently
added Android OpenSSL build tests.

We may consider building/cachine important dependencies manually as in
GHA/linux-http3, and/or try integrating MSVC jobs with MSYS2 UCRT DLLs.

Ref: https://github.com/microsoft/vcpkg-tool/pull/1662
Ref: https://github.com/microsoft/vcpkg/issues/45073

Follow-up to cd0ec4784c1c0f873939f33ec1a73c8739f276b9 #17089
Follow-up to e3912f0f9fac06d37cd1ab93cef4f01f33809f0b #17086
Follow-up to 15fb1dc7f86ad1832e0386ec7d92542f44ee9c44 #17069

Closes #17200

.github/workflows/non-native.yml
.github/workflows/windows.yml

index d7d2fa8fe9c37c27d700acd0368de7f175a19e0e..b360343089c8afc6701c0348619f21ab28846e74 100644 (file)
@@ -399,8 +399,6 @@ jobs:
     timeout-minutes: 25
     env:
       MAKEFLAGS: -j 5
-      VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
-      VCPKG_DISABLE_METRICS: '1'
     strategy:
       matrix:
         include:
@@ -418,35 +416,6 @@ jobs:
 
       fail-fast: false
     steps:
-      - name: 'vcpkg cache setup'
-        if: ${{ matrix.install }}
-        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
-        with:
-          script: |
-            core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
-            core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
-
-      - name: 'vcpkg versions'
-        if: ${{ matrix.install }}
-        timeout-minutes: 1
-        run: |
-          git -C "$VCPKG_INSTALLATION_ROOT" show --no-patch --format='%H %ai'
-          vcpkg version
-
-      - name: 'install prereqs for vcpkg'
-        if: contains(matrix.install, 'boringssl')
-        timeout-minutes: 5
-        run: |
-          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get -o Dpkg::Use-Pty=0 update
-          sudo rm -f /var/lib/man-db/auto-update
-          sudo apt-get -o Dpkg::Use-Pty=0 install nasm
-
-      - name: 'vcpkg build'
-        if: ${{ matrix.install }}
-        timeout-minutes: 20
-        run: vcpkg x-set-installed ${{ matrix.install }} '--triplet=arm64-android'
-
       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
         with:
           persist-credentials: false
@@ -457,15 +426,11 @@ jobs:
 
       - name: 'configure'
         run: |
-          export PKG_CONFIG_PATH="$VCPKG_INSTALLATION_ROOT/installed/arm64-android/lib/pkgconfig"
           if [ '${{ matrix.build }}' = 'cmake' ]; then  # https://developer.android.com/ndk/guides/cmake
             cmake -B bld -G Ninja \
               -DANDROID_ABI=arm64-v8a \
               -DANDROID_PLATFORM='android-${{ matrix.platform }}' \
-              -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
-              -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DCMAKE_WARN_DEPRECATED=OFF \
-              -DVCPKG_INSTALLED_DIR="$VCPKG_INSTALLATION_ROOT/installed" \
-              -DVCPKG_TARGET_TRIPLET=arm64-android \
+              -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DCMAKE_WARN_DEPRECATED=OFF \
               -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
               -DCURL_WERROR=ON \
               ${{ matrix.options }}
index 1075ff2ca397f59583066607752e3c4b49ce94b2..2ec6a885e2fc2eebd1615016080527c5541b0678 100644 (file)
@@ -766,7 +766,6 @@ jobs:
         shell: msys2 {0}
     env:
       openssh_windows-version: 'v9.8.1.0p1-Preview'
-      VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
       VCPKG_DISABLE_METRICS: '1'
     strategy:
       matrix:
@@ -809,87 +808,6 @@ jobs:
               -DUSE_WIN32_IDN=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON
               -DCURL_USE_LIBPSL=OFF
 
-          #- name: 'openssl +examples'
-          #  install: 'brotli zlib zstd        nghttp2 nghttp3 openssl libssh2'
-          #  arch: 'x64'
-          #  plat: 'uwp'
-          #  type: 'Debug'
-          #  tflags: 'skiprun'
-          #  config: >-
-          #    -DENABLE_DEBUG=ON
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON
-          #    -DCURL_USE_LIBPSL=OFF
-          #
-          #- name: 'openssl'
-          #  install: 'brotli zlib zstd libpsl nghttp2 nghttp3 openssl libssh2 pkgconf gsasl c-ares libuv krb5'
-          #  arch: 'x64'
-          #  plat: 'windows'
-          #  type: 'Debug'
-          #  config: >-
-          #    -DENABLE_DEBUG=ON
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON
-          #    -DCURL_USE_GSASL=ON -DENABLE_ARES=ON -DCURL_USE_LIBUV=ON -DCURL_USE_GSSAPI=ON
-          #
-          #- name: 'schannel MultiSSL U'
-          #  install: 'brotli zlib zstd libpsl nghttp2 libssh2[core,zlib] pkgconf gsasl openssl mbedtls wolfssl'
-          #  arch: 'x64'
-          #  plat: 'windows'
-          #  type: 'Debug'
-          #  config: >-
-          #    -DENABLE_DEBUG=ON
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=ON -DCURL_USE_OPENSSL=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_WOLFSSL=ON -DCURL_DEFAULT_SSL_BACKEND=schannel
-          #    -DCURL_USE_GSASL=ON -DUSE_WIN32_IDN=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON
-          #
-          #- name: 'libressl'
-          #  install: 'brotli zlib zstd libpsl nghttp2 libressl libssh2[core,zlib] pkgconf ngtcp2[libressl] nghttp3'
-          #  arch: 'x64'
-          #  plat: 'windows'
-          #  type: 'Debug'
-          #  openssh: 'OpenSSH-Windows'
-          #  config: >-
-          #    -DENABLE_DEBUG=ON
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON -DUSE_NGTCP2=ON
-          #    -DCURL_CA_SEARCH_SAFE=ON -DUSE_SSLS_EXPORT=ON
-          #
-          #- name: 'boringssl'
-          #  install: 'brotli zlib zstd libpsl nghttp2 boringssl libssh2[core,zlib]'
-          #  arch: 'x64'
-          #  plat: 'windows'
-          #  type: 'Debug'
-          #  config: >-
-          #    -DENABLE_DEBUG=OFF
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON
-          #    -DUSE_ECH=ON
-          #
-          #- name: 'wolfssl +examples'
-          #  install: 'brotli zlib zstd libpsl nghttp2 wolfssl libssh2 pkgconf gsasl ngtcp2[wolfssl] nghttp3'
-          #  arch: 'x64'
-          #  plat: 'windows'
-          #  type: 'Debug'
-          #  config: >-
-          #    -DENABLE_DEBUG=ON
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=OFF -DCURL_USE_WOLFSSL=ON -DUSE_NGTCP2=ON
-          #    -DCURL_USE_GSASL=ON
-          #    -DUSE_ECH=ON
-          #
-          #- name: 'mbedtls'
-          #  install: 'brotli zlib zstd libpsl nghttp2 mbedtls libssh2 pkgconf gsasl'
-          #  arch: 'x64'
-          #  plat: 'windows'
-          #  type: 'Debug'
-          #  chkprefill: '_chkprefill'
-          #  config: >-
-          #    -DENABLE_DEBUG=ON
-          #    -DCURL_USE_LIBSSH2=ON
-          #    -DCURL_USE_SCHANNEL=OFF -DCURL_USE_MBEDTLS=ON
-          #    -DCURL_USE_GSASL=ON
-
       fail-fast: false
     steps:
       - uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # v2
@@ -899,13 +817,6 @@ jobs:
           cache: ${{ contains(matrix.image, 'arm') }}
           path-type: inherit
 
-      - name: 'vcpkg cache setup'
-        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
-        with:
-          script: |
-            core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
-            core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
-
       - name: 'vcpkg versions'
         timeout-minutes: 1
         run: |