Skip to content

Commit 8ce04e2

Browse files
committed
vcpkg commit id
1 parent f8e30dc commit 8ce04e2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/build-on-windows.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
runs-on: windows-2022
3232

3333
env:
34-
BUILD_DIR:
3534
DEBUG_BUILD_DIR: ${{github.workspace}}\out\build\x64-windows\Debug
3635
RELEASE_BUILD_DIR: ${{github.workspace}}\out\build\x64-windows\Release
3736
INSTALL_DIR: ${{github.workspace}}\out\install
@@ -50,13 +49,17 @@ jobs:
5049
with:
5150
submodules: recursive
5251

53-
- name: Create vcpkg cache dir
54-
run: mkdir ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
55-
5652
- name: Setup Visual Studio Developer Command Prompt
5753
uses: ilammy/msvc-dev-cmd@v1
5854

59-
- name: Install VCPKG
55+
- name: Create vcpkg cache dir
56+
run: mkdir ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
57+
58+
- name: Get vcpkg commit id
59+
working-directory: vcpkg
60+
run: git rev-parse HEAD >commit.txt
61+
62+
- name: Install vcpkg
6063
working-directory: vcpkg
6164
run: .\bootstrap-vcpkg.bat
6265

@@ -66,7 +69,7 @@ jobs:
6669
uses: actions/cache/restore@v4
6770
with:
6871
path: vcpkg\binary-sources\**\*.zip
69-
key: vcpkg-cache-${{hashFiles('vcpkg.json', 'vcpkg\vcpkgLastBuiltCommitId')}}
72+
key: vcpkg-cache-${{hashFiles('vcpkg.json', 'vcpkg\commit.txt')}}
7073

7174
- name: CMake - Configure
7275
run: cmake --preset=x64-windows .

0 commit comments

Comments
 (0)