walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + various other fixes (#14501)

* update doc CI filter to include the files mostly likely to require doc rebuild
* remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes
* walkDirRecFilter, factor nativeToUnixPath workaround
* glob for getRst2html
* docslocal: 40s to build all docs
* revert code dedup in github actions which did not work alas...
* fixups
This commit is contained in:
Timothee Cour 2020-06-01 10:21:41 -07:00 • committed by GitHub
commit 3cf88c2b49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 170 additions and 126 deletions

View file

@ -11,6 +11,7 @@ import std/[strformat,os,osproc,unittest]
from std/sequtils import toSeq,mapIt
from std/algorithm import sorted
import stdtest/[specialpaths, unittest_light]
from std/private/globs import nativeToUnixPath
import "$lib/../compiler/nimpaths"
@ -90,11 +91,7 @@ else: # don't run twice the same test
removeDir(htmldocsDir)
let (outp, exitCode) = execCmdEx(cmd)
check exitCode == 0
proc nativeToUnixPathWorkaround(a: string): string =
# xxx pending https://github.com/nim-lang/Nim/pull/13265 `nativeToUnixPath`
a.replace(DirSep, '/')
let ret = toSeq(walkDirRec(htmldocsDir, relative=true)).mapIt(it.nativeToUnixPathWorkaround).sorted.join("\n")
let ret = toSeq(walkDirRec(htmldocsDir, relative=true)).mapIt(it.nativeToUnixPath).sorted.join("\n")
let context = $(i, ret, cmd)
var expected = ""
case i