-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 2.0.0 constitutes a major refactor of the Modulo project. It now provides stand-alone classes and helpers for handling and translating messages and parameters in modulo_core, with new and improved component classes for dynamic application composition in modulo_components. The old concepts of Cell and Component have been fully redeveloped into modulo_components::Component and modulo_components::LifecycleComponent, which provide a simple framework for creating stateless (unmanaged) or state-based (managed) custom components. For more information, see the new description of each package in the respective README.md files and view the full generated documentation on [epfl-lasa.github.io/modulo](epfl-lasa.github.io/modulo).
- Loading branch information
Showing
150 changed files
with
12,516 additions
and
4,502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions | ||
FROM ghcr.io/aica-technology/ros2-control-libraries:galactic-devel | ||
|
||
# Copy and set the entrypoint commands to execute when the container starts, | ||
# explicilty invoking as ros2 user and with bash interpreter. | ||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["sudo", "su", "-", "ros2", "-c", "/bin/bash", "-c", "/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: 'Build and Test (Galactic)' | ||
description: 'Build the source packages and run all unit tests' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
STEP=1 | ||
build_and_test() { | ||
PACKAGE=$1 | ||
|
||
echo ">>> ${STEP}: Building ${PACKAGE}..." | ||
cp -r /github/workspace/source/"${PACKAGE}" ./src/"${PACKAGE}" | ||
if ! colcon build --packages-select "${PACKAGE}"; then | ||
echo ">>> [ERROR] Build stage ${STEP} failed!" | ||
exit "${STEP}" | ||
fi | ||
echo ">>> Build stage ${STEP} completed successfully!" | ||
STEP=$((STEP+1)) | ||
|
||
echo ">>> ${STEP}: Testing ${PACKAGE}..." | ||
if ! colcon test --packages-select "${PACKAGE}" --return-code-on-test-failure; then | ||
colcon test-result --verbose | ||
echo ">>> [ERROR] Test stage ${STEP} failed!" | ||
exit "${STEP}" | ||
fi | ||
echo ">>> Test stage ${STEP} completed successfully!" | ||
STEP=$((STEP+1)) | ||
} | ||
|
||
source /opt/ros/"${ROS_DISTRO}"/setup.bash | ||
cd /home/ros2/ros2_ws | ||
|
||
build_and_test modulo_component_interfaces | ||
build_and_test modulo_core | ||
build_and_test modulo_components | ||
|
||
echo ">>> All build and test stages completed successfully!" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
- develop | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build and Test | ||
|
||
# Run workflow on pushes to main and develop branches, on any pull request, or by manual dispatch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
# Define the build test jobs | ||
jobs: | ||
|
||
check-contribution: | ||
name: Check if changelog and version have been updated | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Check contributions | ||
if: ${{ github.event.pull_request.base.sha }} | ||
run: | | ||
git fetch origin main ${{ github.event.pull_request.base.sha }} | ||
VER_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./VERSION) | ||
if ! [ "${VER_DIFF}" ]; then | ||
echo "::warning title=Contribution check failed::VERSION must be updated!" | ||
exit 1 | ||
fi | ||
CL_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./CHANGELOG.md) | ||
if ! [ "${CL_DIFF}" ]; then | ||
echo "::warning title=Contribution check failed::CHANGELOG.md must be updated!" | ||
exit 1 | ||
fi | ||
shell: bash | ||
|
||
# check if jobs can be skipped | ||
check-skippable-changes: | ||
name: Check skippable changes | ||
runs-on: ubuntu-latest | ||
outputs: | ||
skip: ${{ steps.check_if_skippable.outputs.should_skip }} | ||
steps: | ||
- id: check_if_skippable | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
cancel_others: 'true' | ||
do_not_skip: '["workflow_dispatch"]' | ||
paths_ignore: '["**.md"]' | ||
skip_after_successful_duplicate: 'true' | ||
|
||
build-test-galactic: | ||
needs: check-skippable-changes | ||
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }} | ||
runs-on: ubuntu-latest | ||
name: Galactic build and test | ||
steps: | ||
# First check out the repository | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Load the repository build-test action | ||
- name: Build and Test | ||
uses: ./.github/actions/build-test-galactic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Generate and Deploy Documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: Generate and Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Generate docs | ||
uses: mattnotmitt/doxygen-action@v1 | ||
with: | ||
working-directory: 'doxygen' | ||
doxyfile-path: 'doxygen.conf' | ||
|
||
- name: Tag release version | ||
if: ${{ github.event_name == 'release' }} | ||
shell: bash | ||
run: | | ||
TAG="${GITHUB_REF#refs/tags/}" | ||
TAG="${TAG/\//-}" | ||
mkdir -p doxygen/docs/versions | ||
sudo mv doxygen/docs/html doxygen/docs/versions/${TAG} | ||
- name: Tag branch version | ||
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | ||
shell: bash | ||
run: | | ||
BRANCH="${GITHUB_REF#refs/heads/}" | ||
BRANCH="${BRANCH/\//-}" | ||
mkdir -p doxygen/docs/versions | ||
sudo mv doxygen/docs/html doxygen/docs/versions/${BRANCH} | ||
- name: Deploy to documentation branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: docs | ||
publish_dir: ./doxygen/docs | ||
keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
|
||
.idea | ||
cmake-build-* | ||
|
||
doxygen/docs/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
ARG ROS_VERSION=galactic | ||
FROM ghcr.io/aica-technology/ros2-control-libraries:${ROS_VERSION} as development | ||
|
||
ARG BASE_TAG=galactic | ||
FROM ghcr.io/aica-technology/ros2-control-libraries:${BASE_TAG} as dependencies | ||
WORKDIR ${HOME}/ros2_ws | ||
# copy sources and build ROS workspace with user permissions | ||
WORKDIR ${HOME}/ros2_ws/ | ||
COPY --chown=${USER} ./source/ ./src/ | ||
|
||
# clean image | ||
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
FROM development as production | ||
FROM dependencies as modulo-component-interfaces | ||
|
||
# build modulo | ||
COPY --chown=${USER} ./source/modulo_component_interfaces ./src/modulo_component_interfaces | ||
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build" | ||
|
||
|
||
FROM modulo-component-interfaces as modulo-core | ||
|
||
COPY --chown=${USER} ./source/modulo_core ./src/modulo_core | ||
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build --packages-select modulo_core" | ||
|
||
|
||
FROM modulo-core as modulo-components | ||
|
||
COPY --chown=${USER} ./source/modulo_components ./src/modulo_components | ||
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build --packages-select modulo_components" | ||
|
||
# clean image | ||
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* |
Oops, something went wrong.