Skip to content

Commit

Permalink
Disable tests by default; CI: test on Ubuntu 24
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Dec 23, 2024
1 parent 9f25e58 commit 8dcf431
Show file tree
Hide file tree
Showing 45 changed files with 145 additions and 75 deletions.
118 changes: 67 additions & 51 deletions .github/workflows/head_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
CATKIN_OPTIONS: $GITHUB_WORKSPACE/catkin.options

jobs:
jammy_deb_packages:
noble_deb_packages:
runs-on: ubuntu-22.04

steps:
Expand All @@ -20,6 +20,17 @@ jobs:
make deb-install DEB_TARGET=jammy
# make cmake_dependency # requires ROS
jammy_deb_packages:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- run: sudo make install-deps
- run: $APT fakeroot devscripts build-essential
- run: |
make deb-build DEB_TARGET=jammy
make deb-install DEB_TARGET=jammy
# make cmake_dependency # requires ROS
focal_deb_packages:
runs-on: ubuntu-20.04
Expand All @@ -41,13 +52,28 @@ jobs:
make cmake_dependency
clang_noros:
runs-on: ubuntu-22.04
noble_gcc_noros:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo make install-deps
- run: make build-tests TYPE=Debug OPTIONS=noros TARGETS="all" TC=clang ARGS=-V
- run: make build-tests TYPE=Debug OPTIONS=noros TARGETS="all" TC=gcc ARGS=-V

noble_gcc_ros:
runs-on: ubuntu-24.04

env:
ROS_DISTRO: jazzy
ROS_CI_DESKTOP: noble

steps:
- uses: actions/checkout@v4
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
- run: sudo make install-deps
- run: |
source /opt/ros/$ROS_DISTRO/setup.bash
make build-tests TYPE=Debug OPTIONS=ros2 TARGETS="all" TC=gcc ARGS=-V
jammy_gcc_noros:
Expand Down Expand Up @@ -82,24 +108,6 @@ jobs:
- run: sudo make install-deps
- run: make build-tests TYPE=Debug OPTIONS=noros TARGETS="all" TC=gcc ARGS=-V


focal_clang_ros:
runs-on: ubuntu-20.04

env:
ROS_DISTRO: noetic
ROS_HOSTNAME: localhost
ROS_CI_DESKTOP: focal

steps:
- uses: actions/checkout@v4
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
- run: sudo make install-deps
- run: |
source /opt/ros/$ROS_DISTRO/setup.bash
make build-tests TYPE=Debug OPTIONS=ros TARGETS="all" TC=clang ARGS=-V
focal_gcc_ros:
runs-on: ubuntu-20.04

Expand All @@ -123,60 +131,67 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: $APT cppcheck
- run: $APT python3-pip python3-setuptools
- run: sudo pip3 install scspell3k
- run: make cppcheck
- run: make spell


focal_gcc_ros_scanbuild:
runs-on: ubuntu-20.04
noble_clang_ros_scanbuild:
runs-on: ubuntu-24.04

env:
ROS_DISTRO: noetic
ROS_HOSTNAME: localhost
ROS_CI_DESKTOP: focal
ROS_DISTRO: jazzy
ROS_CI_DESKTOP: noble

steps:
- uses: actions/checkout@v4
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
- run: sudo make install-deps
- run: $APT clang-tools-12 clang-tidy-12
- run: $APT clang-tools-18 clang-tidy-18
- run: |
source /opt/ros/$ROS_DISTRO/setup.bash
make clangcheck SCANBUILD=scan-build-12 OPTIONS=ros_tidy TC=gcc
make clangcheck SCANBUILD=scan-build-18 OPTIONS=ros2_tidy TC=clang
jammy_gcc_ros_scanbuild:
runs-on: ubuntu-22.04

env:
ROS_DISTRO: humble
ROS_CI_DESKTOP: jammy
noble_clang_noros_scanbuild:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- run: sudo make install-ros ROS_DISTRO=$ROS_DISTRO UBUNTU_DISTRO=$ROS_CI_DESKTOP
- run: sudo apt update
- run: sudo make install-deps
- run: $APT clang-tools-15 clang-tidy-15
- run: |
source /opt/ros/$ROS_DISTRO/setup.bash
make clangcheck SCANBUILD=scan-build-15 OPTIONS=ros2_tidy TC=gcc
- run: $APT clang-tools-18 clang-tidy-18
- run: make clangcheck SCANBUILD=scan-build-18 OPTIONS=noros_tidy TC=clang


jammy_gcc_noros_scanbuild:
jammy_ccws:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo make install-deps
- run: $APT clang-tools-15 clang-tidy-15
- run: make clangcheck SCANBUILD=scan-build-15 OPTIONS=noros_tidy TC=gcc
with:
repository: asherikov/ccws
- uses: actions/checkout@v4
with:
ref: pkg_ws_2
path: src/ariles_ws
- run: cd src/ariles_ws; make update VERSION=${GITHUB_SHA}; rm -Rf ariles2_rosparam_ws demo
- run: make bp_install_build BUILD_PROFILE=static_checks
- run: make BUILD_PROFILE=static_checks
- run: make bp_install_build BUILD_PROFILE=scan_build
- run: make dep_install PKG=ariles2_core_ws
- run: make dep_install PKG=ariles2_graphviz_ws
- run: make dep_install PKG=ariles2_namevalue2_ws
- run: make dep_install PKG=ariles2_octave_ws
- run: make dep_install PKG=ariles2_pugixml_ws
- run: make dep_install PKG=ariles2_rapidjson_ws
- run: make dep_install PKG=ariles2_ros2param_ws
- run: make dep_install PKG=ariles2_yamlcpp_ws
- run: make _ws BUILD_PROFILE=scan_build
- run: make bp_install_build BUILD_PROFILE=cppcheck
- run: make BUILD_PROFILE=static_checks BASE_BUILD_PROFILE=scan_build

jammy_ccws:
runs-on: ubuntu-22.04
noble_ccws:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -198,4 +213,5 @@ jobs:
- run: make dep_install PKG=ariles2_ros2param_ws
- run: make dep_install PKG=ariles2_yamlcpp_ws
- run: make _ws BUILD_PROFILE=scan_build

- run: make bp_install_build BUILD_PROFILE=cppcheck
- run: make BUILD_PROFILE=static_checks BASE_BUILD_PROFILE=scan_build
15 changes: 15 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ env:
CATKIN_OPTIONS: $GITHUB_WORKSPACE/catkin.options

jobs:
noble_deb_packages_cloudsmith:
runs-on: ubuntu-24.04

env:
DEB_TARGET: noble

steps:
- uses: actions/checkout@v4
- run: sudo make install-deps
- run: $APT fakeroot devscripts build-essential
- run: make deb-build DEB_TARGET=$DEB_TARGET
- run: pip install --upgrade cloudsmith-cli
- run: env CLOUDSMITH_API_KEY=${{ secrets.CLOUDSMITH_API_KEY }} make deb-cloudsmith DEB_TARGET=$DEB_TARGET


jammy_deb_packages_cloudsmith:
runs-on: ubuntu-22.04

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ UNRELEASED
Added
-----
* `ariles2::Any2`: a replacement for deprecated `ariles2::Any`.

* read/write `FileVisitorImplementation`: internal helper class for consistent file handling.
* Ubuntu 24 Noetic tests and binary packages.

2.3.2
=====
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ option (ARILES_ADAPTER_ROSMSG "ROS message conversions." ON)
option (ARILES_CPP_SANITIZERS "Enable sanitizers" OFF)
option (ARILES_CPP_CLANG_TIDY "Enable clang-tidy" OFF)
option (ARILES_VERBOSE "Verbose build" ON)
option (ARILES_BUILD_REGRESSION_TESTS "Build regression tests." ON)
option (ARILES_BUILD_REGRESSION_TESTS "Build regression tests." OFF)
option (ARILES_CCACHE "Enable ccache if available" ON)
set (ARILES_DEB_TARGETS "" CACHE STRING "Enable debian package generation.")

Expand Down
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ build:
mkdir -p ${BUILD_SUBDIR};
cd ${BUILD_SUBDIR}; cmake -C ${ROOT_DIR}/cmake/options_${OPTIONS}.cmake\
-DCMAKE_BUILD_TYPE=${TYPE} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_DIR}/toolchain_${TC}.cmake\
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_DIR}/toolchain_${TC}.cmake \
${EXTRA_CMAKE_PARAM} \
${ROOT_DIR};
cd ${BUILD_SUBDIR}; ${MAKE} ${MAKE_FLAGS} ${TARGETS}

build-tests: build
build-tests:
${MAKE} build EXTRA_CMAKE_PARAM="-DARILES_BUILD_REGRESSION_TESTS=ON ${EXTRA_CMAKE_PARAM}"
cd ${BUILD_SUBDIR}; env ${TEST_ENV} ctest ${ARGS}
# cd ${BUILD_SUBDIR}; ${MAKE} ${MAKE_FLAGS} test ${ARGS}

Expand Down Expand Up @@ -190,22 +191,28 @@ install-ros:
wget -qO- https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo tee /etc/apt/trusted.gpg.d/ros.asc
${MAKE} install-ros-${ROS_DISTRO}
${APT_INSTALL} dpkg
${APT_INSTALL} python3-rosdep python3-rosinstall python3-rosinstall-generator build-essential
${APT_INSTALL} python3-rosdep build-essential
bash -c 'source /opt/ros/${ROS_DISTRO}/setup.bash; rosdep init'
rosdep update

install-ros-noetic:
sh -c 'test -f /etc/apt/sources.list.d/ros-latest.list \
|| (echo "deb http://packages.ros.org/ros/ubuntu ${UBUNTU_DISTRO} main" > /etc/apt/sources.list.d/ros-latest.list)'
apt update -qq
${APT_INSTALL} ros-${ROS_DISTRO}-ros-base
${APT_INSTALL} ros-${ROS_DISTRO}-ros-base python3-rosinstall python3-rosinstall-generator

install-ros-humble:
install-ros2-common:
sh -c 'test -f /etc/apt/sources.list.d/ros2-latest.list \
|| (echo "deb [arch=amd64,arm64] http://repo.ros2.org/ubuntu/main ${UBUNTU_DISTRO} main" > /etc/apt/sources.list.d/ros2-latest.list)'
apt update -qq
${APT_INSTALL} ros-${ROS_DISTRO}-rclcpp

install-ros-humble: install-ros2-common
${APT_INSTALL} python3-rosinstall python3-rosinstall-generator

install-ros-jazzy: install-ros2-common
#


install-deps:
${APT_INSTALL} cmake libboost-all-dev libeigen3-dev
Expand Down Expand Up @@ -332,7 +339,7 @@ clangcheck:
-enable-checker valist.CopyToSelf \
-enable-checker valist.Uninitialized \
-enable-checker valist.Unterminated \
${MAKE} build TC=${TC} TYPE=${TYPE} OPTIONS=${OPTIONS} TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="-DBUILD_SHARED_LIBS=OFF ${EXTRA_CMAKE_PARAM}"
${MAKE} build TC=${TC} TYPE=${TYPE} OPTIONS=${OPTIONS} TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="-DARILES_BUILD_REGRESSION_TESTS=ON -DBUILD_SHARED_LIBS=OFF ${EXTRA_CMAKE_PARAM}"
# -enable-checker cplusplus.NewDelete
# -enable-checker optin.cplusplus.VirtualCall

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Ariles
<a href="https://cloudsmith.io/~asherikov-aV7/repos/all/packages/detail/deb/ariles2-core/latest/a=amd64;d=ubuntu%252Fjammy;t=binary/">
<img src="https://api-prd.cloudsmith.io/v1/badges/version/asherikov-aV7/all/deb/ariles2-core/latest/a=amd64;d=ubuntu%252Fjammy;t=binary/?render=true&show_latest=true" alt="Latest version of 'ariles' @ Cloudsmith">
</a>
<a href="https://cloudsmith.io/~asherikov-aV7/repos/all/packages/detail/deb/ariles2-core/latest/a=amd64;d=ubuntu%252Fnoble;t=binary/">
<img src="https://api-prd.cloudsmith.io/v1/badges/version/asherikov-aV7/all/deb/ariles2-core/latest/a=amd64;d=ubuntu%252Fnoble;t=binary/?render=true&show_latest=true" alt="Latest version of 'ariles' @ Cloudsmith">
</a>
</td>
<td align="center"></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion cmake/cmakeut_compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function(cmakeut_compiler_flags STANDARD)
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-llvmlibc-*")

# noisy
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-altera-unroll-loops,-altera-id-dependent-backward-branch,-readability-identifier-length,-misc-include-cleaner")
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-altera-unroll-loops,-altera-id-dependent-backward-branch,-readability-identifier-length,-misc-include-cleaner,-performance-avoid-endl")
# false positives?
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-bugprone-exception-escape,-clang-analyzer-cplusplus.NewDelete")
# may be later
Expand Down
2 changes: 1 addition & 1 deletion extra_visitors/ros2param/src/declarator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace ariles2
void Declarator::flush()
{
CPPUT_TRACE_FUNCTION;
CPPUT_ASSERT(impl_->publishParameters(), "Failed to set parameters.");
CPPUT_ASSERT(impl_->publishParameters(), "Failed to declare parameters.");
}


Expand Down
1 change: 0 additions & 1 deletion extra_visitors/ros2param/src/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ namespace ariles2
{
clear();

rcl_interfaces::msg::ListParametersResult list_msg;
parameter_names_ = std::move(nh_->list_parameters({}, std::numeric_limits<uint64_t>::max()).names);
}

Expand Down
4 changes: 4 additions & 0 deletions extra_visitors/ros2param/src/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ namespace ariles2

[[nodiscard]] bool publishParameters() const
{
if (parameters_.empty())
{
return (true);
}
return (nh_->set_parameters_atomically(parameters_).successful);
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/ariles2/internal/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


#define CPPUT_PERSISTENT_ASSERT(condition, ...) \
if (!(condition)) \
if (!(condition)) /* NOLINT */ \
{ \
CPPUT_THROW(__VA_ARGS__); \
};
Expand Down
2 changes: 1 addition & 1 deletion include/ariles2/visitors/aggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
@brief
*/
// cppcheck-suppress-file duplInheritedMember

#pragma once

#include "common.h"


namespace ariles2
{
/// @ingroup aggregate
Expand Down
2 changes: 2 additions & 0 deletions include/ariles2/visitors/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@brief
*/
// cppcheck-suppress-file duplInheritedMember

#pragma once

Expand Down Expand Up @@ -54,6 +55,7 @@ namespace ariles2
return parameters;
}

// cppcheck-suppress duplInheritedMember
template <class t_Ariles>
const t_Parameters &getParameters(const t_Ariles &ariles_class) const
{
Expand Down
2 changes: 1 addition & 1 deletion include/ariles2/visitors/compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ namespace ariles2
#define ARILES2_PARENT_compare(v, entry) entry::arilesVisit(visitor, other, parameters);

#define ARILES2_VISIT_compare \
template <class t_Other> \
template <class t_Other> /* cppcheck-suppress duplInheritedMember */ \
void arilesVisit( \
ariles2::compare::Visitor &visitor, \
const t_Other &other, \
Expand Down
2 changes: 1 addition & 1 deletion include/ariles2/visitors/copyfrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace ariles2
#define ARILES2_PARENT_copyfrom(v, entry) entry::arilesVisit(visitor, other, parameters);

#define ARILES2_VISIT_copyfrom \
template <class t_Other> \
template <class t_Other> /* cppcheck-suppress duplInheritedMember */ \
void arilesVisit( \
ariles2::copyfrom::Visitor &visitor, \
const t_Other &other, \
Expand Down
2 changes: 1 addition & 1 deletion include/ariles2/visitors/copyto.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace ariles2
#define ARILES2_PARENT_copyto(v, entry) entry::arilesVisit(visitor, other, parameters);

#define ARILES2_VISIT_copyto \
template <class t_Other> \
template <class t_Other> /* cppcheck-suppress duplInheritedMember */ \
void arilesVisit( \
ariles2::copyto::Visitor &visitor, \
t_Other &other, \
Expand Down
Loading

0 comments on commit 8dcf431

Please sign in to comment.