From ee0e68abe44a8be5a4d7fde10872bd2210bc6d56 Mon Sep 17 00:00:00 2001 From: sea-bass Date: Fri, 29 Nov 2024 10:13:52 -0500 Subject: [PATCH 1/7] Update CI rules for Jazzy --- .github/workflows/ci.yaml | 27 +++++++++++--------------- .github/workflows/docker.yaml | 8 ++++---- .github/workflows/tutorial_docker.yaml | 2 +- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1e09cdf939..607c358f06 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ on: merge_group: push: branches: - - main + - jazzy jobs: default: @@ -17,31 +17,27 @@ jobs: fail-fast: false matrix: env: - - IMAGE: rolling-ci - CCOV: true - ROS_DISTRO: rolling - - IMAGE: rolling-ci - ROS_DISTRO: rolling - IKFAST_TEST: true - CLANG_TIDY: pedantic - - IMAGE: humble-ci - ROS_DISTRO: humble - IMAGE: jazzy-ci + CCOV: true ROS_DISTRO: jazzy - - IMAGE: jazzy-ci-testing + - IMAGE: jazzy-ci ROS_DISTRO: jazzy + IKFAST_TEST: true + CLANG_TIDY: pedantic + # Silent gmock/gtest warnings by picking more recent googletest version + AFTER_BUILD_UPSTREAM_WORKSPACE: | + git clone --depth 1 --quiet --branch 1.11.9000 https://github.com/ament/googletest "${BASEDIR}/upstream_ws/src/googletest" + builder_run_build "/opt/ros/${ROS_DISTRO}" "${BASEDIR}/upstream_ws" --packages-select gtest_vendor gmock_vendor env: - # TODO(andyz): When this clang-tidy issue is fixed, remove -Wno-unknown-warning-option - # https://stackoverflow.com/a/41673702 CXXFLAGS: >- - -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-unknown-warning-option -Wno-cpp + -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }} UPSTREAM_WORKSPACE: > moveit2.repos $(f="moveit2_$(sed 's/-.*$//' <<< "${{ matrix.env.IMAGE }}").repos"; test -r $f && echo $f) # Pull any updates to the upstream workspace (after restoring it from cache) - AFTER_SETUP_UPSTREAM_WORKSPACE: apt remove -y ros-$ROS_DISTRO-geometric-shapes; vcs pull $BASEDIR/upstream_ws/src + AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src AFTER_SETUP_DOWNSTREAM_WORKSPACE: vcs pull $BASEDIR/downstream_ws/src # Clear the ccache stats before and log the stats after the build AFTER_SETUP_CCACHE: ccache --zero-stats --max-size=10.0G @@ -165,7 +161,6 @@ jobs: with: docker: $DOCKER_IMAGE workdir: ${{ env.BASEDIR }}/target_ws - lcov_capture_args: --ignore-errors=gcov,gcov,mismatch,mismatch,negative,negative ignore: '"*/target_ws/build/*" "*/target_ws/install/*" "*/test/*"' - name: Upload codecov report uses: codecov/codecov-action@v5 diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 4bc1a4aa64..b576450833 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -7,7 +7,7 @@ on: workflow_dispatch: push: branches: - - main + - jazzy pull_request: paths: - .docker/** @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [rolling, jazzy] + ROS_DISTRO: [jazzy] runs-on: ubuntu-latest permissions: packages: write @@ -72,7 +72,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [rolling, jazzy] + ROS_DISTRO: [jazzy] runs-on: ubuntu-latest permissions: packages: write @@ -128,7 +128,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [rolling, jazzy] + ROS_DISTRO: [jazzy] runs-on: ubuntu-latest permissions: packages: write diff --git a/.github/workflows/tutorial_docker.yaml b/.github/workflows/tutorial_docker.yaml index 72c2b80252..5bd66a0ac4 100644 --- a/.github/workflows/tutorial_docker.yaml +++ b/.github/workflows/tutorial_docker.yaml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [rolling, jazzy] + ROS_DISTRO: [jazzy] runs-on: ubuntu-latest permissions: packages: write From ed0a26b0aa43280b473f992a9bc17d729ca78c9f Mon Sep 17 00:00:00 2001 From: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:15:08 -0500 Subject: [PATCH 2/7] Update .github/workflows/ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 607c358f06..01d6c7a1ed 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,7 @@ jobs: moveit2.repos $(f="moveit2_$(sed 's/-.*$//' <<< "${{ matrix.env.IMAGE }}").repos"; test -r $f && echo $f) # Pull any updates to the upstream workspace (after restoring it from cache) - AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src + AFTER_SETUP_UPSTREAM_WORKSPACE: apt remove -y ros-$ROS_DISTRO-geometric-shapes; vcs pull $BASEDIR/upstream_ws/src AFTER_SETUP_DOWNSTREAM_WORKSPACE: vcs pull $BASEDIR/downstream_ws/src # Clear the ccache stats before and log the stats after the build AFTER_SETUP_CCACHE: ccache --zero-stats --max-size=10.0G From 53ba6adc81b46d779cd19fab6e7bed1390b9099e Mon Sep 17 00:00:00 2001 From: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:16:05 -0500 Subject: [PATCH 3/7] Update .github/workflows/ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 01d6c7a1ed..f0d577ff13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: builder_run_build "/opt/ros/${ROS_DISTRO}" "${BASEDIR}/upstream_ws" --packages-select gtest_vendor gmock_vendor env: CXXFLAGS: >- - -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls + -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-unknown-warning-option -Wno-cpp CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }} UPSTREAM_WORKSPACE: > From 2d033c0374e22efb87b3103bcc47dd0180ac963b Mon Sep 17 00:00:00 2001 From: sea-bass Date: Fri, 29 Nov 2024 10:23:23 -0500 Subject: [PATCH 4/7] Other fixes --- .github/workflows/format.yaml | 2 +- .github/workflows/tutorial_docker.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 1bcc4779c8..9467b5c684 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -9,7 +9,7 @@ on: merge_group: push: branches: - - main + - jazzy jobs: pre-commit: diff --git a/.github/workflows/tutorial_docker.yaml b/.github/workflows/tutorial_docker.yaml index 5bd66a0ac4..408fa3e2d8 100644 --- a/.github/workflows/tutorial_docker.yaml +++ b/.github/workflows/tutorial_docker.yaml @@ -9,7 +9,7 @@ on: merge_group: push: branches: - - main + - jazzy jobs: tutorial-source: From cac6fb71dced2883a04a2e8fde6f1e5aa3d0f57c Mon Sep 17 00:00:00 2001 From: sea-bass Date: Fri, 29 Nov 2024 11:28:38 -0500 Subject: [PATCH 5/7] Remove Sonar job on Jazzy --- .github/workflows/sonar.yaml | 122 ----------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 .github/workflows/sonar.yaml diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml deleted file mode 100644 index 777ed2c33e..0000000000 --- a/.github/workflows/sonar.yaml +++ /dev/null @@ -1,122 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: SonarScan - -on: - push: - -jobs: - default: - env: - ROS_DISTRO: rolling - CXXFLAGS: >- - -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls - CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file - DOCKER_IMAGE: moveit/moveit2:rolling-ci - UPSTREAM_WORKSPACE: > - moveit2.repos - $(f="moveit2_$(sed 's/-.*$//' <<< "rolling-ci").repos"; test -r $f && echo $f) - # Pull any updates to the upstream workspace (after restoring it from cache) - AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src - AFTER_SETUP_DOWNSTREAM_WORKSPACE: vcs pull $BASEDIR/downstream_ws/src - # Clear the ccache stats before and log the stats after the build - AFTER_SETUP_CCACHE: ccache --zero-stats --max-size=10.0G - BEFORE_BUILD_UPSTREAM_WORKSPACE: ccache -z - AFTER_BUILD_TARGET_WORKSPACE: ccache -s - TARGET_CMAKE_ARGS: > - --no-warn-unused-cli - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld - -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld - -DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld - -DCMAKE_BUILD_TYPE='Debug' - -DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS --coverage -O2 -fno-omit-frame-pointer" - UPSTREAM_CMAKE_ARGS: "-DCMAKE_CXX_FLAGS=''" - DOWNSTREAM_CMAKE_ARGS: -DCMAKE_CXX_FLAGS="-Wall -Wextra" - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - ADDITIONAL_DEBS: lld - - name: rolling-ci-ccov-sonar - runs-on: ubuntu-latest - steps: - - name: "Free up disk space" - if: matrix.env.CCOV - run: | - sudo apt-get -qq purge "ghc*" - sudo apt-get clean - # cleanup docker images not used by us - docker system prune -af - # shift ccache folder to /mnt on a separate disk - sudo mkdir /mnt/ccache - mkdir ${{ env.CCACHE_DIR }} - sudo mount --bind ${{ env.CCACHE_DIR }} /mnt/ccache - # free up a lot of stuff from /usr/local - sudo rm -rf /usr/local - df -h - - uses: actions/checkout@v4 -# Testspace disabled temporarily: https://github.com/moveit/moveit2/issues/2852 -# - uses: testspace-com/setup-testspace@v1 -# if: github.repository == 'moveit/moveit2' -# with: -# domain: ros-planning - - name: Get latest release date for rosdistro - id: rosdistro_release_date - uses: JafarAbdi/latest-rosdistro-release-date-action@main - with: - rosdistro: ${{ env.ROS_DISTRO }} - - name: Get latest timestamp repos file has been edited - id: repos_edit_timestamp - uses: vatanaksoytezer/latest-file-edit-timestamp-action@main - with: - file: moveit2.repos - - name: Cache upstream workspace - uses: rhaschke/cache@main - with: - path: ${{ env.BASEDIR }}/upstream_ws - key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }} - restore-keys: ${{ env.CACHE_PREFIX }} - env: - GHA_CACHE_SAVE: always - CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ steps.repos_edit_timestamp.outputs.timestamp }}-rolling-ci-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} - - name: Cache ccache - uses: rhaschke/cache@main - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-rolling-ci-ccov-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-rolling-ci-ccov-${{ github.sha }} - ccache-rolling-ci-ccov - env: - GHA_CACHE_SAVE: always - - name: Configure ccache - run: | - mkdir -p ${{ env.CCACHE_DIR }} - cp .github/ccache.conf ${{ env.CCACHE_DIR }}/ccache.conf - - id: ici - name: Run industrial_ci - uses: ros-industrial/industrial_ci@master - - name: Generate codecov report - uses: rhaschke/lcov-action@main - if: steps.ici.outputs.target_test_results == '0' - with: - docker: $DOCKER_IMAGE - workdir: ${{ env.BASEDIR }}/target_ws - lcov_capture_args: --ignore-errors=gcov,gcov,mismatch,mismatch,negative,negative - ignore: '"*/target_ws/build/*" "*/target_ws/install/*" "*/test/*"' - - name: Install ccache - run: sudo apt install ccache build-essential - - name: Print coverage.info - if: steps.ici.outputs.target_test_results == '0' - run: cat ${{ github.workspace }}/.work/target_ws/coverage.info - - name: Install sonar-scanner - if: steps.ici.outputs.target_test_results == '0' - uses: SonarSource/sonarcloud-github-c-cpp@v3 - - name: Run sonar-scanner - if: steps.ici.outputs.target_test_results == '0' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: sonar-scanner -X --define project.settings=.work/target_ws/src/moveit2/sonar-project.properties - working-directory: ${{ github.workspace }} From ae6e55e607fa7dea7b1683cb2ceb69823366e1e2 Mon Sep 17 00:00:00 2001 From: sea-bass Date: Fri, 29 Nov 2024 12:42:01 -0500 Subject: [PATCH 6/7] Fixes --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f0d577ff13..70f79acfdb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,8 @@ jobs: git clone --depth 1 --quiet --branch 1.11.9000 https://github.com/ament/googletest "${BASEDIR}/upstream_ws/src/googletest" builder_run_build "/opt/ros/${ROS_DISTRO}" "${BASEDIR}/upstream_ws" --packages-select gtest_vendor gmock_vendor env: + # TODO(andyz): When this clang-tidy issue is fixed, remove -Wno-unknown-warning-option + # https://stackoverflow.com/a/41673702 CXXFLAGS: >- -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-unknown-warning-option -Wno-cpp CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file @@ -161,6 +163,7 @@ jobs: with: docker: $DOCKER_IMAGE workdir: ${{ env.BASEDIR }}/target_ws + lcov_capture_args: --ignore-errors=gcov,gcov,mismatch,mismatch,negative,negative ignore: '"*/target_ws/build/*" "*/target_ws/install/*" "*/test/*"' - name: Upload codecov report uses: codecov/codecov-action@v5 From 85af762f714b171f69a7d737b049cf1e9ab67fe6 Mon Sep 17 00:00:00 2001 From: sea-bass Date: Fri, 29 Nov 2024 12:43:29 -0500 Subject: [PATCH 7/7] This may not be needed for Jazzy --- .github/workflows/ci.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 70f79acfdb..434adc400c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,10 +24,6 @@ jobs: ROS_DISTRO: jazzy IKFAST_TEST: true CLANG_TIDY: pedantic - # Silent gmock/gtest warnings by picking more recent googletest version - AFTER_BUILD_UPSTREAM_WORKSPACE: | - git clone --depth 1 --quiet --branch 1.11.9000 https://github.com/ament/googletest "${BASEDIR}/upstream_ws/src/googletest" - builder_run_build "/opt/ros/${ROS_DISTRO}" "${BASEDIR}/upstream_ws" --packages-select gtest_vendor gmock_vendor env: # TODO(andyz): When this clang-tidy issue is fixed, remove -Wno-unknown-warning-option # https://stackoverflow.com/a/41673702