Browse Source

Build: better framework support for multiple solutions

pull/612/head
Christoph Ruegg 8 years ago
parent
commit
0105d62a26
  1. 32
      build.fsx
  2. 16
      build/build-framework.fsx

32
build.fsx

@ -222,7 +222,7 @@ Target "Build" (fun _ ->
collectNuGetPackages numericsSolution
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver numericsSolution
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [numericsSolution]
)
"Prepare" ==> "Build"
@ -255,7 +255,7 @@ Target "DataBuild" (fun _ ->
collectNuGetPackages dataSolution
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver dataSolution
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [dataSolution]
)
"Prepare" ==> "DataBuild"
@ -271,7 +271,7 @@ Target "MklWinBuild" (fun _ ->
nugetPackManually mklSolution [ mklWinPack; mklWin32Pack; mklWin64Pack ]
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver mklSolution
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [mklSolution]
)
"Prepare" ==> "MklWinBuild"
@ -286,7 +286,7 @@ Target "CudaWinBuild" (fun _ ->
nugetPackManually cudaSolution [ cudaWinPack ]
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver cudaSolution
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [cudaSolution]
)
"Prepare" ==> "CudaWinBuild"
@ -302,7 +302,7 @@ Target "OpenBlasWinBuild" (fun _ ->
nugetPackManually openBlasSolution [ openBlasWinPack ]
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver openBlasSolution
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [openBlasSolution]
)
"Prepare" ==> "OpenBlasWinBuild"
@ -455,17 +455,17 @@ Target "PublishMirrors" (fun _ -> publishMirrors ())
Target "PublishDocs" (fun _ -> publishDocs numericsRelease)
Target "PublishApi" (fun _ -> publishApi numericsRelease)
Target "PublishArchive" (fun _ -> publishArchive numericsSolution)
Target "DataPublishArchive" (fun _ -> publishArchive dataSolution)
Target "MklPublishArchive" (fun _ -> publishArchive mklSolution)
Target "CudaPublishArchive" (fun _ -> publishArchive cudaSolution)
Target "OpenBlasPublishArchive" (fun _ -> publishArchive openBlasSolution)
Target "PublishNuGet" (fun _ -> publishNuGet !! (numericsSolution.OutputNuGetDir </> "*.nupkg"))
Target "DataPublishNuGet" (fun _ -> publishNuGet !! (dataSolution.OutputNuGetDir </> "*.nupkg"))
Target "MklPublishNuGet" (fun _ -> publishNuGet !! (mklSolution.OutputNuGetDir </> "*.nupkg"))
Target "CudaPublishNuGet" (fun _ -> publishNuGet !! (cudaSolution.OutputNuGetDir </> "*.nupkg"))
Target "OpenBlasPublishNuGet" (fun _ -> publishNuGet !! (openBlasSolution.OutputNuGetDir </> "*.nupkg"))
Target "PublishArchive" (fun _ -> publishArchives [numericsSolution])
Target "DataPublishArchive" (fun _ -> publishArchives [dataSolution])
Target "MklPublishArchive" (fun _ -> publishArchives [mklSolution])
Target "CudaPublishArchive" (fun _ -> publishArchives [cudaSolution])
Target "OpenBlasPublishArchive" (fun _ -> publishArchives [openBlasSolution])
Target "PublishNuGet" (fun _ -> publishNuGet [numericsSolution])
Target "DataPublishNuGet" (fun _ -> publishNuGet [dataSolution])
Target "MklPublishNuGet" (fun _ -> publishNuGet [mklSolution])
Target "CudaPublishNuGet" (fun _ -> publishNuGet [cudaSolution])
Target "OpenBlasPublishNuGet" (fun _ -> publishNuGet [openBlasSolution])
Target "Publish" DoNothing
Dependencies "Publish" [ "PublishTag"; "PublishDocs"; "PublishApi"; "PublishArchive"; "PublishNuGet" ]

16
build/build-framework.fsx

@ -383,9 +383,11 @@ let sign fingerprint timeserver (solution: Solution) =
if result <> 0 then
failwithf "Error during SignTool call "
let signNuGet fingerprint timeserver (solution: Solution) =
let signNuGet fingerprint timeserver (solutions: Solution list) =
CleanDir "obj/NuGet"
!! (solution.OutputNuGetDir </> "*.nupkg")
solutions
|> Seq.collect (fun solution -> !! (solution.OutputNuGetDir </> "*.nupkg"))
|> Seq.distinct
|> Seq.iter (fun file ->
let args = sprintf """sign "%s" -HashAlgorithm SHA256 -TimestampHashAlgorithm SHA256 -CertificateFingerprint "%s" -Timestamper "%s""" (FullName file) fingerprint timeserver
let result =
@ -501,8 +503,7 @@ let publishReleaseTag title prefix (release:Release) =
let remoteName = main.Split('\t').[0]
Git.Branches.pushTag "." remoteName tagName
let publishNuGet packageFiles =
// TODO: Migrate to NuGet helper once it supports direct (non-integrated) operations
let publishNuGet (solutions: Solution list) =
CleanDir "obj/NuGet"
let rec impl trials (file:string) =
trace ("NuGet Push: " + System.IO.Path.GetFileName(file) + ".")
@ -517,7 +518,10 @@ let publishNuGet packageFiles =
with exn ->
if trials > 0 then impl (trials-1) file
else ()
Seq.iter (impl 3) packageFiles
solutions
|> Seq.collect (fun solution -> !! (solution.OutputNuGetDir </> "*.nupkg"))
|> Seq.distinct
|> Seq.iter (impl 3)
DeleteDir "obj/NuGet"
let publishMirrors () =
@ -576,3 +580,5 @@ let publishArchive (solution:Solution) =
let zipPackages = solution.ZipPackages
let nugetPackages = solution.Projects |> List.collect projectNuGetPackages |> List.distinct
publishArchiveManual zipOutPath nugetOutPath zipPackages nugetPackages
let publishArchives (solutions: Solution list) = solutions |> List.iter publishArchive

Loading…
Cancel
Save