Skip to content

Commit 28ad844

Browse files
committed
Add compiler versions to CI matrix
Relates to #349 Signed-off-by: Evan Flynn <[email protected]>
1 parent 614c8e3 commit 28ad844

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/build_test.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,29 @@ jobs:
7070
strategy:
7171
fail-fast: false
7272
matrix:
73+
compiler:
74+
- gcc-10
75+
- gcc-12
76+
- gcc-14
77+
- clang-14
78+
- clang-16
79+
- clang-18
7380
ros_distro: ${{ fromJson(needs.get_ros_distros.outputs.series) }}
7481
include:
7582
${{ fromJson(needs.get_ros_distros.outputs.matrix) }}
83+
exclude:
84+
- { ros_distro: humble, compiler: gcc-14 }
85+
- { ros_distro: humble, compiler: clang-16 }
86+
- { ros_distro: humble, compiler: clang-18 }
87+
7688
container:
7789
image: rostooling/setup-ros-docker:${{ matrix.docker_image }}
7890
steps:
7991
- name: Install dependencies
8092
run: |
8193
sudo apt-get update
8294
sudo apt-get -y install policykit-1 libgtk2.0-common screen uml-utilities libc6-dev libicu-dev gcc python3 python3-pip
95+
sudo apt-get -y install ${{ matrix.compiler }}
8396
mkdir renode_portable
8497
wget https://builds.renode.io/renode-latest.linux-portable.tar.gz
8598
tar xf renode-latest.linux-portable.tar.gz -C renode_portable --strip-components=1
@@ -89,22 +102,17 @@ jobs:
89102
uses: actions/checkout@v4
90103
with:
91104
path: $ROS_WORKSPACE_PATH/usb_cam
105+
- name: Set compiler
106+
run: |
107+
export CC=${{ matrix.compiler }}
108+
export CXX=${{ matrix.compiler }}
92109
- name: Build and Test
93110
id: build_and_test_step
94111
uses: ros-tooling/action-ros-ci@master
95112
with:
96113
package-name: usb_cam
97114
target-ros2-distro: ${{ matrix.ros_distro }}
98115
vcs-repo-file-url: ""
99-
colcon-defaults: |
100-
{
101-
"build": {
102-
"mixin": ["coverage-gcc"]
103-
}
104-
}
105-
# If possible, pin the repository in the workflow to a specific commit to avoid
106-
# changes in colcon-mixin-repository from breaking your tests.
107-
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml
108116
# Compile again, this time enabling integration tests
109117
- name: Build integration tests
110118
shell: bash

0 commit comments

Comments
 (0)