From 634304014024ff4e2bf9ee6c2d81e7b8ddefc54a Mon Sep 17 00:00:00 2001 From: Yadu Date: Wed, 29 May 2024 01:46:12 -0700 Subject: [PATCH] Support Iron and transition Rolling to Noble (#10) * Include iron in distirbution matrix Signed-off-by: Yadunund * Cleanup Signed-off-by: Yadunund * Use ccache for builds Signed-off-by: Yadunund * rolling on noble Signed-off-by: Yadunund * Reusable asan invokes reusable build with asan mixin Signed-off-by: Yadunund * Add noble - jazzy combination Signed-off-by: Luca Della Vedova * TEST, change image to desktop Signed-off-by: Luca Della Vedova * TEST: Use ros core image instead Signed-off-by: Luca Della Vedova * Remove Jazzy action Signed-off-by: Luca Della Vedova * TEST, remove lld from asan build Signed-off-by: Luca Della Vedova * Remove clang and blacklist Signed-off-by: Luca Della Vedova * Avoid rmf_fleet_adapter_python in asan build Signed-off-by: Luca Della Vedova * Readd lld Signed-off-by: Luca Della Vedova * Restore clang, use testing branch for action-ros Signed-off-by: Luca Della Vedova * Back to desktop-full image after rolling sync Signed-off-by: Luca Della Vedova * Try using cyclonedds Signed-off-by: Luca Della Vedova * setup-ros released, add comments for dds vendor Signed-off-by: Luca Della Vedova * Remove extra flags from asan and tsan actions Signed-off-by: Luca Della Vedova --------- Signed-off-by: Yadunund Signed-off-by: Luca Della Vedova Co-authored-by: Luca Della Vedova --- .github/workflows/asan.yaml | 18 ++++++ .github/workflows/build.yaml | 7 ++- .github/workflows/reusable_asan.yaml | 80 ++++----------------------- .github/workflows/reusable_build.yaml | 33 ++++++----- 4 files changed, 49 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/asan.yaml diff --git a/.github/workflows/asan.yaml b/.github/workflows/asan.yaml new file mode 100644 index 0000000..0ab62ba --- /dev/null +++ b/.github/workflows/asan.yaml @@ -0,0 +1,18 @@ +name: asan +on: + pull_request: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + build_and_test_asan: + name: test_ci_asan + uses: ./.github/workflows/reusable_asan.yaml + with: + # NOTE: Avoid adding comments in the packages lines, this can break some of the called scripts in github actions + # NOTE: Build upto rmf_fleet_adapter and rmf_visualization to cover all core open-rmf packages. + # # rmf_fleet_adapter_python causes spurious asan failures because of leaks in the Python side + packages: | + rmf_fleet_adapter + rmf_visualization diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 09d844b..b035012 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,10 +7,11 @@ on: jobs: build_and_test: - name: rmf_traffic_editor + name: test_ci uses: ./.github/workflows/reusable_build.yaml with: # NOTE: Avoid adding comments in the packages lines, this can break some of the called scripts in github actions - # NOTE: Using rmf_utils just for workflow testing porposes + # NOTE: Build upto rmf_fleet_adapter_python and rmf_visualization to cover all core open-rmf packages. packages: | - rmf_utils + rmf_fleet_adapter_python + rmf_visualization diff --git a/.github/workflows/reusable_asan.yaml b/.github/workflows/reusable_asan.yaml index c17b218..59106f8 100644 --- a/.github/workflows/reusable_asan.yaml +++ b/.github/workflows/reusable_asan.yaml @@ -11,75 +11,17 @@ on: required: false type: string default: | - [{"ros_distribution": "foxy", - "ubuntu_distribution": "focal"}] -defaults: - run: - shell: bash -concurrency: - group: ${{ github.head_ref || github.ref_name }} - cancel-in-progress: true + [{"ros_distribution": "humble", + "ubuntu_distribution": "jammy"}, + {"ros_distribution": "iron", + "ubuntu_distribution": "jammy"}, + {"ros_distribution": "rolling", + "ubuntu_distribution": "noble"}] jobs: asan: - strategy: - fail-fast: false - matrix: - include: ${{ fromJson(inputs.dist-matrix) }} name: asan - runs-on: ubuntu-20.04 - container: - image: osrf/ros:${{ matrix.ros_distribution }}-desktop-${{ matrix.ubuntu_distribution }} - steps: - - name: install_clang_and_tools - run: sudo apt update && sudo apt install -y clang clang-tools lld wget python3-pip python3-colcon-coveragepy-result python3-colcon-lcov-result lcov - # TODO: fix for cryptography>2.8 failing in galactic https://github.com/open-rmf/rmf/pull/202#pullrequestreview-1100045417 - - name: fix cryptography==2.8 # https://github.com/open-rmf/rmf/pull/202#pullrequestreview-1100045417 - run: pip3 install cryptography==2.8 - if: ${{ matrix.ros_distribution == 'galactic' || matrix.ros_distribution == 'foxy' }} - # TODO: remove this when uncrustify 0.72 is fixed https://github.com/uncrustify/uncrustify/issues/3191 - - name: hack for uncrustify 0.72 problems - run: wget http://mirrors.kernel.org/ubuntu/pool/universe/u/uncrustify/uncrustify_0.69.0+dfsg1-1build1_amd64.deb && dpkg -i uncrustify_0.69.0+dfsg1-1build1_amd64.deb && apt install -f -y - if: ${{ matrix.ubuntu_distribution == 'jammy'}} - # TODO: Remove this step when the incompatibility between libunwind14 and libundind dissapears https://github.com/open-rmf/rmf_traffic_editor/issues/439 - - name: Horrible hack for libceres - run: | - apt-get remove -y --purge libc++-dev || true - apt-get remove -y --purge libc++abi-dev || true - apt-get remove -y --purge libunwind-14-dev || true - apt-get remove -y --purge libunwind-14-dev || true - apt-get remove -y --purge libunwind-dev || true - apt -y autoremove - if: ${{ matrix.ubuntu_distribution == 'jammy'}} - - name: create_blacklist - run: | - mkdir -p ${{ github.workspace }}/ - touch ${{ github.workspace }}/blacklist.txt - echo "fun:*Eigen*" > ${{ github.workspace }}/blacklist.txt - - name: asan_build_and_test - uses: ros-tooling/action-ros-ci@v0.3 - env: - LANG: en_US.UTF-8 - CC: clang -fsanitize-blacklist=${{ github.workspace }}/blacklist.txt - CXX: clang++ -fsanitize-blacklist=${{ github.workspace }}/blacklist.txt - QT_QPA_PLATFORM: offscreen - with: - target-ros2-distro: ${{ matrix.ros_distribution }} - # build all packages listed in the meta package - package-name: ${{ inputs.packages }} - vcs-repo-file-url: | - https://raw.githubusercontent.com/open-rmf/rmf/${{ matrix.ros_distribution }}/rmf.repos - colcon-defaults: | - { - "build": { - "mixin": ["asan-gcc", "lld"], - "cmake-args": ["-DCMAKE_BUILD_TYPE=Debug"], - "executor": "sequential" - } - } - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - name: upload_test_stream - uses: actions/upload-artifact@v2 - with: - name: colcon-asan-logs - path: ${{ steps.build_and_test.outputs.ros-workspace-directory-name }}/log - if: always() + uses: ./.github/workflows/reusable_build.yaml + with: + dist-matrix: ${{inputs.dist-matrix}} + packages: ${{inputs.packages}} + mixin: asan diff --git a/.github/workflows/reusable_build.yaml b/.github/workflows/reusable_build.yaml index 671be61..82360b5 100644 --- a/.github/workflows/reusable_build.yaml +++ b/.github/workflows/reusable_build.yaml @@ -17,8 +17,10 @@ on: default: | [{"ros_distribution": "humble", "ubuntu_distribution": "jammy"}, + {"ros_distribution": "iron", + "ubuntu_distribution": "jammy"}, {"ros_distribution": "rolling", - "ubuntu_distribution": "jammy"}] + "ubuntu_distribution": "noble"}] defaults: run: shell: bash @@ -31,25 +33,12 @@ jobs: fail-fast: false matrix: include: ${{ fromJson(inputs.dist-matrix) }} - name: Build and test runs-on: ubuntu-latest container: # TODO: check if "desktop" is really needed for the builds or tests image: osrf/ros:${{ matrix.ros_distribution }}-desktop-${{ matrix.ubuntu_distribution }} steps: - - name: install_clang_and_tools - run: sudo apt update && sudo apt install -y clang clang-tools lld wget python3-pip python3-colcon-coveragepy-result python3-colcon-lcov-result lcov - # TODO: Remove this step when the incompatibility between libunwind14 and libundind dissapears https://github.com/open-rmf/rmf_traffic_editor/issues/439 - - name: Horrible hack for libceres - run: | - apt-get remove -y --purge libc++-dev || true - apt-get remove -y --purge libc++abi-dev || true - apt-get remove -y --purge libunwind-14-dev || true - apt-get remove -y --purge libunwind-14-dev || true - apt-get remove -y --purge libunwind-dev || true - apt -y autoremove - if: ${{ matrix.ubuntu_distribution == 'jammy'}} - name: create_blacklist run: | mkdir -p ${{ github.workspace }}/ @@ -57,26 +46,36 @@ jobs: if [[ ${{ inputs.mixin }} == "asan" ]]; then echo "fun:*Eigen*" > ${{ github.workspace }}/blacklist.txt fi + - name: Setup ROS + uses: ros-tooling/setup-ros@v0.7 + - name: install_tools + run: sudo apt update && sudo apt install -y ccache clang clang-tools lld wget python3-pip python3-colcon-coveragepy-result python3-colcon-lcov-result lcov ros-${{ matrix.ros_distribution }}-rmw-cyclonedds-cpp - name: set mixins id: set_mixins run: | case ${{ inputs.mixin }} in asan) - echo 'colcon_defaults={"build":{"mixin":["asan-gcc","lld"],"cmake-args":["-DCMAKE_BUILD_TYPE=Debug"],"executor":"sequential"}}' >> $GITHUB_OUTPUT + echo 'colcon_defaults={"build":{"mixin":["asan-gcc", "lld"]}}' >> $GITHUB_OUTPUT ;; tsan) - echo 'colcon_defaults={"build":{"mixin":["tsan"],"cmake-args":["-DCMAKE_BUILD_TYPE=Debug"]}}' >> $GITHUB_OUTPUT + echo 'colcon_defaults={"build":{"mixin":["tsan", "lld"]}}' >> $GITHUB_OUTPUT ;; *) - echo 'colcon_defaults={"build": {"mixin": ["coverage-gcc", "lld" ]}}' >> $GITHUB_OUTPUT + echo 'colcon_defaults={"build": {"mixin": ["ccache", "coverage-gcc", "lld"]}}' >> $GITHUB_OUTPUT ;; esac + - uses: actions/cache@v3 + with: + path: ~/.cache/ccache + key: ccache - name: build_and_test uses: ros-tooling/action-ros-ci@v0.3 env: LANG: en_US.UTF-8 CC: clang -fsanitize-blacklist=${{ github.workspace }}/blacklist.txt CXX: clang++ -fsanitize-blacklist=${{ github.workspace }}/blacklist.txt + # Fastdds causes spurious failures in asan action, default to cyclonedds + RMW_IMPLEMENTATION: rmw_cyclonedds_cpp QT_QPA_PLATFORM: offscreen # We have some new_delete_type_mismatch errors that looks like to come from rclcpp ASAN_OPTIONS: detect_leaks=0:new_delete_type_mismatch=0