From 862b975b7d58d86cc22c20d82f975582fa794613 Mon Sep 17 00:00:00 2001 From: ddengster Date: Wed, 3 Feb 2021 16:47:27 +0800 Subject: [PATCH 01/15] wip initial steps --- .github/workflows/build.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6194800e2..6454a3397 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,9 +23,27 @@ jobs: cd ws_rmf rosdep update rosdep install --from-paths src --ignore-src --rosdistro foxy -yr - - name: build + #- name: build + #shell: bash + #run: | + #cd ws_rmf + #source /opt/ros/foxy/setup.bash + #colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE + - name: build_with_codecov shell: bash run: | + sudo apt update + sudo apt install -y lcov python3-pip curl + pip3 install colcon-lcov-result cd ws_rmf source /opt/ros/foxy/setup.bash - colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE + colcon build --symlink-install --cmake-args -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' + colcon lcov-result --initial + colcon test + colcon lcov-result + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + files: ws_rmf/lcov/total_coverage.info + flags: tests + name: lean_and_mean_codecov_bot From bdeae4a58a36f890f29c3e620f651282544c4a90 Mon Sep 17 00:00:00 2001 From: ddengster Date: Fri, 5 Feb 2021 16:47:59 +0800 Subject: [PATCH 02/15] add codecov yaml --- codecov.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 codecov.yaml diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 000000000..2d4bcf190 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,14 @@ +coverage: + precision: 2 + round: down + range: "35...100" + status: + project: + default: + informational: true + patch: off +fixes: + - "ws_rmf/src/rmf_core/::" +comment: + layout: "diff, flags, files" + behavior: default From f9392199744cb94a7456579dceb69a6ef8b3fc99 Mon Sep 17 00:00:00 2001 From: ddengster Date: Fri, 5 Feb 2021 17:36:53 +0800 Subject: [PATCH 03/15] change to rmf_traffic for faster builds --- .github/workflows/build.yaml | 2 +- codecov.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6454a3397..ae7bff81d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -37,7 +37,7 @@ jobs: pip3 install colcon-lcov-result cd ws_rmf source /opt/ros/foxy/setup.bash - colcon build --symlink-install --cmake-args -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' + colcon build --symlink-install --cmake-args -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' --packages-up-to rmf_traffic colcon lcov-result --initial colcon test colcon lcov-result diff --git a/codecov.yaml b/codecov.yaml index 2d4bcf190..b856c417c 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -12,3 +12,5 @@ fixes: comment: layout: "diff, flags, files" behavior: default +ignore: + - "ws_rmf/build" From d43e72f7596d4a832b2cbe716e5c978b37778556 Mon Sep 17 00:00:00 2001 From: ddengster Date: Fri, 5 Feb 2021 17:48:41 +0800 Subject: [PATCH 04/15] test only rmf_traffic --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae7bff81d..ad40fec2b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,9 +38,9 @@ jobs: cd ws_rmf source /opt/ros/foxy/setup.bash colcon build --symlink-install --cmake-args -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' --packages-up-to rmf_traffic - colcon lcov-result --initial - colcon test - colcon lcov-result + colcon lcov-result --initial --packages-up-to rmf_traffic + colcon test --packages-select rmf_traffic + colcon lcov-result --packages-up-to rmf_traffic - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: From ed72d585e4f4c44de755b3b7ee76442d48cb7e0a Mon Sep 17 00:00:00 2001 From: ddengster Date: Fri, 5 Feb 2021 18:50:04 +0800 Subject: [PATCH 05/15] modify codecov --- codecov.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codecov.yaml b/codecov.yaml index b856c417c..9df8d589e 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -10,7 +10,8 @@ coverage: fixes: - "ws_rmf/src/rmf_core/::" comment: - layout: "diff, flags, files" - behavior: default + layout: "reach, diff, flags, files" + behavior: new + require_changes: false ignore: - "ws_rmf/build" From 419bed91c69ced3300c2050fbeb6870c76db8eae Mon Sep 17 00:00:00 2001 From: ddengster Date: Mon, 8 Feb 2021 11:42:13 +0800 Subject: [PATCH 06/15] remove codecov.yaml, use action-ros-ci --- codecov.yaml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 codecov.yaml diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 9df8d589e..000000000 --- a/codecov.yaml +++ /dev/null @@ -1,17 +0,0 @@ -coverage: - precision: 2 - round: down - range: "35...100" - status: - project: - default: - informational: true - patch: off -fixes: - - "ws_rmf/src/rmf_core/::" -comment: - layout: "reach, diff, flags, files" - behavior: new - require_changes: false -ignore: - - "ws_rmf/build" From 29a4d10db4d4a4ee6e6860798f316f67f1bf1675 Mon Sep 17 00:00:00 2001 From: ddengster Date: Mon, 8 Feb 2021 11:42:34 +0800 Subject: [PATCH 07/15] use action-ros-ci --- .github/workflows/build.yaml | 42 ++++++++++-------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ad40fec2b..39e3ae044 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,43 +7,23 @@ jobs: image: docker://ros:foxy-ros-base-focal steps: - - name: deps - run: | - sudo apt update - sudo apt install -y g++-8 - - name: setup - run: | - mkdir -p ws_rmf/src - name: checkout uses: actions/checkout@v2 with: - path: ws_rmf/src/rmf_core - - name: ros-deps - run: | - cd ws_rmf - rosdep update - rosdep install --from-paths src --ignore-src --rosdistro foxy -yr - #- name: build - #shell: bash - #run: | - #cd ws_rmf - #source /opt/ros/foxy/setup.bash - #colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE - - name: build_with_codecov - shell: bash + path: ros_ws/src/rmf_core + - name: setup run: | - sudo apt update - sudo apt install -y lcov python3-pip curl - pip3 install colcon-lcov-result - cd ws_rmf - source /opt/ros/foxy/setup.bash - colcon build --symlink-install --cmake-args -DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage' --packages-up-to rmf_traffic - colcon lcov-result --initial --packages-up-to rmf_traffic - colcon test --packages-select rmf_traffic - colcon lcov-result --packages-up-to rmf_traffic + cd ros_ws + - name: build + uses: ros-tooling/action-ros-ci@v0.1 + with: + target-ros2-distro: foxy + # build all packages listed in the meta package + package-name: | + rmf_traffic - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: - files: ws_rmf/lcov/total_coverage.info + files: ros_ws/lcov/total_coverage.info flags: tests name: lean_and_mean_codecov_bot From a056ac1b0b99854fda2205998933176300870fdd Mon Sep 17 00:00:00 2001 From: ddengster Date: Mon, 8 Feb 2021 11:55:06 +0800 Subject: [PATCH 08/15] integrate repos file --- .github/workflows/build.yaml | 5 +++++ rmf.repos | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 rmf.repos diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 39e3ae044..72b3d680b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,6 +13,7 @@ jobs: path: ros_ws/src/rmf_core - name: setup run: | + ls cd ros_ws - name: build uses: ros-tooling/action-ros-ci@v0.1 @@ -21,6 +22,10 @@ jobs: # build all packages listed in the meta package package-name: | rmf_traffic + vcs-repo-file-url: | + https://raw.githubusercontent.com/osrf/rmf_core/master/rmf.repos + colcon-mixin-name: coverage-gcc + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/rmf.repos b/rmf.repos new file mode 100644 index 000000000..cb9feb8b6 --- /dev/null +++ b/rmf.repos @@ -0,0 +1,5 @@ +repositories: + osrf/rmf_core: + type: git + url: https://github.com/osrf/rmf_core.git + version: master From 050433bcb9f547bd8dde98bb843400eac5018555 Mon Sep 17 00:00:00 2001 From: ddengster Date: Mon, 8 Feb 2021 11:57:37 +0800 Subject: [PATCH 09/15] fix rmf.repos link --- .github/workflows/build.yaml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 72b3d680b..22d9b12a6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,14 +7,21 @@ jobs: image: docker://ros:foxy-ros-base-focal steps: - - name: checkout - uses: actions/checkout@v2 - with: - path: ros_ws/src/rmf_core - - name: setup + - name: pwd + run: pwd + - name: deps + run: | + sudo apt update + sudo apt install -y g++-8 lcov python3-pip curl python3-vcstool gcovr + pip3 install colcon-lcov-result colcon-coveragepy-result colcon-mixin + - name: setup directories run: | - ls - cd ros_ws + mkdir ros_ws + mkdir ros_ws/src + ls ros_ws/ + cd ros_ws/ + colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + colcon mixin update default - name: build uses: ros-tooling/action-ros-ci@v0.1 with: @@ -23,8 +30,8 @@ jobs: package-name: | rmf_traffic vcs-repo-file-url: | - https://raw.githubusercontent.com/osrf/rmf_core/master/rmf.repos - colcon-mixin-name: coverage-gcc + https://raw.githubusercontent.com/osrf/rmf_core/feature/add_codecov/rmf.repos + colcon-mixin-name: coverage-pytest colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From 028d520105a5e42f6ee450466dcb0c3535d636fa Mon Sep 17 00:00:00 2001 From: ddengster Date: Mon, 8 Feb 2021 17:03:49 +0800 Subject: [PATCH 10/15] temp disable uncrustify --- rmf_traffic/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rmf_traffic/CMakeLists.txt b/rmf_traffic/CMakeLists.txt index 4f0e7bef4..d7fdb53ae 100644 --- a/rmf_traffic/CMakeLists.txt +++ b/rmf_traffic/CMakeLists.txt @@ -67,13 +67,13 @@ if(BUILD_TESTING AND ament_cmake_catch2_FOUND AND rmf_cmake_uncrustify_FOUND) $ ) - find_file(uncrustify_config_file NAMES "share/format/rmf_code_style.cfg") + #find_file(uncrustify_config_file NAMES "share/format/rmf_code_style.cfg") - rmf_uncrustify( - ARGN include src test - CONFIG_FILE ${uncrustify_config_file} - MAX_LINE_LENGTH 80 - ) + #rmf_uncrustify( + # ARGN include src test + # CONFIG_FILE ${uncrustify_config_file} + # MAX_LINE_LENGTH 80 + #) endif() if(using_new_fcl) From ab52573d071771ec9855e8cab01514dbd52e9332 Mon Sep 17 00:00:00 2001 From: ddengster Date: Mon, 8 Feb 2021 17:21:51 +0800 Subject: [PATCH 11/15] switch to forked mixin --- .github/workflows/build.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 22d9b12a6..0af537536 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,8 +20,6 @@ jobs: mkdir ros_ws/src ls ros_ws/ cd ros_ws/ - colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - colcon mixin update default - name: build uses: ros-tooling/action-ros-ci@v0.1 with: @@ -31,8 +29,8 @@ jobs: rmf_traffic vcs-repo-file-url: | https://raw.githubusercontent.com/osrf/rmf_core/feature/add_codecov/rmf.repos - colcon-mixin-name: coverage-pytest - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + colcon-mixin-name: coverage-gcc + colcon-mixin-repository: https://raw.githubusercontent.com/ddengster/colcon-mixin-repository/master/index.yaml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: From d757f78526931b27aef4d446e35fd1429f34eb46 Mon Sep 17 00:00:00 2001 From: ddengster Date: Tue, 9 Feb 2021 16:08:06 +0800 Subject: [PATCH 12/15] add packages --- .github/workflows/build.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0af537536..ce62ae4b1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,12 @@ jobs: target-ros2-distro: foxy # build all packages listed in the meta package package-name: | + rmf_battery + rmf_fleet_adapter + rmf_task rmf_traffic + rmf_traffic_ros2 + rmf_utils vcs-repo-file-url: | https://raw.githubusercontent.com/osrf/rmf_core/feature/add_codecov/rmf.repos colcon-mixin-name: coverage-gcc From a4f7604036fc450aee44e3b36a3bda16169f68b7 Mon Sep 17 00:00:00 2001 From: ddengster Date: Tue, 9 Feb 2021 16:43:41 +0800 Subject: [PATCH 13/15] comment out packages --- .github/workflows/build.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ce62ae4b1..7fdba452e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,14 +1,18 @@ name: build on: [push, pull_request] jobs: - build: + build_and_test: runs-on: ubuntu-20.04 container: image: docker://ros:foxy-ros-base-focal steps: - name: pwd - run: pwd + run: | + pwd + echo $GITHUB_SHA + echo $GITHUB_REPOSITORY + echo $GITHUB_WORKSPACE - name: deps run: | sudo apt update @@ -26,12 +30,12 @@ jobs: target-ros2-distro: foxy # build all packages listed in the meta package package-name: | - rmf_battery - rmf_fleet_adapter - rmf_task + # rmf_battery + # rmf_fleet_adapter + # rmf_task rmf_traffic - rmf_traffic_ros2 - rmf_utils + # rmf_traffic_ros2 + # rmf_utils vcs-repo-file-url: | https://raw.githubusercontent.com/osrf/rmf_core/feature/add_codecov/rmf.repos colcon-mixin-name: coverage-gcc From 067e171d15005a9ea46ae3dcd97a416173146074 Mon Sep 17 00:00:00 2001 From: ddengster Date: Tue, 9 Feb 2021 16:53:33 +0800 Subject: [PATCH 14/15] cleanup --- .github/workflows/build.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7fdba452e..437aaf2f0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,11 +8,7 @@ jobs: steps: - name: pwd - run: | - pwd - echo $GITHUB_SHA - echo $GITHUB_REPOSITORY - echo $GITHUB_WORKSPACE + run: pwd - name: deps run: | sudo apt update @@ -30,12 +26,12 @@ jobs: target-ros2-distro: foxy # build all packages listed in the meta package package-name: | - # rmf_battery - # rmf_fleet_adapter - # rmf_task rmf_traffic - # rmf_traffic_ros2 - # rmf_utils + # rmf_battery + # rmf_fleet_adapter + # rmf_task + # rmf_traffic_ros2 + # rmf_utils vcs-repo-file-url: | https://raw.githubusercontent.com/osrf/rmf_core/feature/add_codecov/rmf.repos colcon-mixin-name: coverage-gcc From 9c04e3b8f9f555c9ece77dabd9e1eb5b1bf950d5 Mon Sep 17 00:00:00 2001 From: ddengster Date: Wed, 10 Feb 2021 11:53:01 +0800 Subject: [PATCH 15/15] enable rmf_battery tests without uncrustify --- .github/workflows/build.yaml | 2 +- rmf_battery/CMakeLists.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 437aaf2f0..1f2ed1f7e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,7 +27,7 @@ jobs: # build all packages listed in the meta package package-name: | rmf_traffic - # rmf_battery + rmf_battery # rmf_fleet_adapter # rmf_task # rmf_traffic_ros2 diff --git a/rmf_battery/CMakeLists.txt b/rmf_battery/CMakeLists.txt index d6e3b3c46..93d633790 100644 --- a/rmf_battery/CMakeLists.txt +++ b/rmf_battery/CMakeLists.txt @@ -65,14 +65,14 @@ if(BUILD_TESTING) $ ) - find_package(rmf_cmake_uncrustify REQUIRED) - find_file(uncrustify_config_file NAMES "share/format/rmf_code_style.cfg") - - rmf_uncrustify( - ARGN include src test - CONFIG_FILE ${uncrustify_config_file} - MAX_LINE_LENGTH 80 - ) + #find_package(rmf_cmake_uncrustify REQUIRED) + #find_file(uncrustify_config_file NAMES "share/format/rmf_code_style.cfg") + + #rmf_uncrustify( + # ARGN include src test + # CONFIG_FILE ${uncrustify_config_file} + # MAX_LINE_LENGTH 80 + #) endif() install(