Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
filippobrizzi committed Mar 12, 2024
1 parent ca8eebe commit e9cf0a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 39 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VE

RUN ln -s /usr/bin/clangd-${CLANG_VERSION} /usr/bin/clangd

RUN echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | tee -a /etc/apt/sources.list.d/zenoh.list > /dev/null && \
apt-get update && apt-get install zenoh && \
rm -rf /var/lib/apt/lists/*

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust_installer.sh && chmod +x rust_installer.sh && ./rust_installer.sh -y
RUN . "$HOME/.cargo/env" && cargo install sccache --locked
RUN echo "export RUSTC_WRAPPER=sccache" >> $HOME/.bashrc
Expand Down
4 changes: 2 additions & 2 deletions docker/version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
HOST=ghcr.io/olympus-robotics
VERSION=1.0.4
VERSION=1.0.5
IMAGE=hephaestus-dev

# This is the version of the dep image. Increase this number everytime you change `external/CMakeLists.txt`
DEPS_VERSION=1.0.7
DEPS_VERSION=1.0.8
38 changes: 2 additions & 36 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include(${CMAKE_TEMPLATE_DIR}/external.cmake)
# correctly includes them.
# --------------------------------------------------------------------------------------------------
if(zenohcxx IN_LIST EXTERNAL_PROJECTS_LIST)
set(ZENOHCXX_DEPENDS zenohc zenohd)
set(ZENOHCXX_DEPENDS zenohc)
list(APPEND EXTERNAL_PROJECTS_LIST ${ZENOHCXX_DEPENDS})
endif()

Expand All @@ -29,42 +29,8 @@ endif()
# --------------------------------------------------------------------------------------------------
# zenoh

if(zenohd IN_LIST EXTERNAL_PROJECTS_LIST)
set(zenohd_VERION_REQUIRED 0.10.1-rc)

foreach(path ${CMAKE_PREFIX_PATH})
if(EXISTS "${path}/bin/zenohd")
set(ZENOHD_BIN "${path}/bin/zenohd")
break()
endif()
endforeach()
if(ZENOHD_BIN)
message(STATUS "zenohd: Using from ${ZENOHD_BIN}")
add_dummy_target(zenohd)
else()
message(STATUS "zenohd: Building ${zenohd_VERION_REQUIRED} from source")
set(ZENOH_PLUGIN_LIB "target/release/libzenoh_plugin_rest.so")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(ZENOH_PLUGIN_LIB "target/release/libzenoh_plugin_rest.dylib")
endif()
ExternalProject_Add(
zenohd
GIT_REPOSITORY "https://github.com/eclipse-zenoh/zenoh.git"
GIT_TAG ${zenohd_VERION_REQUIRED}
GIT_SHALLOW true
CONFIGURE_COMMAND ""
BUILD_COMMAND
COMMAND cargo build --release --package zenoh-plugin-rest --package zenohd
BUILD_IN_SOURCE true
INSTALL_COMMAND cp target/release/zenohd ${CMAKE_INSTALL_PREFIX}/bin/ && cp ${ZENOH_PLUGIN_LIB}
${CMAKE_INSTALL_PREFIX}/bin/
LOG_BUILD ON
)
endif()
endif()

set(GIT_TAG "10176b911096cb92b8ee46bc491b78079ee26c20")
add_cmake_dependency(NAME zenohc DEPENDS zenohd URL "https://github.com/eclipse-zenoh/zenoh-c/archive/${GIT_TAG}.zip")
add_cmake_dependency(NAME zenohc URL "https://github.com/eclipse-zenoh/zenoh-c/archive/${GIT_TAG}.zip")

set(GIT_TAG "c0b7adb077cbf0b7b0cd04addb6de741b338fc49")
add_cmake_dependency(
Expand Down
2 changes: 1 addition & 1 deletion modules/utils/src/version_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ static constexpr std::uint16_t VERSION_PATCH = 1;

static constexpr std::string_view REPO_BRANCH = "fix_format_submodule";
static constexpr std::string_view BUILD_PROFILE = "RelWithDebInfo";
static constexpr std::string_view REPO_HASH = "d5dd1f4";
static constexpr std::string_view REPO_HASH = "ca8eebe";

} // namespace heph::utils

0 comments on commit e9cf0a1

Please sign in to comment.