2022-10-28 12:35:56 +00:00
|
|
|
packageName = "webrtc"
|
|
|
|
version = "0.0.1"
|
|
|
|
author = "Status Research & Development GmbH"
|
2022-11-03 16:27:01 +00:00
|
|
|
description = "Webrtc stack"
|
|
|
|
license = "MIT"
|
2024-03-08 11:48:03 +00:00
|
|
|
installDirs = @["webrtc"]
|
2022-11-03 16:27:01 +00:00
|
|
|
|
2024-03-07 15:10:58 +00:00
|
|
|
requires "nim >= 1.6.0",
|
2022-11-03 16:27:01 +00:00
|
|
|
"chronicles >= 0.10.2",
|
2023-04-11 12:31:30 +00:00
|
|
|
"chronos >= 3.0.6",
|
2023-05-30 09:24:54 +00:00
|
|
|
"https://github.com/status-im/nim-binary-serialization.git",
|
2024-03-08 11:33:45 +00:00
|
|
|
"https://github.com/status-im/nim-mbedtls.git",
|
|
|
|
"https://github.com/status-im/nim-usrsctp.git"
|
2023-05-30 09:24:54 +00:00
|
|
|
|
2024-03-07 11:16:48 +00:00
|
|
|
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
|
|
|
|
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
|
|
|
|
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
|
|
|
|
let verbose = getEnv("V", "") notin ["", "0"]
|
|
|
|
|
2024-08-13 13:54:03 +00:00
|
|
|
var cfg =
|
2024-03-07 11:16:48 +00:00
|
|
|
" --styleCheck:usages --styleCheck:error" &
|
|
|
|
(if verbose: "" else: " --verbosity:0 --hints:off") &
|
|
|
|
" --skipParentCfg --skipUserCfg -f" &
|
|
|
|
" --threads:on --opt:speed"
|
|
|
|
|
2024-08-13 13:54:03 +00:00
|
|
|
when defined(windows):
|
|
|
|
cfg = cfg & " --clib:ws2_32"
|
|
|
|
|
2024-03-07 11:16:48 +00:00
|
|
|
import hashes
|
|
|
|
|
2023-05-30 09:24:54 +00:00
|
|
|
proc runTest(filename: string) =
|
2024-03-07 11:16:48 +00:00
|
|
|
var excstr = nimc & " " & lang & " -d:debug " & cfg & " " & flags
|
|
|
|
excstr.add(" -d:nimOldCaseObjects") # TODO: fix this in binary-serialization
|
|
|
|
if getEnv("CICOV").len > 0:
|
|
|
|
excstr &= " --nimcache:nimcache/" & filename & "-" & $excstr.hash
|
|
|
|
exec excstr & " -r " & " tests/" & filename
|
|
|
|
rmFile "tests/" & filename.toExe
|
|
|
|
|
2024-05-24 12:14:30 +00:00
|
|
|
task test, "Run test":
|
|
|
|
runTest("runalltests")
|