Skip to content

Commit

Permalink
refactor!: remove network interfaces (#56)
Browse files Browse the repository at this point in the history
Remove network interfaces library, python module and scripts.
  • Loading branch information
domire8 authored Sep 14, 2023
1 parent 59e1b71 commit 8f29f2b
Show file tree
Hide file tree
Showing 28 changed files with 34 additions and 1,430 deletions.
5 changes: 0 additions & 5 deletions .dockerignore

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Build and Push Multi-Arch Images
on:
push:
branches:
- develop
- main
tags:
- "v*.*.*"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Release Versions:
- [0.2.0](#020)
- [0.1.0](#010)

## Upcoming changes

- refactor!: remove network interfaces (#56)

## 1.4.1

Version 1.4.1 includes two fixes to the CI that are required downstream.
Expand Down
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(all_network_interfaces)

include(FetchContent)
option(CPPZMQ_BUILD_TESTS OFF)
FetchContent_Declare(
cppzmq
GIT_REPOSITORY https://github.com/zeromq/cppzmq/
GIT_TAG v4.7.1
)
FetchContent_MakeAvailable(cppzmq)


add_subdirectory(cpp)
add_subdirectory(source/communication_interfaces)
Expand Down
39 changes: 0 additions & 39 deletions Dockerfile

This file was deleted.

52 changes: 19 additions & 33 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ghcr.io/aica-technology/ros2-modulo-control:humble as base
ARG ROS2_VERSION=humble
FROM ghcr.io/aica-technology/ros2-ws:humble as base
USER ${USER}

FROM base as apt-dependencies
Expand Down Expand Up @@ -52,47 +53,32 @@ xargs -a /tmp/new-packages.txt dpkg-query -L \
# this root can then be copied to / to install everything globally or use LD_LIBRARY_PATH to use it locally
HEREDOC

FROM base as python
COPY --chown=${USER}:${USER} ./python /python
RUN \
--mount=type=cache,target=${HOME}/.cache,id=pip-${TARGETPLATFORM},uid=1000 \
--mount=type=ssh,uid=1000 \
python3 -m pip install --prefix=/tmp/python /python
RUN mkdir -p /tmp/python-home/${USER}/.local/lib/python3.10/ \
&& mv /tmp/python/local/lib/python3.10/dist-packages/ /tmp/python-home/${USER}/.local/lib/python3.10/site-packages/

FROM base as code
WORKDIR /src
COPY --from=apt-dependencies /tmp/apt /
COPY --chown=${USER}:${USER} . /src
COPY --chown=${USER}:${USER} ./source/communication_interfaces /src

FROM code as development
COPY --from=python /tmp/python-home/ /home

FROM code as build
RUN \
--mount=type=cache,target=./build,id=cmake-${TARGETPLATFORM},uid=1000 \
--mount=type=ssh,uid=1000 \
cmake -B build \
&& cmake --build build

FROM build as test
RUN \
--mount=type=cache,target=./build,id=cmake-${TARGETPLATFORM},uid=1000 \
--mount=type=ssh,uid=1000 \
cmake -B build -DBUILD_TESTING=ON \
&& CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target all test
COPY --from=python /tmp/python-home/ /home
RUN python3 -m unittest discover python/test --verbose
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=cmake-${TARGETPLATFORM}-{CACHEID},uid=1000 \
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build

FROM build as install
RUN \
--mount=type=cache,target=./build,id=cmake-${TARGETPLATFORM},uid=1000 \
--mount=type=ssh,uid=1000 \
cmake -B build -DCMAKE_INSTALL_PREFIX=/tmp/net-ifaces \
&& cmake --build build --target all install
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=cmake-${TARGETPLATFORM}-{CACHEID},uid=1000 \
cmake --install build --prefix /tmp/communication-interfaces

FROM build as test
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=cmake-${TARGETPLATFORM}-{CACHEID},uid=1000 \
cmake -B build -DBUILD_TESTING=ON && CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
COPY --from=install /tmp/communication-interfaces /usr/local

FROM scratch as production
COPY --from=apt-dependencies /tmp/apt /
COPY --from=install /tmp/net-ifaces /usr/local
COPY --from=python /tmp/python-home/ /home
COPY --from=install /tmp/communication-interfaces /usr/local
33 changes: 0 additions & 33 deletions build-test.sh

This file was deleted.

98 changes: 0 additions & 98 deletions cpp/CMakeLists.txt

This file was deleted.

40 changes: 0 additions & 40 deletions cpp/include/network_interfaces/control_type.h

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8f29f2b

Please sign in to comment.