|
| 1 | +[workspace] |
| 2 | +authors = ["JafarAbdi <jafar.uruc@gmail.com>"] |
| 3 | +channels = ["conda-forge"] |
| 4 | +name = "roboplan" |
| 5 | +platforms = ["linux-64", "linux-aarch64"] |
| 6 | +version = "0.0.0" |
| 7 | + |
| 8 | +[activation.env] |
| 9 | +CMAKE_INSTALL_MODE = "SYMLINK" |
| 10 | +CMAKE_INSTALL_PREFIX = "$CONDA_PREFIX" |
| 11 | +LD_LIBRARY_PATH = "$CONDA_PREFIX/lib" |
| 12 | +ASAN_OPTIONS = "symbolize=1:print_stacktrace=1" |
| 13 | +ASAN_SYMBOLIZER_PATH = "$CONDA_PREFIX/bin/llvm-symbolizer" |
| 14 | + |
| 15 | +[tasks] |
| 16 | +configure = { cmd = [ |
| 17 | + "cmake", |
| 18 | + "-GNinja", |
| 19 | + "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", |
| 20 | + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", |
| 21 | + "-DBUILD_TESTING=ON", |
| 22 | + # Use clang as the compiler |
| 23 | + "-DCMAKE_C_COMPILER=clang", |
| 24 | + "-DCMAKE_CXX_COMPILER=clang++", |
| 25 | + # Use mold as the linker |
| 26 | + "-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold", |
| 27 | + "-DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=mold", |
| 28 | + "-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=mold", |
| 29 | + # Use sccache to speed up compilation |
| 30 | + "-DCMAKE_C_COMPILER_LAUNCHER=sccache", |
| 31 | + "-DCMAKE_CXX_COMPILER_LAUNCHER=sccache", |
| 32 | + # Activate color output with Ninja |
| 33 | + "-DCMAKE_COLOR_DIAGNOSTICS=ON", |
| 34 | + # Compiler flags |
| 35 | + "{{ '-DCMAKE_CXX_FLAGS=' + cxx_flags if cxx_flags }}", |
| 36 | + "{{ '-DCMAKE_C_FLAGS=' + cxx_flags if cxx_flags }}", |
| 37 | + # Disable warnings about unused command line arguments |
| 38 | + "--no-warn-unused-cli", |
| 39 | + "-S", |
| 40 | + "{{ package_name }}", |
| 41 | + "-B", |
| 42 | + "build//{{ package_name }}", |
| 43 | +], args = [{ arg = "package_name" }, { arg = "cxx_flags", default = "" }] } |
| 44 | +build = { cmd = [ |
| 45 | + "cmake", |
| 46 | + "--build", |
| 47 | + "build/{{ package_name }}", |
| 48 | +], depends-on = [ |
| 49 | + { task = "configure", args = [ |
| 50 | + "{{ package_name }}", |
| 51 | + "{{ cxx_flags }}", |
| 52 | + ] }, |
| 53 | +], args = [ |
| 54 | + { arg = "package_name" }, |
| 55 | + { arg = "cxx_flags", default = "" }, |
| 56 | +] } |
| 57 | +install = { cmd = [ |
| 58 | + "cmake", |
| 59 | + "--install", |
| 60 | + "build/{{ package_name }}", |
| 61 | + "--prefix", |
| 62 | + "$CONDA_PREFIX", |
| 63 | +], depends-on = [ |
| 64 | + { task = "build", args = [ |
| 65 | + "{{ package_name }}", |
| 66 | + "{{ cxx_flags }}", |
| 67 | + ] }, |
| 68 | +], args = [ |
| 69 | + { "arg" = "package_name" }, |
| 70 | + { arg = "cxx_flags", default = "" }, |
| 71 | +] } |
| 72 | +build_bindings = "pip install -e bindings --no-build-isolation" |
| 73 | +build_all = { depends-on = [ |
| 74 | + { task = "install", args = [ |
| 75 | + "roboplan_example_models", |
| 76 | + ] }, |
| 77 | + { task = "install", args = [ |
| 78 | + "roboplan", |
| 79 | + ] }, |
| 80 | + { task = "install", args = [ |
| 81 | + "roboplan_simple_ik", |
| 82 | + ] }, |
| 83 | + { task = "install", args = [ |
| 84 | + "roboplan_rrt", |
| 85 | + ] }, |
| 86 | + { task = "build", args = [ |
| 87 | + "roboplan_examples", |
| 88 | + ] }, |
| 89 | + "build_bindings" |
| 90 | +] } |
| 91 | +install_all = { depends-on = [ |
| 92 | + { task = "build_all" }, |
| 93 | + { task = "install", args = [ |
| 94 | + "roboplan_examples", |
| 95 | + ] }, |
| 96 | +] } |
| 97 | + |
| 98 | +build_asan = { cmd = [ |
| 99 | + "cmake", |
| 100 | + "--build", |
| 101 | + "build/{{ package_name }}", |
| 102 | +], depends-on = [ |
| 103 | + { task = "configure", args = [ |
| 104 | + "{{ package_name }}", |
| 105 | + "-fsanitize=address", |
| 106 | + ] }, |
| 107 | +], args = [ |
| 108 | + { arg = "package_name" }, |
| 109 | +] } |
| 110 | +# https://clang.llvm.org/docs/analyzer/developer-docs/PerformanceInvestigation.html#performance-analysis-using-ftime-trace |
| 111 | +build_timetrace = { depends-on = [ |
| 112 | + { task = "configure", args = [ |
| 113 | + "{{ package_name }}", |
| 114 | + "-ftime-trace", |
| 115 | + ] }, |
| 116 | + { task = "build", args = [ |
| 117 | + "{{ package_name }}", |
| 118 | + ] }, |
| 119 | +], args = [ |
| 120 | + { arg = "package_name" }, |
| 121 | +] } |
| 122 | +build_tests = { depends-on = [ |
| 123 | + { task = "install", args = [ |
| 124 | + "roboplan_example_models", |
| 125 | + "{{ cxx_flags }}", |
| 126 | + "ON", |
| 127 | + ] }, |
| 128 | + { task = "install", args = [ |
| 129 | + "roboplan", |
| 130 | + "{{ cxx_flags }}", |
| 131 | + "ON", |
| 132 | + ] }, |
| 133 | + { task = "install", args = [ |
| 134 | + "roboplan_simple_ik", |
| 135 | + "{{ cxx_flags }}", |
| 136 | + "ON", |
| 137 | + ] }, |
| 138 | + { task = "install", args = [ |
| 139 | + "roboplan_rrt", |
| 140 | + "{{ cxx_flags }}", |
| 141 | + "ON", |
| 142 | + ] }, |
| 143 | + { task = "build", args = [ |
| 144 | + "roboplan_examples", |
| 145 | + "{{ cxx_flags }}", |
| 146 | + "ON", |
| 147 | + ] }, |
| 148 | +], args = [ |
| 149 | + { arg = "cxx_flags", "default" = "" }, |
| 150 | +] } |
| 151 | + |
| 152 | +# Test related tasks |
| 153 | +test = { cmd = "ctest -V --test-dir build/{{ package_name }}", args = [ |
| 154 | + { arg = "package_name" }, |
| 155 | +], env = { GTEST_COLOR = "YES" } } |
| 156 | + |
| 157 | +test_py = { cmd = "python3 -m pytest --capture=no", cwd = "bindings" } |
| 158 | +test_cpp = { depends-on = [{ task = "test", args = ["roboplan"] }, { task = "test", args = ["roboplan_rrt"] }] } |
| 159 | +test_all = { depends-on = ["test_py", "test_cpp"] } |
| 160 | + |
| 161 | + |
| 162 | +[dependencies] |
| 163 | + |
| 164 | +# Build dependencies |
| 165 | +cmake = ">=3.30.5,<4" |
| 166 | +ninja = ">=1.12.1,<2" |
| 167 | +clangxx = ">=19.1.7,<20" |
| 168 | +gxx = ">=11,<12" |
| 169 | +gcc = ">=11,<12" |
| 170 | +lld = ">=19.1.2,<20" |
| 171 | +libstdcxx = ">=15.1.0,<16" |
| 172 | +llvm-openmp = ">=19.1.7,<20" |
| 173 | +mold = ">=2.40.2,<3" |
| 174 | +sccache = ">=0.10.0,<0.11" |
| 175 | + |
| 176 | +# Core dependencies |
| 177 | +eigen = ">=3.4.0,<4" |
| 178 | +pinocchio = ">=3.7.0,<4" |
| 179 | + |
| 180 | +# Python binding dependencies |
| 181 | +python = ">=3.11,<3.12" |
| 182 | +nanobind = ">=2.8.0,<3" |
| 183 | +scikit-build-core = ">=0.11.5,<0.12" |
| 184 | +numpy = "*" |
| 185 | +viser = ">=1.0.0,<2" |
| 186 | + |
| 187 | +# We use pip as a workaround for pixi building the bindings before we build the core packages |
| 188 | +# In theory, it should be like this: |
| 189 | +# [pypi-dependencies] |
| 190 | +# roboplan = { path = "bindings", editable = true } |
| 191 | +# |
| 192 | +# [pypi-options] |
| 193 | +# no-build-isolation = ["roboplan"] |
| 194 | + |
| 195 | +pip = ">=25.1.1,<26" |
| 196 | + |
| 197 | +# Test dependencies |
| 198 | +gtest = ">=1.17.0,<2" |
| 199 | +# Sanitizer dependencies |
| 200 | +llvm-tools = ">=19.1.7,<20" |
| 201 | +compiler-rt = ">=19.1.7,<20" |
| 202 | +# Python test dependencies |
| 203 | +pytest = ">=6" |
| 204 | + |
| 205 | +[pypi-dependencies] |
| 206 | +pycollada = ">=0.9.2, <0.10" |
| 207 | + |
| 208 | +[feature.lint.dependencies] |
| 209 | +pre-commit = ">=4.1.0,<5" |
| 210 | + |
| 211 | +[feature.lint.tasks] |
| 212 | +lint = "pre-commit run --all-files" |
| 213 | + |
| 214 | +[environments] |
| 215 | +lint = { features = ["lint"], no-default-feature = true } |
0 commit comments