Skip to content

Commit

Permalink
Merge pull request #22 from ethz-asl/feature/ci-cpp-versions
Browse files Browse the repository at this point in the history
Added CI jobs for C++11/C++14
  • Loading branch information
4c3y authored Dec 22, 2023
2 parents 831f9dd + 48ea7a4 commit c18078e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cpp_ubuntu20_04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
pull_request:
branches:
- "master"
push:
branches:
- "master"

jobs:
build:
Expand All @@ -12,8 +15,9 @@ jobs:
matrix:
rosdistro: ['noetic']
gcc: ['8', '9', '10']
cxx: ['11', '14', '17']
container: ros:${{ matrix.rosdistro }}-ros-base-focal
name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }}
name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }} - C++${{ matrix.cxx }}
steps:
- uses: actions/checkout@v3
name: Checkout lpp
Expand All @@ -35,7 +39,7 @@ jobs:
run: sudo apt install -y libgoogle-glog-dev

- name: Build lpp
run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash
run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash
working-directory: catkin_ws
shell: bash

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
endif ()

# Set standard of top level project or C++17
if (NOT DEFINED ${CMAKE_CXX_STANDARD})
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
else ()
set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD})
Expand Down
2 changes: 1 addition & 1 deletion src/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <log++.h>

int main(int argc, char **argv) {
int main([[maybe_unused]] int argc, char **argv) {
LOG_INIT(argv[0]);

int foo = 5;
Expand Down

0 comments on commit c18078e

Please sign in to comment.