Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for Ubuntu Noble #116

Merged
merged 7 commits into from
Jul 23, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [focal, jammy]
distro: [focal, jammy, noble]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [focal, jammy]
distro: [focal, jammy, noble]
container:
image: ghcr.io/tesseract-robotics/tesseract_planning:${{ matrix.distro }}-0.22
env:
Expand All @@ -35,13 +35,24 @@ jobs:
run: |
apt update
apt upgrade -y
apt install -y wget qt-advanced-docking-system
apt install -y wget
cd $GITHUB_WORKSPACE/target_ws/src
./.add-gazebo-ppa
- name: Install Depends (non-noble)
if: ${{ matrix.distro != 'noble' }}
shell: bash
run: |
apt install -y libgz-rendering7-dev libgz-common5-dev libgz-math7-dev
apt install -y qt-advanced-docking-system
- name: Install Depends (noble)
if: ${{ matrix.distro == 'noble' }}
shell: bash
run: |
apt install -y libgz-rendering8-dev libgz-common5-dev libgz-math7-dev
apt install -y libqt-advanced-docking-system-dev

- name: Build and Tests
uses: tesseract-robotics/colcon-action@v2
uses: tesseract-robotics/colcon-action@v8
with:
before-script: source /opt/tesseract/install/setup.bash && source /opt/tesseract_planning/install/setup.bash
ccache-prefix: ${{ matrix.distro }}
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [focal, jammy]
distro: [focal, jammy, noble]
container:
image: ghcr.io/tesseract-robotics/tesseract_planning:${{ matrix.distro }}-master
env:
Expand All @@ -35,13 +35,24 @@ jobs:
run: |
apt update
apt upgrade -y
apt install -y wget qt-advanced-docking-system
apt install -y wget
cd $GITHUB_WORKSPACE/target_ws/src
./.add-gazebo-ppa
- name: Install Depends (non-noble)
if: ${{ matrix.distro != 'noble' }}
shell: bash
run: |
apt install -y libgz-rendering7-dev libgz-common5-dev libgz-math7-dev
apt install -y qt-advanced-docking-system
- name: Install Depends (noble)
if: ${{ matrix.distro == 'noble' }}
shell: bash
run: |
apt install -y libgz-rendering8-dev libgz-common5-dev libgz-math7-dev
apt install -y libqt-advanced-docking-system-dev

- name: Build and Tests
uses: tesseract-robotics/colcon-action@v2
uses: tesseract-robotics/colcon-action@v8
with:
before-script: source /opt/tesseract/install/setup.bash && source /opt/tesseract_planning/install/setup.bash
ccache-prefix: ${{ matrix.distro }}
Expand Down
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ project(${pkg_extracted_name} VERSION ${pkg_extracted_version} LANGUAGES C CXX)

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Determine Ubuntu release
find_program(LSB_RELEASE_EXEC lsb_release)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs OUTPUT_VARIABLE LSB_RELEASE_CODE_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

if(WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
Expand Down Expand Up @@ -50,10 +57,15 @@ set(DEPS
if(${BUILD_RENDERING})
message("Building rendering module")
add_subdirectory(rendering)
if((EXISTS LSB_RELEASE_CODE_SHORT) AND (LSB_RELEASE_CODE_SHORT STREQUAL "noble"))
set(GZ-RENDERING gz-rendering8)
else()
set(GZ-RENDERING gz-rendering7)
endif()
list(
APPEND
DEPS
gz-rendering7
${GZ_RENDERING}
gz-math7-eigen3
"gz-common5 COMPONENTS profiler events av")
endif()
Expand Down
10 changes: 8 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ USER root

# Install the dependency
COPY .add-gazebo-ppa /tmp/add_gazebo_ppa.sh
RUN apt install -y wget qt-advanced-docking-system \
RUN apt install -y wget \
&& ./tmp/add_gazebo_ppa.sh \
&& apt install -y qt-advanced-docking-system libgz-rendering7-dev libgz-common5-dev libgz-math7-dev
&& if [[ $(lsb_release -cs) != noble ]] ; then \
apt install -y libgz-rendering7-dev libgz-common5-dev libgz-math7-dev \
&& apt install -y qt-advanced-docking-system \
; else \
apt install -y libgz-rendering8-dev libgz-common5-dev libgz-math7-dev \
&& apt install -y libqt-advanced-docking-system-dev \
; fi

# Bind mount the source directory so as not to unnecessarily copy source code into the docker image
ARG WORKSPACE_DIR=/opt/tesseract_qt
Expand Down
23 changes: 20 additions & 3 deletions rendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,24 @@ find_package(
OpenGL
REQUIRED)

find_package(gz-rendering7 REQUIRED)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(LSB_RELEASE_CODE_SHORT STREQUAL "noble")
find_package(gz-rendering8 REQUIRED)
# Workaround instead of an ALIAS target, compatible with older CMake
add_library(gz-rendering INTERFACE IMPORTED)
set_target_properties(gz-rendering PROPERTIES INTERFACE_LINK_LIBRARIES gz-rendering8::gz-rendering8)
else()
find_package(gz-rendering7 REQUIRED)
# Workaround instead of an ALIAS target, compatible with older CMake
add_library(gz-rendering INTERFACE IMPORTED)
set_target_properties(gz-rendering PROPERTIES INTERFACE_LINK_LIBRARIES gz-rendering7::gz-rendering7)
endif()
else()
find_package(gz-rendering7 REQUIRED)
# Workaround instead of an ALIAS target, compatible with older CMake
add_library(gz-rendering INTERFACE IMPORTED)
set_target_properties(gz-rendering PROPERTIES INTERFACE_LINK_LIBRARIES gz-rendering7::gz-rendering7)
endif()
find_package(gz-common5 COMPONENTS profiler events av REQUIRED)
find_package(gz-math7 REQUIRED)
find_package(gz-math7-eigen3 REQUIRED)
Expand All @@ -22,7 +39,7 @@ target_link_libraries(
gz-common5::gz-common5-profiler
gz-common5::gz-common5-events
gz-common5::gz-common5-av
gz-rendering7::gz-rendering7
gz-rendering
gz-math7::gz-math7
gz-math7::gz-math7-eigen3
${PROJECT_NAME}_common)
Expand Down Expand Up @@ -52,7 +69,7 @@ target_link_libraries(
gz-common5::gz-common5-profiler
gz-common5::gz-common5-events
gz-common5::gz-common5-av
gz-rendering7::gz-rendering7
gz-rendering
gz-math7::gz-math7-eigen3
Qt5::Core
Qt5::Gui
Expand Down
10 changes: 10 additions & 0 deletions studio/include/tesseract_qt/studio/plot_docker.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@
#define TESSERACT_QT_PLOT_PLOT_DOCKER_H

#ifndef Q_MOC_RUN
#if __has_include(<qtadvanceddocking/DockManager.h>)
#include <qtadvanceddocking/DockManager.h>
#include <qtadvanceddocking/DockWidget.h>
#include <qtadvanceddocking/DockAreaWidget.h>
#include <qtadvanceddocking/DockAreaTitleBar.h>
#include <qtadvanceddocking/DockAreaTabBar.h>
#include <qtadvanceddocking/FloatingDockContainer.h>
#include <qtadvanceddocking/DockComponentsFactory.h>
#else
#include <DockManager.h>
#include <DockWidget.h>
#include <DockAreaWidget.h>
#include <DockAreaTitleBar.h>
#include <DockAreaTabBar.h>
#include <FloatingDockContainer.h>
#include <DockComponentsFactory.h>
#endif
#include <tesseract_qt/plot/plot_data.h>
#include <tesseract_qt/plot/plot_widget.h>
#endif
Expand Down
4 changes: 4 additions & 0 deletions studio/include/tesseract_qt/studio/studio_dock_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@

#ifndef Q_MOC_RUN
#include <string>
#if __has_include(<qtadvanceddocking/DockManager.h>)
#include <qtadvanceddocking/DockAreaWidget.h>
#else
#include <DockAreaWidget.h>
#endif
#endif

namespace YAML
{
Expand Down
4 changes: 4 additions & 0 deletions studio/src/plot_docker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
#include <tesseract_qt/studio/plot_docker.h>
#include <tesseract_qt/plot/plot_widget_editor.h>
#include <tesseract_qt/common/svg_util.h>
#if __has_include(<qtadvanceddocking/DockManager.h>)
#include <qtadvanceddocking/DockSplitter.h>
#else
#include <DockSplitter.h>
#endif
#include <QPushButton>
#include <QBoxLayout>
#include <QMouseEvent>
Expand Down
7 changes: 6 additions & 1 deletion studio/src/studio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@
#include <tesseract_qt/studio/studio_plugin_loader_dialog.h>
#include <tesseract_qt/studio/studio_dock_widget_factory.h>

#include <DockManager.h>
#if __has_include(<qtadvanceddocking/DockManager.h>)
#include <qtadvanceddocking/DockAreaWidget.h>
#include <qtadvanceddocking/DockManager.h>
#else
#include <DockAreaWidget.h>
#include <DockManager.h>
#endif

#include <QSettings>
#include <QWidgetAction>
Expand Down
Loading