Skip to content

Commit 45433d2

Browse files
committed
Added CI matrix configuration to test building with and without optional dependencies
1 parent b0cf968 commit 45433d2

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/ubuntu20_04.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
matrix:
1616
rosdistro: ['noetic']
1717
gcc: ['8', '9', '10']
18+
submodule: ['exclude', 'BMI08x-Sensor-API', 'BMP3-Sensor-API', 'all']
1819
container: ros:${{ matrix.rosdistro }}-ros-base-focal
1920
name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }}
2021
steps:
@@ -45,8 +46,20 @@ jobs:
4546
token: ${{ secrets.PAT }}
4647
path: catkin_ws/src/mav_sensors
4748

49+
- name: Exclude submodules
50+
if: matrix.submodule == 'exclude'
51+
run: rm -rf mav_sensor_drivers/lib/*
52+
shell: bash
53+
working-directory: catkin_ws/src/mav_sensors
54+
55+
- name: Exclude submodules except ${{ matrix.submodule }}
56+
if: matrix.submodule != 'exclude' && matrix.submodule != 'all'
57+
run: find . -mindepth 1 -type d ! -name ${{ matrix.submodule }} -exec rm -rf {} +
58+
working-directory: catkin_ws/src/mav_sensors/mav_sensor_drivers/lib
59+
shell: bash
60+
4861
- name: Build mav_sensors
49-
run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build mav_sensors_demo && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash
62+
run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -v mav_sensors_demo --no-status && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash
5063
shell: bash
5164
working-directory: catkin_ws
5265

0 commit comments

Comments
 (0)