Skip to content

Commit 59ccbae

Browse files
committed
Fix the lukka/run-vcpkg action, adding the latest
vcpkg commit hash.
1 parent ff42cd0 commit 59ccbae

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

.github/workflows/bvt.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,20 @@ jobs:
8181
echo "::error Unknown architecture/build-type triplet mapping"
8282
}
8383
84+
- name: Get latest vcpkg commit hash
85+
shell: pwsh
86+
run: |
87+
echo "Fetching latest vcpkg commit hash..."
88+
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
89+
$VCPKG_COMMIT_ID= $commit
90+
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
91+
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
92+
8493
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
8594
with:
8695
runVcpkgInstall: true
8796
vcpkgJsonGlob: '**/build/vcpkg.json'
88-
vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}'
97+
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
8998

9099
- name: 'Configure CMake'
91100
working-directory: ${{ github.workspace }}

.github/workflows/test.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,20 @@ jobs:
121121
echo "::error Unknown architecture/build-type triplet mapping"
122122
}
123123
124+
- name: Get latest vcpkg commit hash
125+
shell: pwsh
126+
run: |
127+
echo "Fetching latest vcpkg commit hash..."
128+
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
129+
$VCPKG_COMMIT_ID= $commit
130+
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
131+
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
132+
124133
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
125134
with:
126135
runVcpkgInstall: true
127136
vcpkgJsonGlob: '**/build/vcpkg.json'
128-
vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}'
137+
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
129138

130139
- name: 'Configure CMake'
131140
working-directory: ${{ github.workspace }}

.github/workflows/vcpkg.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,20 @@ jobs:
9393
echo "::error Unknown architecture/build-type triplet mapping"
9494
}
9595
96+
- name: Get latest vcpkg commit hash
97+
shell: pwsh
98+
run: |
99+
echo "Fetching latest vcpkg commit hash..."
100+
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
101+
$VCPKG_COMMIT_ID= $commit
102+
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
103+
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
104+
96105
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
97106
with:
98107
runVcpkgInstall: true
99108
vcpkgJsonGlob: '**/build/vcpkg.json'
100-
vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}'
109+
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
101110

102111
- name: 'Configure CMake'
103112
working-directory: ${{ github.workspace }}

.github/workflows/wsl.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,20 @@ jobs:
3737

3838
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # v5
3939

40+
- name: Get latest vcpkg commit hash
41+
shell: pwsh
42+
run: |
43+
echo "Fetching latest vcpkg commit hash..."
44+
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
45+
$VCPKG_COMMIT_ID= $commit
46+
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
47+
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
48+
4049
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
4150
with:
4251
runVcpkgInstall: true
4352
vcpkgJsonGlob: '**/build/vcpkg.json'
44-
vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}'
53+
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
4554

4655
- name: 'Configure CMake'
4756
working-directory: ${{ github.workspace }}

0 commit comments

Comments
 (0)