Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky MSMPI installation in windows builds #3627

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions scripts/ci/gh-actions/windows-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,39 @@ Write-Host "::endgroup::"

if($Env:GH_YML_MATRIX_PARALLEL -eq "mpi")
{
$rooturl = "https://github.com/microsoft/Microsoft-MPI/releases/download"
$version = "10.1.1"
$baseurl = "$rooturl/v$version"
# This is taken from the MSMPI VCPKG
$baseurl = "https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623"
$version = "10.1.12498"

$tempdir = $Env:RUNNER_TEMP
$msmpisdk = Join-Path $tempdir msmpisdk.msi
$msmpisetup = Join-Path $tempdir msmpisetup.exe
$tempdir = $Env:RUNNER_TEMP
$msmpisdk = Join-Path $tempdir msmpisdk.msi
$msmpisetup = Join-Path $tempdir msmpisetup.exe

Write-Host "::group::Downloading Microsoft MPI SDK $version"
Invoke-WebRequest "$baseurl/msmpisdk.msi" -OutFile $msmpisdk
Write-Host "::endgroup::"
Write-Host "::group::Installing Microsoft MPI SDK $version"
Start-Process msiexec.exe -ArgumentList "/quiet /passive /qn /i $msmpisdk" -Wait
Write-Host "::endgroup::"
Write-Host "::group::Downloading Microsoft MPI SDK $version"
Invoke-WebRequest "$baseurl/msmpisdk.msi" -OutFile $msmpisdk
Write-Host "::endgroup::"
Write-Host "::group::Installing Microsoft MPI SDK $version"
Start-Process msiexec.exe -ArgumentList "/quiet /passive /qn /i $msmpisdk" -Wait
Write-Host "::endgroup::"

Write-Host "::group::Downloading Microsoft MPI Runtime $version"
Invoke-WebRequest "$baseurl/msmpisetup.exe" -OutFile $msmpisetup
Write-Host "::endgroup::"
Write-Host "::group::Installing Microsoft MPI Runtime $version"
Start-Process $msmpisetup -ArgumentList "-unattend" -Wait
Write-Host "::endgroup::"
Write-Host "::group::Downloading Microsoft MPI Runtime $version"

if ($Env:GITHUB_ENV) {
Write-Host '::group::Adding environment variables to $GITHUB_ENV'
$envlist = @("MSMPI_BIN", "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64")
foreach ($name in $envlist) {
$value = [Environment]::GetEnvironmentVariable($name, "Machine")
Write-Host "$name=$value"
Add-Content $Env:GITHUB_ENV "$name=$value"
}
Write-Host "::endgroup::"
}
Invoke-WebRequest "$baseurl/msmpisetup.exe" -OutFile $msmpisetup
Write-Host "::endgroup::"
Write-Host "::group::Installing Microsoft MPI Runtime $version"
Start-Process $msmpisetup -ArgumentList "-unattend" -Wait
Write-Host "::endgroup::"

if ($Env:GITHUB_ENV) {
Write-Host '::group::Adding environment variables to $GITHUB_ENV'
$envlist = @("MSMPI_BIN", "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64")
foreach ($name in $envlist) {
$value = [Environment]::GetEnvironmentVariable($name, "Machine")
Write-Host "$name=$value"
Add-Content $Env:GITHUB_ENV "$name=$value"
}
Write-Host "::endgroup::"
}

if ($Env:GITHUB_PATH) {
Write-Host '::group::Adding $MSMPI_BIN to $GITHUB_PATH'
Expand Down