Skip to content
Open
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
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build ethzasl_msf
on:
push:
schedule:
- cron: '0 0 * * 0' # every Sunday at midnight

jobs:
build:
runs-on: [self-hosted, linux]
env:
rosdistro: ${{ matrix.ubuntu == '20.04' && 'noetic' || 'one' }}
strategy:
fail-fast: false
matrix:
gcc: [ '9', '10', '11' ]
ubuntu: [ '20.04', '22.04' ]
container:
image: omavteam/ubuntu-omav-ros:ros-desktop-${{ matrix.ubuntu }}
credentials:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
name: Ubuntu ${{ matrix.ubuntu }} - GCC ${{ matrix.gcc }}
steps:
- name: Install image-geometry
run: apt update && apt install -y ros-${{ env.rosdistro }}-image-geometry

- name: Switch GCC version
run: |
update-alternatives --set gcc /usr/bin/gcc-${{ matrix.gcc }}
update-alternatives --set g++ /usr/bin/g++-${{ matrix.gcc}}
gcc --version
g++ --version

- uses: actions/checkout@v4
name: Checkout catkin_simple
with:
repository: catkin/catkin_simple
path: catkin_ws/src/catkin_simple

- uses: actions/checkout@v4
name: Checkout glog_catkin
with:
repository: ethz-asl/glog_catkin
path: catkin_ws/src/glog_catkin

- uses: actions/checkout@v4
name: Checkout ethzasl_msf
with:
repository: ethz-asl/ethzasl_msf
path: catkin_ws/src/ethzasl_msf

- name: Build ethzasl_msf
run: source /opt/ros/${{ env.rosdistro }}/setup.bash && catkin build ethzasl_msf && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash
working-directory: catkin_ws
shell: bash

- name: Run ethzasl_msf tests
run: source /opt/ros/${{ env.rosdistro }}/setup.bash && catkin run_tests msf_core msf_timing
working-directory: catkin_ws
shell: bash
6 changes: 3 additions & 3 deletions msf_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_definitions(-DBOOST_NO_CXX11_VARIADIC_TEMPLATES)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/)

find_package(catkin REQUIRED COMPONENTS sensor_msgs dynamic_reconfigure msf_timing tf glog_catkin cmake_modules)
find_package(catkin REQUIRED COMPONENTS sensor_msgs dynamic_reconfigure msf_timing tf glog_catkin cmake_modules sensor_fusion_comm)
find_package(Eigen REQUIRED)

find_package(Doxygen)
Expand All @@ -31,9 +31,9 @@ include_directories(include ${Eigen_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")
if (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()

# Enable timing the core
Expand Down
4 changes: 2 additions & 2 deletions msf_core/cmake/export_flags.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")

Expand Down
2 changes: 2 additions & 0 deletions msf_core/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
<build_depend>tf</build_depend>
<build_depend>glog_catkin</build_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>sensor_fusion_comm</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>msf_timing</run_depend>
<run_depend>tf</run_depend>
<run_depend>glog_catkin</run_depend>
<run_depend>sensor_fusion_comm</run_depend>
</package>
2 changes: 1 addition & 1 deletion msf_eval/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ptam_com)

include_directories(include ${catkin_INCLUDE_DIRS})

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

catkin_package(
DEPENDS opencv2
Expand Down
4 changes: 2 additions & 2 deletions msf_timing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ include_directories(include)
find_package(catkin REQUIRED COMPONENTS roscpp)

if (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()

catkin_package(
Expand Down
2 changes: 1 addition & 1 deletion msf_timing/cmake/export_flags.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++17")

1 change: 1 addition & 0 deletions msf_updates/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(CMAKE_BUILD_TYPE Release)

#build with boost 1.6x
add_definitions(-DBOOST_NO_CXX11_VARIADIC_TEMPLATES)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

find_package(catkin REQUIRED COMPONENTS roscpp msf_core geometry_msgs sensor_fusion_comm)

Expand Down
Loading