diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6194800e2..1f2ed1f7e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,31 +1,44 @@ 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 - name: deps run: | sudo apt update - sudo apt install -y g++-8 - - name: setup + 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: | - 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 + mkdir ros_ws + mkdir ros_ws/src + ls ros_ws/ + cd ros_ws/ - name: build - shell: bash - run: | - cd ws_rmf - source /opt/ros/foxy/setup.bash - colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE + 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 + 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 + 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: + files: ros_ws/lcov/total_coverage.info + flags: tests + name: lean_and_mean_codecov_bot 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 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( 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)