Skip to content

Commit

Permalink
pixi: Cleanup handling of dependencies built from source
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Mar 6, 2024
1 parent 9f21e03 commit 37bbb18
Show file tree
Hide file tree
Showing 6 changed files with 1,286 additions and 17 deletions.
1,243 changes: 1,243 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

23 changes: 6 additions & 17 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,8 @@ scripts = ["set_install_prefix.bat"]

[tasks]

download_yarp = { cmd = "git clone https://github.com/robotology/yarp .pixi_src_yarp && cd .pixi_src_yarp && git checkout e3ec363c0af7469fcb2c218c356844b8d6bbb1c5" }
download_icub_main = { cmd = "git clone https://github.com/robotology/icub-main .pixi_src_icub_main && cd .pixi_src_icub_main && git checkout v2.5.0" }
download_ergocub_software = { cmd = "git clone https://github.com/icub-tech-iit/ergocub-software .pixi_src_ergocub_software && cd .pixi_src_ergocub_software && git checkout v0.7.1" }
download_deps = {cmd = "echo Downloaded all deps", depends_on = ["download_yarp", "download_icub_main", "download_ergocub_software"]}

configure_yarp = { cmd = "cmake -DCMAKE_BUILD_TYPE=Release -DYARP_COMPILE_ALL_FAKE_DEVICES:BOOL=ON -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX -GNinja -S.pixi_src_yarp -B.build_yarp" }
build_yarp = { cmd = "cmake --build .build_yarp --config Release", depends_on = ["configure_yarp"] }
install_yarp = { cmd = ["cmake", "--install", ".build_yarp", "--config", "Release"], depends_on = ["build_yarp"] }
configure_icub_main = { cmd = "cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX -GNinja -S.pixi_src_icub_main -B.build_icub_main", depends_on = "install_yarp" }
build_icub_main = { cmd = "cmake --build .build_icub_main --config Release", depends_on = ["configure_icub_main"] }
install_icub_main = { cmd = ["cmake", "--install", ".build_icub_main", "--config", "Release"], depends_on = ["build_icub_main"] }
configure_ergocub_software = { cmd = "cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX -GNinja -S.pixi_src_ergocub_software -B.build_ergocub_software", depends_on = "install_yarp" }
build_ergocub_software = { cmd = "cmake --build .build_ergocub_software --config Release", depends_on = ["configure_ergocub_software"] }
install_ergocub_software = { cmd = ["cmake", "--install", ".build_ergocub_software", "--config", "Release"], depends_on = ["build_ergocub_software"] }
install_deps = {cmd = "echo Installed all deps", depends_on = ["install_yarp", "install_icub_main", "install_ergocub_software"]}

download_deps = {cmd = "echo Download all deps && mkdir -p ./.pixi_colcon_ws/src && vcs import --input ./pixi_source_deps.yaml ./.pixi_colcon_ws/src"}
install_deps = {cmd = "echo Install all deps && cd .pixi_colcon_ws && colcon build --metas ../pixi_source_deps_options.meta --event-handlers console_direct+ --merge-install --install-base $CMAKE_INSTALL_PREFIX"}

configure = { cmd = [
"cmake",
Expand Down Expand Up @@ -67,8 +53,11 @@ cxx-compiler = "*"
ninja = "*"
pkg-config = "*"
eigen = "*"
# For tests
# For install YARP from source tests
ace = "*"
ycm-cmake-modules = "*"
catch2 = "*"
tinyxml = "*"
# Used to download and build dependencies from source
colcon-common-extensions = "*"
vcstool = "*"
13 changes: 13 additions & 0 deletions pixi_source_deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
YARP:
type: git
url: https://github.com/robotology/yarp.git
version: e3ec363c0af7469fcb2c218c356844b8d6bbb1c5
ICUB:
type: git
url: https://github.com/robotology/icub-main.git
version: v2.5.0
ergocub-software:
type: git
url: https://github.com/icub-tech-iit/ergocub-software.git
version: v0.7.1
21 changes: 21 additions & 0 deletions pixi_source_deps_options.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"names":
{
"YARP" :
{
"cmake-args": [
"-DYARP_COMPILE_ALL_FAKE_DEVICES:BOOL=ON",
"-DYARP_COMPILE_GUIS=OFF"
]
},
"ICUB" :
{
"cmake-args": [
"-DBUILD_SHARED_LIBS=ON",
"-DICUBMAIN_COMPILE_CORE=OFF",
"-DICUBMAIN_COMPILE_TOOLS=OFF",
"-DICUBMAIN_COMPILE_MODULES=OFF"
]
}
}
}
1 change: 1 addition & 0 deletions set_install_prefix.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
set CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library
set CMAKE_PREFIX_PATH=%CMAKE_INSTALL_PREFIX%;%CMAKE_PREFIX_PATH%
set YARP_DATA_DIRS=%CMAKE_INSTALL_PREFIX%\share\yarp;%CMAKE_INSTALL_PREFIX%\share\ergoCub
2 changes: 2 additions & 0 deletions set_install_prefix.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export CMAKE_INSTALL_PREFIX=$CONDA_PREFIX
export CMAKE_PREFIX_PATH=$CMAKE_INSTALL_PREFIX:$CMAKE_PREFIX_PATH
export PYTHONPATH=
export YARP_DATA_DIRS=$CMAKE_INSTALL_PREFIX/share/yarp:$CMAKE_INSTALL_PREFIX/share/ergoCub

0 comments on commit 37bbb18

Please sign in to comment.