Add vcpkg download cache and retry steps to linux CI job

Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-08 15:44:09 +00:00
parent 3eb2bfb7a9
commit 1c7a914083

View File

@ -52,6 +52,33 @@ jobs:
- name: Mark workspace safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Cache vcpkg downloads
uses: actions/cache@v4
with:
path: submodules/vcpkg/downloads
key: ${{ runner.os }}-vcpkg-downloads-${{ hashFiles('submodules/vcpkg/vcpkg.json', 'submodules/vcpkg/ports/**', 'submodules/vcpkg/versions/**') }}
restore-keys: |
${{ runner.os }}-vcpkg-downloads-
- name: vcpkg install (retry)
working-directory: ${{ github.workspace }}
run: |
set -e
cd submodules/vcpkg
./bootstrap-vcpkg.sh -disableMetrics
for i in 1 2 3 4 5; do
echo "vcpkg install attempt $i..."
if ./vcpkg install --triplet x64-linux; then
exit 0
fi
echo "vcpkg install failed; sleeping before retry..."
sleep $((i * 10))
done
echo "vcpkg install failed after retries"
exit 1
- name: Build
working-directory: ${{ github.workspace }}
run: |