Skip to content

Commit

Permalink
Ensure the vc-redist job runs fine on GHA Windows 2022 workers
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Feb 2, 2022
1 parent 868e6b3 commit 76d4a5a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -989,15 +989,19 @@ object ci extends Module {

commitChanges(s"Update CentOS packages for $version", branch, packagesDir)
}
private def vsBasePath = os.Path("C:\\Program Files (x86)\\Microsoft Visual Studio")
private def vsBasePaths = Seq(
os.Path("C:\\Program Files\\Microsoft Visual Studio"),
os.Path("C:\\Program Files (x86)\\Microsoft Visual Studio")
)
def copyVcRedist(directory: String = "artifacts", distName: String = "vc_redist.x64.exe") =
T.command {
def vcVersions = Seq("2019", "2017")
def vcVersions = Seq("2022", "2019", "2017")
def vcEditions = Seq("Enterprise", "Community", "BuildTools")
def candidateBaseDirs =
for {
year <- vcVersions
edition <- vcEditions
vsBasePath <- vsBasePaths
year <- vcVersions
edition <- vcEditions
} yield vsBasePath / year / edition / "VC" / "Redist" / "MSVC"
val baseDirs = candidateBaseDirs.filter(os.isDir(_))
if (baseDirs.isEmpty)
Expand Down

0 comments on commit 76d4a5a

Please sign in to comment.