diff --git a/.github/actions/install-clang/action.yml b/.github/actions/install-clang/action.yml index 7e79a80..d5f0233 100644 --- a/.github/actions/install-clang/action.yml +++ b/.github/actions/install-clang/action.yml @@ -1,4 +1,4 @@ -name: 'Install clang tools' +name: 'Install iceoryx dependencies and clang-tidy' runs: using: "composite" steps: diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f70a059..66b7b11 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 ] @@ -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|git@github.com:|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 diff --git a/rmw_iceoryx2.repos b/deps.repos similarity index 75% rename from rmw_iceoryx2.repos rename to deps.repos index d79e2d7..0aaf6c8 100644 --- a/rmw_iceoryx2.repos +++ b/deps.repos @@ -7,7 +7,3 @@ repositories: type: git url: git@github.com:eclipse-iceoryx/iceoryx2.git version: 54ebc96d03f4d7b14257413ccff6529cbb7288a3 - rmw_iceoryx2: - type: git - url: git@github.com:ekxide/rmw_iceoryx2.git - version: v0.1.0 diff --git a/scripts/ci/check-clang-tidy.sh b/scripts/ci/check-clang-tidy.sh new file mode 100644 index 0000000..72ba7e6 --- /dev/null +++ b/scripts/ci/check-clang-tidy.sh @@ -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