Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
10 changes: 10 additions & 0 deletions build-system/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ jobs:
outputDirectory: "TestResults"
artifactName: "net_core_tests_linux-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "docfx_test"
displayName: "DocFX warning check"
vmImage: "windows-2019"
scriptFileName: build.cmd
scriptArgs: docfx
outputDirectory: "TestResults"
artifactName: "docfx_test-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "net_5_tests_windows"
Expand Down
19 changes: 13 additions & 6 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,19 @@ Target "DocFx" (fun _ ->
Version = "0.1.0-alpha-1611021200"
OutputDirectory = currentDirectory @@ "tools" }) "msdn.4.5.2"

let docsPath = "./docs"
DocFx (fun p ->
{ p with
Timeout = TimeSpan.FromMinutes 30.0;
WorkingDirectory = docsPath;
DocFxJson = docsPath @@ "docfx.json" })
let docsPath = FullName "./docs"
let docFxPath = FullName(findToolInSubPath "docfx.exe" "tools/docfx.console/tools")

let args = StringBuilder()
|> append (docsPath @@ "docfx.json" )
|> append ("--warningsAsErrors")
|> toText

let result = ExecProcess(fun info ->
info.FileName <- docFxPath
info.WorkingDirectory <- (Path.GetDirectoryName (FullName docFxPath))
info.Arguments <- args) (System.TimeSpan.FromMinutes 45.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "DocFX failed. %s %s" docFxPath args
)

FinalTarget "KillCreatedProcesses" (fun _ ->
Expand Down