diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbd504a664..c521bb669e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -288,12 +288,17 @@ jobs: - name: remove vcpkg manifest file # we need to remove the vcpkg.json file to be able to work not in manifest mode run: rm vcpkg.json - - name: Cache VCPKG dependencies - uses: actions/cache@v3 + - name: Get Week + id: get-week + shell: bash + run: echo "week=$(/bin/date -u "+%Y%U")" >> "${GITHUB_OUTPUT}" + - name: Restore cached VCPKG dependencies + id: cache-vcpkg-restore + uses: actions/cache/restore@v3 with: path: C:\vcpkg - key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ steps.get-date.outputs.date }}- - - name: build static windows dependencies with vcpkg + key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ steps.get-week.outputs.week }}- + - name: Build static windows dependencies with vcpkg shell: cmd /C CALL {0} # Latest VCPKG is from GHA because releases are not up to date with VCPKG server run: | @@ -314,6 +319,11 @@ jobs: if %errorlevel% neq 0 exit /b %errorlevel% vcpkg install reproc --triplet x64-windows-static if %errorlevel% neq 0 exit /b %errorlevel% + - name: Save VCPKG dependencies + uses: actions/cache/save@v3 + with: + path: C:\vcpkg + key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }} - uses: hendrikmuhs/ccache-action@main with: variant: sccache