Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixi: Cleanup handling of dependencies built from source and showcase pixi+colcon integration to install dependencies from source #184

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,243 changes: 1,243 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

27 changes: 8 additions & 19 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,16 @@ platforms = ["linux-64", "win-64", "osx-64"]
# is released

[activation]
scripts = ["set_install_prefix.sh"]
scripts = ["pixi_activation.sh"]

[target.win-64.activation]
scripts = ["set_install_prefix.bat"]
scripts = ["pixi_activation.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
# YARP from source dependencies
ace = "*"
ycm-cmake-modules = "*"
catch2 = "*"
tinyxml = "*"
# Used to download and build dependencies from source
colcon-common-extensions = "*"
vcstool = "*"
2 changes: 2 additions & 0 deletions set_install_prefix.bat → pixi_activation.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
set CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library
set CMAKE_PREFIX_PATH=%CMAKE_INSTALL_PREFIX%;%CMAKE_PREFIX_PATH%
set PYTHONPATH=""
set YARP_DATA_DIRS=%CMAKE_INSTALL_PREFIX%\share\yarp;%CMAKE_INSTALL_PREFIX%\share\ergoCub
2 changes: 2 additions & 0 deletions set_install_prefix.sh → pixi_activation.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
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"
]
}
}
}
Loading