mirror of https://github.com/bitcoin/bitcoin.git
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:
parent
7ae0497eef
commit
e1a1b14c93
|
@ -211,7 +211,8 @@ jobs:
|
|||
steps:
|
||||
- *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}'"
|
||||
run: |
|
||||
$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
|
@ -374,19 +375,14 @@ jobs:
|
|||
- name: Run bitcoind.exe
|
||||
run: ./bin/bitcoind.exe -version
|
||||
|
||||
- name: Find mt.exe tool
|
||||
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
|
||||
- *SET_UP_VS
|
||||
|
||||
- name: Get bitcoind manifest
|
||||
shell: pwsh
|
||||
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
|
||||
& $env:MT_EXE -nologo -inputresource:bin\bitcoind.exe -validate_manifest
|
||||
mt.exe -nologo -inputresource:bin\bitcoind.exe -validate_manifest
|
||||
|
||||
- name: Run unit tests
|
||||
# Can't use ctest here like other jobs as we don't have a CMake build tree.
|
||||
|
|
Loading…
Reference in New Issue