ci: use a more generic way of finding mt.exe
This sets up a vs developer command prompt and should hopefully should be more resilient to upstream changes Co-authored-by: David Gumberg <davidzgumberg@gmail.com>
This commit is contained in:
1 parent
7ae0497eef
commit
e1a1b14c93
1 file changed
+5
-9
@@ -211,7 +211,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- *CHECKOUT
|
- *CHECKOUT
|
||||||
|
|
||||||
- name: Set up VS Developer Prompt
|
- &SET_UP_VS
|
||||||
|
name: Set up VS Developer Prompt
|
||||||
shell: pwsh -Command "$PSVersionTable; $PSNativeCommandUseErrorActionPreference = $true; $ErrorActionPreference = 'Stop'; & '{0}'"
|
shell: pwsh -Command "$PSVersionTable; $PSNativeCommandUseErrorActionPreference = $true; $ErrorActionPreference = 'Stop'; & '{0}'"
|
||||||
run: |
|
run: |
|
||||||
$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||||
@@ -374,19 +375,14 @@ jobs:
|
|||||||
- name: Run bitcoind.exe
|
- name: Run bitcoind.exe
|
||||||
run: ./bin/bitcoind.exe -version
|
run: ./bin/bitcoind.exe -version
|
||||||
|
|
||||||
- name: Find mt.exe tool
|
- *SET_UP_VS
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
$sdk_dir = (Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' -Name KitsRoot10).KitsRoot10
|
|
||||||
$sdk_latest = (Get-ChildItem "$sdk_dir\bin" -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object Name -Descending | Select-Object -First 1).Name
|
|
||||||
"MT_EXE=${sdk_dir}bin\${sdk_latest}\x64\mt.exe" >> $env:GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Get bitcoind manifest
|
- name: Get bitcoind manifest
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
|
mt.exe -nologo -inputresource:bin\bitcoind.exe -out:bitcoind.manifest
|
||||||
Get-Content bitcoind.manifest
|
Get-Content bitcoind.manifest
|
||||||
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -validate_manifest
|
mt.exe -nologo -inputresource:bin\bitcoind.exe -validate_manifest
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
# Can't use ctest here like other jobs as we don't have a CMake build tree.
|
# Can't use ctest here like other jobs as we don't have a CMake build tree.
|
||||||
|
|||||||
Reference in new issue
Block a user