Skip to content
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
17 changes: 17 additions & 0 deletions .devcontainer/lyrical/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://aka.ms/devcontainer.json
{
"dockerComposeFile": "../../docker/docker-compose.yaml",
"shutdownAction": "stopCompose",

"name": "Fixposition SDK (ROS Lyrical)", "service": "lyrical-dev", "runServices": [ "lyrical-dev" ],

// Use this user in the container, re-map IDs to local user automatically
"remoteUser": "fpsdk",
"updateRemoteUserUID": true,

// compare .services.lyrical-dev.volumes in ../../docker/docker-compose.yaml
"workspaceFolder": "/home/fpsdk/fixposition-sdk",

// Deliberately empty, see fpsdk.code-workspace instead
"customizations": {}
}
28 changes: 25 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,34 @@ jobs:
name: fpsdk_common_versions_jazzy
path: build/jazzy-ci_build_toplevel_release_ros2/*/*_versions.txt

ci-fpsdk-lyrical:
runs-on: ubuntu-latest
container:
image: ghcr.io/fixposition/fixposition-sdk:lyrical-ci
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v6
- name: CI
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
./docker/ci.sh
- name: Artefacts
uses: actions/upload-artifact@v6
with:
name: fpsdk_common_versions_lyrical
path: build/lyrical-ci_build_toplevel_release_ros2/*/*_versions.txt

ci-images:
runs-on: ubuntu-latest
needs: # we build the images only if these are successful
- ci-fpsdk-trixie
- ci-fpsdk-noetic
- ci-fpsdk-humble
- ci-fpsdk-jazzy
- ci-fpsdk-lyrical
steps:
- name: Checkout
uses: actions/checkout@v6
Expand All @@ -109,16 +130,16 @@ jobs:
- name: Pull
run: |
cd ${GITHUB_WORKSPACE}/docker
COMPOSE_PARALLEL_LIMIT=4 docker compose pull trixie-base noetic-base humble-base jazzy-base
COMPOSE_PARALLEL_LIMIT=4 docker compose pull trixie-base noetic-base humble-base jazzy-base lyrical-base
- name: Build
run: |
cd ${GITHUB_WORKSPACE}/docker
COMPOSE_PARALLEL_LIMIT=1 docker compose build build-trixie-run build-noetic-run build-humble-run build-jazzy-run
COMPOSE_PARALLEL_LIMIT=1 docker compose build build-trixie-run build-noetic-run build-humble-run build-jazzy-run build-lyrical-run
- name: Push
if: ${{ github.ref == 'refs/heads/main' }}
run: |
cd ${GITHUB_WORKSPACE}/docker
docker compose push build-trixie-run build-noetic-run build-humble-run build-jazzy-run
docker compose push build-trixie-run build-noetic-run build-humble-run build-jazzy-run build-lyrical-run
- name: Expire old images
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/delete-package-versions@v5 # https://github.com/actions/delete-package-versions
Expand All @@ -137,6 +158,7 @@ jobs:
- ci-fpsdk-noetic
- ci-fpsdk-humble
- ci-fpsdk-jazzy
- ci-fpsdk-lyrical
permissions:
pages: write
id-token: write
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,48 @@ jobs:
docker compose push build-jazzy-run


docker-fpsdk-lyrical:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Login
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build and push (!) one image after the other. E.g. we must build and push base before we can build ci, because it needs base (in the registry)
- name: Build and push (base)
run: |
cd ${GITHUB_WORKSPACE}/docker
COMPOSE_PARALLEL_LIMIT=1 docker compose build build-lyrical-base
docker compose push build-lyrical-base
- name: Build and push (ci)
run: |
cd ${GITHUB_WORKSPACE}/docker
COMPOSE_PARALLEL_LIMIT=1 docker compose build build-lyrical-ci
docker compose push build-lyrical-ci
- name: Build and push (dev)
run: |
cd ${GITHUB_WORKSPACE}/docker
COMPOSE_PARALLEL_LIMIT=1 docker compose build build-lyrical-dev
docker compose push build-lyrical-dev
- name: Build and push (run)
run: |
cd ${GITHUB_WORKSPACE}/docker
COMPOSE_PARALLEL_LIMIT=1 docker compose build build-lyrical-run
docker compose push build-lyrical-run


docker-fpsdk-cleanup:
runs-on: ubuntu-latest
needs:
- docker-fpsdk-trixie
- docker-fpsdk-noetic
- docker-fpsdk-humble
- docker-fpsdk-jazzy
- docker-fpsdk-lyrical
steps:
- name: Expire old images
uses: actions/delete-package-versions@v5
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ baz*
/*.yaml
/*.gz
/*.json
/.claude

# We must not commit such files ever. See section FPSDK_BUILD_ROS in fpsdk_doc/fpsdk_build.hpp
CATKIN_IGNORE
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ $(BUILD_DIR)/.lint-clang-tidy: $(BUILD_DIR)/.make-build
# ----------------------------------------------------------------------------------------------------------------------

.PHONY: ci
ci: $(BUILD_DIR)/.ci-bookworm $(BUILD_DIR)/.ci-noetic $(BUILD_DIR)/.ci-humble $(BUILD_DIR)/.ci-jazzy
ci: $(BUILD_DIR)/.ci-bookworm $(BUILD_DIR)/.ci-noetic $(BUILD_DIR)/.ci-humble $(BUILD_DIR)/.ci-jazzy $(BUILD_DIR)/.ci-lyrical

$(BUILD_DIR)/.ci-bookworm: $(deps)
@echo "$(HLW)***** CI (bookworm) *****$(HLO)"
Expand Down Expand Up @@ -316,6 +316,16 @@ else
@false
endif

$(BUILD_DIR)/.ci-lyrical: $(deps)
@echo "$(HLW)***** CI (lyrical) *****$(HLO)"
ifeq ($(FPSDK_IMAGE),)
$(V)docker/docker.sh run lyrical-ci ./docker/ci.sh
$(V)$(TOUCH) $@
else
@echo "This ($@) should not run inside Docker!"
@false
endif

# ----------------------------------------------------------------------------------------------------------------------

.PHONY: pre-commit
Expand Down
38 changes: 38 additions & 0 deletions docker/Dockerfile.lyrical-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
########################################################################################################################
# ___ ___
# \ \ / /
# \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors
# / /\ \ License: see the LICENSE file
# /__/ \__\
#
########################################################################################################################

# ROS Lyrical Luth (LTS until May 2031) base image (Ubuntu 26.04 LTS "Resolute")
FROM ros:lyrical-ros-base

# Metadata for github packages
LABEL org.opencontainers.image.description="Fixposition SDK docker image: ROS Lyrical (Ubuntu 26.04 Resolute) base image with minimal stuff required to build"
LABEL org.opencontainers.image.source=https://github.com/fixposition

# Variables used in our Docker build and CI scripts
ENV FPSDK_IMAGE=lyrical-base
ENV ROS_DISTRO=lyrical

# Remove automatic use of /ros_entrypoint.sh, we'll deal with this ourselves
ENTRYPOINT []

# Install stuff
COPY docker/scripts/install_apt_base.sh /tmp
RUN /tmp/install_apt_base.sh && rm -f /tmp/install_apt_base.sh

# Download, build and install FFmpeg libraries (LGPL)
COPY docker/scripts/install_ffmpeg.sh /tmp
RUN /tmp/install_ffmpeg.sh && rm -f /tmp/install_ffmpeg.sh

# Update ld cache for the installed libraries
RUN /usr/sbin/ldconfig

# For debugging docker builds... (last layer!)
RUN date > /fixposition-sdk-${FPSDK_IMAGE}

########################################################################################################################
31 changes: 31 additions & 0 deletions docker/Dockerfile.lyrical-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
########################################################################################################################
# ___ ___
# \ \ / /
# \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors
# / /\ \ License: see the LICENSE file
# /__/ \__\
#
########################################################################################################################

FROM ghcr.io/fixposition/fixposition-sdk:lyrical-base

# Metadata for github packages
LABEL org.opencontainers.image.description="Fixposition SDK docker image: ROS Lyrical (Ubuntu 26.04 Resolute) image for Github CI jobs"
LABEL org.opencontainers.image.source=https://github.com/fixposition

# Variables used in our Docker build and CI scripts
ENV FPSDK_IMAGE=lyrical-ci

# # Install pre-commit hooks (root user)
# COPY .pre-commit-config.yaml /tmp
# COPY docker/scripts/install_precommithooks.sh /tmp
# RUN /tmp/install_precommithooks.sh && rm -f /tmp/install_precommithooks.sh /tmp/.pre-commit-config.yaml

# Install useful stuff
COPY docker/scripts/install_apt_ci.sh /tmp
RUN /tmp/install_apt_ci.sh && rm -f /tmp/install_apt_ci.share

# For debugging docker builds... (last layer!)
RUN date > /fixposition-sdk-${FPSDK_IMAGE}

########################################################################################################################
60 changes: 60 additions & 0 deletions docker/Dockerfile.lyrical-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
########################################################################################################################
# ___ ___
# \ \ / /
# \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors
# / /\ \ License: see the LICENSE file
# /__/ \__\
#
########################################################################################################################

FROM ghcr.io/fixposition/fixposition-sdk:lyrical-base

# Metadata for github packages
LABEL org.opencontainers.image.description="Fixposition SDK docker image: ROS Lyrical (Ubuntu 26.04 Resolute) image for vscode devcontainer"
LABEL org.opencontainers.image.source=https://github.com/fixposition

# Variables used in our Docker build and CI scripts
ENV FPSDK_IMAGE=lyrical-dev

# Unminimize system
COPY docker/scripts/unminimize_system.sh /tmp
RUN /tmp/unminimize_system.sh && rm -f /tmp/unminimize_system.sh

# Add user for devcontainer, see ../.devcontainer/devcontainer.json
COPY docker/scripts/adduser_fpsdk.sh /tmp
RUN /tmp/adduser_fpsdk.sh && rm -f /tmp/adduser_fpsdk.sh

# # Install pre-commit hooks (fpsdk user)
# COPY .pre-commit-config.yaml /tmp
# COPY docker/scripts/install_precommithooks.sh /tmp
# RUN sudo -u fpsdk /tmp/install_precommithooks.sh && rm -f /tmp/install_precommithooks.sh /tmp/.pre-commit-config.yaml

# Install git-bash-prompt (fpsdk user)
COPY .devcontainer/fpsdk.bgptheme /tmp
COPY docker/scripts/install_gitbashprompt.sh /tmp
RUN sudo -u fpsdk /tmp/install_gitbashprompt.sh && rm -f /tmp/install_gitbashprompt.sh /tmp/.devcontainer/fpsdk.bgptheme

# Set timezone, sane language and locale
ENV TZ=Europe/Zurich
ENV LANG=en_GB.UTF-8
ENV LANGUAGE=en_GB
ENV LC_ALL=C.UTF-8
COPY docker/scripts/install_locales.sh /tmp
RUN /tmp/install_locales.sh && rm -f /tmp/install_locales.sh

# Install yq
COPY docker/scripts/install_yq.sh /tmp
RUN /tmp/install_yq.sh && rm -f /tmp/install_yq.sh

# Install mcap
COPY docker/scripts/install_mcap.sh /tmp
RUN /tmp/install_mcap.sh && rm -f /tmp/install_mcap.sh

# Install useful stuff
COPY docker/scripts/install_apt_dev.sh /tmp
RUN /tmp/install_apt_dev.sh && rm -f /tmp/install_apt_dev.share

# For debugging docker builds... (last layer!)
RUN date > /fixposition-sdk-${FPSDK_IMAGE}

########################################################################################################################
37 changes: 37 additions & 0 deletions docker/Dockerfile.lyrical-run
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
########################################################################################################################
# ___ ___
# \ \ / /
# \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors
# / /\ \ License: see the LICENSE file
# /__/ \__\
#
########################################################################################################################

FROM ghcr.io/fixposition/fixposition-sdk:lyrical-base

# Metadata for github packages
LABEL org.opencontainers.image.description="Fixposition SDK docker image: ROS Lyrical (Ubuntu 26.04 Resolute) image with pre-built binaries"
LABEL org.opencontainers.image.source=https://github.com/fixposition

# Variables used in our Docker build and CI scripts
ENV FPSDK_IMAGE=lyrical-run

# Install useful stuff
COPY docker/scripts/install_apt_run.sh /tmp
RUN /tmp/install_apt_run.sh && rm -f /tmp/install_apt_run.sh

COPY .git /tmp/fpsdk/.git/
RUN <<EOF
# Compile and install Fixposition SDK
cd /tmp/fpsdk
git checkout -- .
. /opt/ros/lyrical/setup.sh
make -C /tmp/fpsdk install BUILD_TESTING=OFF BUILD_TYPE=Release INSTALL_PREFIX=/usr/local
EOF

ENTRYPOINT [ "/ros_entrypoint.sh" ]

# For debugging docker builds... (last layer!)
RUN date > /fixposition-sdk-${FPSDK_IMAGE}

########################################################################################################################
10 changes: 8 additions & 2 deletions docker/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if [ -z "${FPSDK_IMAGE:-}" ]; then
export ROS_DISTRO=humble
elif [ -d /opt/ros/jazzy ]; then
export ROS_DISTRO=jazzy
elif [ -d /opt/ros/lyrical ]; then
export ROS_DISTRO=lyrical
else
export ROS_DISTRO=
fi
Expand Down Expand Up @@ -106,6 +108,7 @@ function build_toplevel_release_noros
rm -rf build/${buildname}
make install \
INSTALL_PREFIX=install/${buildname} \
BUILD_TESTING=ON USE_FFMPEG=ON USE_PROJ=ON \
BUILD_TYPE=Release \
BUILD_DIR=build/${buildname} || return 1
install/${buildname}/bin/fpltool -V || return 1
Expand All @@ -119,6 +122,7 @@ function test_toplevel_release_noros
cd ${FPSDK_SRC_DIR}
make test \
INSTALL_PREFIX=install/${buildname} \
BUILD_TESTING=ON USE_FFMPEG=ON USE_PROJ=ON \
BUILD_TYPE=Release \
BUILD_DIR=build/${buildname} || return 1
}
Expand All @@ -134,6 +138,7 @@ function build_toplevel_debug_noros
rm -rf build/${buildname}
make install \
INSTALL_PREFIX=install/${buildname} \
BUILD_TESTING=ON USE_FFMPEG=ON USE_PROJ=ON \
BUILD_TYPE=Debug \
BUILD_DIR=build/${buildname} || return 1
install/${buildname}/bin/fpltool -V || return 1
Expand All @@ -147,6 +152,7 @@ function test_toplevel_debug_noros
cd ${FPSDK_SRC_DIR}
make test \
INSTALL_PREFIX=install/${buildname} \
BUILD_TESTING=ON USE_FFMPEG=ON USE_PROJ=ON \
BUILD_TYPE=Debug \
BUILD_DIR=build/${buildname} || return 1
}
Expand Down Expand Up @@ -507,7 +513,7 @@ function build_colcon_release
ln -s ../../../fpsdk_apps .
ln -s ../../../examples/ros2_fpsdk_demo .
cd ..
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release || return 1
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release || return 1
set +u
source install/setup.bash || return 1
set -u
Expand Down Expand Up @@ -573,7 +579,7 @@ if [ "${ROS_DISTRO}" = "noetic" ]; then
#do_step doxygen_release_ros1 || true # continue

# - Or ROS 2
elif [ "${ROS_DISTRO}" = "humble" -o "${ROS_DISTRO}" = "jazzy" ]; then
elif [ "${ROS_DISTRO}" = "humble" -o "${ROS_DISTRO}" = "jazzy" -o "${ROS_DISTRO}" = "lyrical" ]; then
echo "===== ROS2 builds ====="
set +u
source /opt/ros/${ROS_DISTRO}/setup.bash
Expand Down
Loading
Loading