Skip to content

Commit

Permalink
[#12] Add clang build to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
orecham committed Dec 11, 2024
1 parent 9daac33 commit 7ec081c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-clang/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Install clang tools'
name: 'Install iceoryx dependencies and clang-tidy'
runs:
using: "composite"
steps:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: CI
env:
WORKSPACE_DIR: ${{ github.workspace }}
CLANG_COMPILER: "--cmake-args -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
BUILD_ARGS: "--symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo"
TEST_ARGS: "--cmake-args -DBUILD_TESTING=ON"
on:
push:
branches: [ main ]
Expand Down Expand Up @@ -60,3 +65,49 @@ jobs:
# run: |
# git fetch origin main
# ./scripts/check-clang-tidy.sh warning-as-error diff-to-main

colcon-build-test-clang:
needs: [preflight-check, static-code-analysis]
runs-on: ubuntu-latest
container:
image: ros:rolling
steps:
- name: Install ros build dependencies
run: |
apt-get update
apt-get install -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-vcstool \
python3-rosdep
- name: Install iceoryx dependencies
run: |
apt-get update
apt-get install -y \
libacl1-dev \
curl
- uses: dtolnay/rust-toolchain@stable
- name: Create workspace
run: |
mkdir -p $WORKSPACE_DIR/src/rmw_iceoryx2
mkdir -p $WORKSPACE_DIR/src/test_interface_files
- name: Checkout test_interface_files
uses: actions/checkout@v4
with:
repository: ros2/test_interface_files
path: src/test_interface_files
ref: rolling
- name: Checkout current ref
uses: actions/checkout@v4
with:
path: src/rmw_iceoryx2
- name: Import dependencies with VCS
run: |
cd $WORKSPACE_DIR
sed 's|[email protected]:|https://github.com/|g' src/rmw_iceoryx2/deps.repos > _deps.repos
vcs import src < _deps.repos
- name: Build with colcon
run: |
cd $WORKSPACE_DIR
. /opt/ros/rolling/setup.sh
colcon build $CLANG_COMPILER $BUILD_ARGS
4 changes: 0 additions & 4 deletions rmw_iceoryx2.repos → deps.repos
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ repositories:
type: git
url: [email protected]:eclipse-iceoryx/iceoryx2.git
version: 54ebc96d03f4d7b14257413ccff6529cbb7288a3
rmw_iceoryx2:
type: git
url: [email protected]:ekxide/rmw_iceoryx2.git
version: v0.1.0
8 changes: 8 additions & 0 deletions scripts/ci/check-clang-tidy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 by Ekxide IO GmbH All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Apache Software License 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
# which is available at https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

0 comments on commit 7ec081c

Please sign in to comment.