-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrclnim.nimble
44 lines (34 loc) · 1.31 KB
/
rclnim.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Package
version = "0.6.0"
author = "Pylgos"
description = "Nim bindings for ROS2"
license = "MIT"
srcDir = "src"
installExt = @["nim"]
namedBin = {"rclnim/private/importinterfacehelper": "_rclnim_import_interface_helper"}.toTable
# Dependencies
requires "nim >= 2.0"
requires "tinyre"
requires "https://github.com/Pylgos/nim-concurrent.git#head"
requires "chronos#head"
import std/[os, strformat, strutils]
task bench, "run behchmarks":
cd thisDir()
writeFile(thisDir()/"benchmarks/result.txt", "")
for file in listFiles(thisDir()/"benchmarks"):
let (_, name, ext) = file.splitFile()
if name.startsWith("bench_") and ext == ".nim":
exec fmt"nimble c -r {file.quoteShell}"
echo readFile(thisDir()/"benchmarks/result.txt")
task test, "test":
exec "ROS_LOCALHOST_ONLY=1 testament --megatest:off all"
task testC, "test c backend":
exec "ROS_LOCALHOST_ONLY=1 testament --megatest:off --targets:\"c\" all"
task testCpp, "test cpp backend":
exec "ROS_LOCALHOST_ONLY=1 testament --megatest:off --targets:\"cpp\" all"
task generateBindings, "generate rcl binding with futhark":
cd "binding_generator"
exec "nimble --verbose c --compileOnly -d:futharkRebuild -d:nodeclguards gen"
task reinstall, "reinstall rclnim":
exec "nimble -y uninstall rclnim"
exec "nimble install"