Skip to content

Commit

Permalink
Merge pull request #66 from ethz-asl/develop/v2.0
Browse files Browse the repository at this point in the history
Wavemap 2.0
  • Loading branch information
victorreijgwart authored Aug 19, 2024
2 parents c1bfa1d + 79ca200 commit ace3985
Show file tree
Hide file tree
Showing 573 changed files with 19,335 additions and 8,151 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/clion/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG VERSION=latest

FROM ghcr.io/ethz-asl/wavemap:${VERSION}
FROM ghcr.io/ethz-asl/wavemap_ros1:${VERSION}

# Install dependencies
# hadolint ignore=DL3008
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/clion/ros_env.list
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ROS_DISTRO=noetic
ROS_PYTHON_VERSION=3
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_PACKAGE_PATH=/home/ci/catkin_ws/src/dependencies/catkin_simple:/home/ci/catkin_ws/src/dependencies/eigen_catkin:/home/ci/catkin_ws/src/dependencies/gflags_catkin:/home/ci/catkin_ws/src/dependencies/glog_catkin:/home/ci/catkin_ws/src/dependencies/eigen_checks:/home/ci/catkin_ws/src/dependencies/minkindr/minkindr:/home/ci/catkin_ws/src/wavemap/libraries/wavemap:/home/ci/catkin_ws/src/wavemap/tooling/packages/wavemap_all:/home/ci/catkin_ws/src/wavemap/libraries/wavemap_io:/home/ci/catkin_ws/src/wavemap/ros/wavemap_msgs:/home/ci/catkin_ws/src/wavemap/ros/wavemap_ros_conversions:/home/ci/catkin_ws/src/wavemap/ros/wavemap_ros:/home/ci/catkin_ws/src/wavemap/ros/wavemap_rviz_plugin:/home/ci/catkin_ws/src/wavemap/tooling/packages/wavemap_utils:/opt/ros/noetic/share
ROS_PACKAGE_PATH=/home/victor/catkin_ws/src/wavemap/interfaces/ros1/wavemap:/home/victor/catkin_ws/src/wavemap/interfaces/ros1/wavemap_all:/home/victor/catkin_ws/src/wavemap/interfaces/ros1/wavemap_msgs:/home/victor/catkin_ws/src/wavemap/interfaces/ros1/wavemap_ros_conversions:/home/victor/catkin_ws/src/wavemap/examples/ros1:/home/victor/catkin_ws/src/wavemap/interfaces/ros1/wavemap_ros:/home/victor/catkin_ws/src/wavemap/interfaces/ros1/wavemap_rviz_plugin:/opt/ros/noetic/share
CMAKE_PREFIX_PATH=/home/ci/catkin_ws/devel:/opt/ros/noetic
PKG_CONFIG_PATH=/home/ci/catkin_ws/devel/lib/pkgconfig:/opt/ros/noetic/lib/pkgconfig
PYTHONPATH=/home/ci/catkin_ws/devel/lib/python3/dist-packages:/opt/ros/noetic/lib/python3/dist-packages
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/vscode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG VERSION=latest

FROM ghcr.io/ethz-asl/wavemap:${VERSION}
FROM ghcr.io/ethz-asl/wavemap_ros1:${VERSION}

# Create a non-root user and make it the default user
ARG USERNAME=ci
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-ccache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
run: echo "date=$(date -u "+%Y-%m-%d_%H-%M-%S")" >> $GITHUB_OUTPUT

- name: Setup ccache cache sharing
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ inputs.cache-version }}-${{ inputs.cache-group }}-${{ github.sha }}-${{ steps.get-date.outputs.date }}
Expand Down
118 changes: 33 additions & 85 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ on:
# (/github/home is a docker volume mapped to the container's host).
env:
REPOSITORY_NAME: wavemap
DOCKER_FROM_IMAGE: ros:noetic-ros-base-focal
DOCKER_TARGET_ROS_PKG: wavemap_all
DOCKER_CI_REGISTRY: hub.wavemap.vwire.ch
DOCKER_RELEASE_REGISTRY: ghcr.io
DOCKER_RELEASE_TARGET: workspace-built-deps
ROS_HOME: /home/ci/.ros
DOCKER_RELEASE_TARGET: workspace
USER_HOME: /home/ci
CATKIN_WS_PATH: /home/ci/catkin_ws
CCACHE_DIR: /home/ci/ccache

Expand All @@ -39,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
Expand All @@ -60,7 +58,7 @@ jobs:
LOCAL_IMAGE_NAME: ${{ needs.common-variables.outputs.local_ci_image_name }}
steps:
- name: Fetch the package's repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{ env.REPOSITORY_NAME }}

Expand All @@ -72,120 +70,60 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Prepare ccache to accelerate the build
id: get-date
# NOTE: Installing tar is required for actions/cache@v3 to work properly
# on docker:20.10.9-dind.
run: |
apk add --no-cache tar
mkdir -p ccache
echo "date=$(date -u "+%Y-%m-%d_%H-%M-%S")" >> $GITHUB_OUTPUT
- name: Pull in ccache's cache
uses: actions/cache@v3
with:
path: ccache
key: ccache-${{ secrets.CCACHE_CACHE_VERSION }}-noetic-gcc-docker-${{ github.sha }}-${{ steps.get-date.outputs.date }}
restore-keys: |
ccache-${{ secrets.CCACHE_CACHE_VERSION }}-noetic-gcc-docker-${{ github.sha }}-
ccache-${{ secrets.CCACHE_CACHE_VERSION }}-noetic-gcc-docker-
- name: Start measuring the build time
id: start-time
run: |
stamp=$(date +%s)
echo "stamp=${stamp}" >> $GITHUB_OUTPUT
uses: docker/setup-buildx-action@v3

- name: Build the ${{ env.DOCKER_RELEASE_TARGET }} image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/full.Dockerfile
context: ${{ env.REPOSITORY_NAME }}
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/ros1/full.Dockerfile
target: ${{ env.DOCKER_RELEASE_TARGET }}
build-args: |
FROM_IMAGE=${{ env.DOCKER_FROM_IMAGE }}
REPOSITORY_NAME=${{ env.REPOSITORY_NAME }}
USER_HOME=${{ env.USER_HOME }}
CATKIN_WS_PATH=${{ env.CATKIN_WS_PATH }}
CCACHE_DIR=${{ env.CCACHE_DIR }}
ROS_HOME=${{ env.ROS_HOME }}
REPOSITORY_NAME=${{ env.REPOSITORY_NAME }}
PACKAGE_NAME=${{ env.DOCKER_TARGET_ROS_PKG }}
load: true
cache-from: ${{ env.CACHE_IMAGE_NAME }}
cache-to: ${{ env.CACHE_IMAGE_NAME }},mode=max
tags: ${{ env.LOCAL_IMAGE_NAME }}

- name: Determine whether the ccache cache should be updated
id: should-writeback-ccache
run: |
runtime=$(( $(date +%s) - ${{ steps.start-time.outputs.stamp }} ))
threshold=300 # seconds
echo $runtime
answer=false
if [ $threshold -le $runtime ]; then
answer=true
fi
echo "answer=${answer}" >> $GITHUB_OUTPUT
- name: Test the ${{ env.DOCKER_RELEASE_TARGET }} image
run: docker run --rm ${{ env.LOCAL_IMAGE_NAME }}

- name: Push the ${{ env.DOCKER_RELEASE_TARGET }} image locally
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/full.Dockerfile
context: ${{ env.REPOSITORY_NAME }}
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/ros1/full.Dockerfile
target: ${{ env.DOCKER_RELEASE_TARGET }}
build-args: |
FROM_IMAGE=${{ env.DOCKER_FROM_IMAGE }}
CATKIN_WS_PATH=${{ env.CATKIN_WS_PATH }}
CCACHE_DIR=${{ env.CCACHE_DIR }}
ROS_HOME=${{ env.ROS_HOME }}
REPOSITORY_NAME=${{ env.REPOSITORY_NAME }}
PACKAGE_NAME=${{ env.DOCKER_TARGET_ROS_PKG }}
push: true
cache-from: ${{ env.CACHE_IMAGE_NAME }}
tags: ${{ env.LOCAL_IMAGE_NAME }}

- name: Write back the build's ccache cache
if: steps.should-writeback-ccache.outputs.answer == 'true'
uses: docker/build-push-action@v3
with:
context: .
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/full.Dockerfile
target: workspace-deps-builder-ccache-extractor
build-args: |
FROM_IMAGE=${{ env.DOCKER_FROM_IMAGE }}
USER_HOME=${{ env.USER_HOME }}
CATKIN_WS_PATH=${{ env.CATKIN_WS_PATH }}
CCACHE_DIR=${{ env.CCACHE_DIR }}
ROS_HOME=${{ env.ROS_HOME }}
REPOSITORY_NAME=${{ env.REPOSITORY_NAME }}
PACKAGE_NAME=${{ env.DOCKER_TARGET_ROS_PKG }}
push: true
cache-from: ${{ env.CACHE_IMAGE_NAME }}
tags: ${{ env.LOCAL_IMAGE_NAME }}
outputs: type=local,dest=ccache

- name: Extract metadata to annotate the image
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.DOCKER_RELEASE_REGISTRY }}/${{ github.repository }}
images: ${{ env.DOCKER_RELEASE_REGISTRY }}/${{ github.repository }}_ros1

- name: Publish the ${{ env.DOCKER_RELEASE_TARGET }} image
if: startsWith(github.event.ref, 'refs/tags/v')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/full.Dockerfile
context: ${{ env.REPOSITORY_NAME }}
file: ${{ env.REPOSITORY_NAME }}/tooling/docker/ros1/full.Dockerfile
target: ${{ env.DOCKER_RELEASE_TARGET }}
build-args: |
FROM_IMAGE=${{ env.DOCKER_FROM_IMAGE }}
REPOSITORY_NAME=${{ env.REPOSITORY_NAME }}
USER_HOME=${{ env.USER_HOME }}
CATKIN_WS_PATH=${{ env.CATKIN_WS_PATH }}
CCACHE_DIR=${{ env.CCACHE_DIR }}
ROS_HOME=${{ env.ROS_HOME }}
REPOSITORY_NAME=${{ env.REPOSITORY_NAME }}
PACKAGE_NAME=${{ env.DOCKER_TARGET_ROS_PKG }}
push: true
cache-from: ${{ env.CACHE_IMAGE_NAME }}
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -199,17 +137,27 @@ jobs:
image: ${{ needs.build-image.outputs.image }}
steps:
- name: Fetch the package's repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies (doxygen+sphinx+breathe+exhale toolchain)
run: |
apt-get update
apt-get install -q -y --no-install-recommends python3-pip doxygen
apt-get install -q -y --no-install-recommends latexmk texlive-latex-extra tex-gyre texlive-fonts-recommended texlive-latex-recommended
pip3 install exhale sphinx-sitemap
pip3 install exhale sphinx-sitemap sphinx-design
pip3 install sphinxawesome-theme --pre
pip3 install "sphinx<7,>6"
- name: Parse C++ library with Doxygen
working-directory: ${{ env.CATKIN_WS_PATH }}/src/${{ env.REPOSITORY_NAME }}/docs
shell: bash
run: doxygen Doxyfile_cpp

- name: Parse ROS1 interface with Doxygen
working-directory: ${{ env.CATKIN_WS_PATH }}/src/${{ env.REPOSITORY_NAME }}/docs
shell: bash
run: doxygen Doxyfile_ros1

- name: Build documentation site
working-directory: ${{ env.CATKIN_WS_PATH }}/src/${{ env.REPOSITORY_NAME }}/docs
shell: bash
Expand Down
Loading

0 comments on commit ace3985

Please sign in to comment.