Skip to content

Commit

Permalink
Dynamically retrieve the path to dumpbin.exe for windows build (#118)
Browse files Browse the repository at this point in the history
---------
    
Co-authored-by: James Kessler <james@coveralls.io>
  • Loading branch information
littleforest committed Apr 9, 2024
1 parent 87c2839 commit 8d22630
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,18 @@ jobs:
- name: Prepare distribution archive
run: |
cd dist
$vsbase = vswhere.exe -products * -property installationPath
& "$vsbase\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\dumpbin.exe" /dependents coveralls.exe
$vsbase = vswhere.exe -products * -property installationPath -latest
if (-not $vsbase) {
Write-Error "Visual Studio installation not found"
exit 1
}
$dumpbinPath = Join-Path $vsbase "VC\Tools\MSVC\*\bin\HostX64\x64\dumpbin.exe"
$resolvedDumpbin = Get-Item $dumpbinPath | Select-Object -First 1
if (-not $resolvedDumpbin) {
Write-Error "dumpbin.exe not found"
exit 1
}
& $resolvedDumpbin /dependents coveralls.exe
tar -acf coveralls-windows.zip coveralls.exe
- name: Upload exe
Expand Down

0 comments on commit 8d22630

Please sign in to comment.