From 45104f4c04827645539d70add4ff6362defc37b5 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 30 May 2025 08:00:27 +0200 Subject: [PATCH] Revert "Use NuGet for vcpkg cache" This reverts commit d6287603396de8f3cc0c83e763c775b36cadca46. --- .github/workflows/ResInsightWithCache.yml | 43 +++++------------------ 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ResInsightWithCache.yml b/.github/workflows/ResInsightWithCache.yml index 83151144cb..9ecd71a705 100644 --- a/.github/workflows/ResInsightWithCache.yml +++ b/.github/workflows/ResInsightWithCache.yml @@ -66,10 +66,7 @@ jobs: BUILD_TYPE: Release BUILDCACHE_DIR: ${{ github.workspace }}/buildcache_dir BUILDCACHE_ACCURACY: SLOPPY - USERNAME: magnesj - VCPKG_EXE: ${{ github.workspace }}/ThirdParty/vcpkg/vcpkg${{ matrix.config.os == 'windows-2022' && '.exe' || '' }} - FEED_URL: https://nuget.pkg.github.com/ceetronsolutions/index.json - VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/ceetronsolutions/index.json,readwrite" + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" steps: - name: Checkout @@ -158,7 +155,6 @@ jobs: run: | sudo apt-get update --option="APT::Acquire::Retries=3" sudo apt-get install --option="APT::Acquire::Retries=3" libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev libhdf5-dev - sudo apt install mono-complete - name: Install clang-19 if: contains( matrix.config.cc, 'clang') @@ -181,38 +177,17 @@ jobs: run: | ThirdParty/vcpkg/${{ matrix.config.vcpkg-bootstrap }} - - name: Configure NuGet for binary caching (Linux) - if: runner.os == 'Linux' - run: | - mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ - sources add \ - -Source "${{ env.FEED_URL }}" \ - -StorePasswordInClearText \ - -Name GitHubPackages \ - -UserName "${{ env.USERNAME }}" \ - -Password "${{ secrets.GH_PACKAGES_TOKEN }}" - mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ - setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" \ - -Source "${{ env.FEED_URL }}" - - - name: Configure NuGet for binary caching (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: | - .$(${{ env.VCPKG_EXE }} fetch nuget) ` - sources add ` - -Source "${{ env.FEED_URL }}" ` - -StorePasswordInClearText ` - -Name GitHubPackages ` - -UserName "${{ env.USERNAME }}" ` - -Password "${{ secrets.GH_PACKAGES_TOKEN }}" - .$(${{ env.VCPKG_EXE }} fetch nuget) ` - setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" ` - -Source "${{ env.FEED_URL }}" - + - name: Restore vcpkg cache + id: vcpkg-cache + uses: TAServers/vcpkg-cache@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Configure shell: bash env: + VCPKG_FEATURE_FLAGS: "binarycaching" # Possibly redundant, but explicitly sets the binary caching feature flag + VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite" CC: ${{ matrix.config.cc }} CXX: ${{ matrix.config.cxx }} run: >