parent
7bc619e79d
commit
1251d9e200
1 changed files with 13 additions and 13 deletions
|
|
@ -20,26 +20,27 @@ proc execCmd(cmd: string) =
|
||||||
echo "execCmd:" & cmd
|
echo "execCmd:" & cmd
|
||||||
exec cmd
|
exec cmd
|
||||||
|
|
||||||
proc tsoloud() =
|
proc execTest(test: string) =
|
||||||
execCmd "nim c -r tests/tsoloud.nim"
|
execCmd "nim c -r " & test
|
||||||
execCmd "nim cpp -r tests/tsoloud.nim"
|
execCmd "nim cpp -r " & test
|
||||||
|
|
||||||
proc buildToast(options: string) =
|
proc tsoloud() =
|
||||||
execCmd(&"nim c {options} nimterop/toast.nim")
|
execTest "tests/tsoloud.nim"
|
||||||
|
|
||||||
|
proc buildToast() =
|
||||||
|
execCmd(&"nim c -d:release nimterop/toast.nim")
|
||||||
|
|
||||||
task rebuildToast, "rebuild toast":
|
task rebuildToast, "rebuild toast":
|
||||||
# If need to manually rebuild (automatically built on 1st need)
|
# If need to manually rebuild (automatically built on 1st need)
|
||||||
buildToast("-d:release")
|
buildToast()
|
||||||
|
|
||||||
proc testAll() =
|
proc testAll() =
|
||||||
execCmd "nim c -r tests/tnimterop_c.nim"
|
execTest "tests/tnimterop_c.nim"
|
||||||
execCmd "nim cpp -r tests/tnimterop_c.nim"
|
|
||||||
execCmd "nim cpp -r tests/tnimterop_cpp.nim"
|
execCmd "nim cpp -r tests/tnimterop_cpp.nim"
|
||||||
|
|
||||||
## platform specific tests
|
## platform specific tests
|
||||||
when defined(Windows):
|
when defined(Windows):
|
||||||
execCmd "nim c -r tests/tmath.nim"
|
execTest "tests/tmath.nim"
|
||||||
execCmd "nim cpp -r tests/tmath.nim"
|
|
||||||
if defined(OSX) or defined(Windows) or not existsEnv("TRAVIS"):
|
if defined(OSX) or defined(Windows) or not existsEnv("TRAVIS"):
|
||||||
tsoloud() # requires some libraries on linux, need them installed in TRAVIS
|
tsoloud() # requires some libraries on linux, need them installed in TRAVIS
|
||||||
|
|
||||||
|
|
@ -49,9 +50,8 @@ proc runNimDoc() =
|
||||||
execCmd &"nim doc -o:{htmldocsDir} --project --index:on nimterop/all.nim"
|
execCmd &"nim doc -o:{htmldocsDir} --project --index:on nimterop/all.nim"
|
||||||
|
|
||||||
task test, "Test":
|
task test, "Test":
|
||||||
for options in ["", "-d:release"]:
|
buildToast()
|
||||||
buildToast(options)
|
testAll()
|
||||||
testAll()
|
|
||||||
runNimDoc()
|
runNimDoc()
|
||||||
|
|
||||||
task docs, "Generate docs":
|
task docs, "Generate docs":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue