From 152631c7cafe85054f0777407956724cd7f7dbfa Mon Sep 17 00:00:00 2001 From: Jordan Palacios Date: Tue, 31 Mar 2020 12:04:08 +0200 Subject: [PATCH] Setup for ROS2 CI --- .github/workflows/lint.yml | 41 ++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 34 +++++++++++++++++++++++++++++++ .travis.yml | 31 ++++++++-------------------- codecov.yml | 2 ++ 4 files changed, 85 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml create mode 100644 codecov.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..1b2278e4 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,41 @@ +name: Lint control_toolbox +on: + pull_request: + +jobs: + ament_copyright: + name: ament_copyright + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - uses: ros-tooling/setup-ros@0.0.13 + - uses: ros-tooling/action-ros-lint@0.0.5 + with: + linter: copyright + package-name: control_toolbox + + ament_xmllint: + name: ament_xmllint + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - uses: ros-tooling/setup-ros@0.0.13 + - uses: ros-tooling/action-ros-lint@0.0.5 + with: + linter: xmllint + package-name: control_toolbox + + ament_lint_cpp: + name: ament_${{ matrix.linter }} + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + linter: [cppcheck, cpplint, uncrustify] + steps: + - uses: actions/checkout@v1 + - uses: ros-tooling/setup-ros@0.0.13 + - uses: ros-tooling/action-ros-lint@0.0.5 + with: + linter: ${{ matrix.linter }} + package-name: control_toolbox diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a5153da2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: Test control_toolbox +on: + pull_request: + push: + branches: + - ros2-master + schedule: + # Run every morning to detect flakiness and broken dependencies + - cron: '17 8 * * *' + +jobs: + build_and_test: + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + steps: + - uses: ros-tooling/setup-ros@0.0.13 + - uses: ros-tooling/action-ros-ci@0.0.13 + with: + package-name: control_toolbox + colcon-mixin-name: coverage-gcc + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ros_ws/lcov/total_coverage.info + flags: unittests + name: codecov-umbrella + yml: ./codecov.yml + fail_ci_if_error: true + - uses: actions/upload-artifact@master + with: + name: colcon-logs-${{ matrix.os }} + path: ros_ws/log diff --git a/.travis.yml b/.travis.yml index f831e22c..2145ef27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,10 @@ -# Travis Continuous Integration Configuration File For ROS Control Projects -sudo: required -dist: trusty -language: generic +services: + - docker -notifications: - email: - recipients: - - enrique.fernandez.perdomo@gmail.com - - bence.magyar.robotics@gmail.com - - gennaro.raiola@gmail.com - on_success: change #[always|never|change] # default: change - on_failure: change #[always|never|change] # default: always - -env: - global: - - ROS_PARALLEL_TEST_JOBS=-j1 - matrix: - - ROS_DISTRO=melodic ROS_REPO=ros UPSTREAM_WORKSPACE=https://raw.github.com/ros-controls/ros_control/$ROS_DISTRO-devel/ros_control.rosinstall - - ROS_DISTRO=melodic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=https://raw.github.com/ros-controls/ros_control/$ROS_DISTRO-devel/ros_control.rosinstall - install: - - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config -script: -- .ci_config/travis.sh + - git clone --quiet --depth 1 https://github.com/mikaelarguedas/ros2ci.git .ros2ci + +matrix: + include: + - env: JOB_TYPE=nightly + script: .ros2ci/travis.bash $JOB_TYPE diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..2a02240d --- /dev/null +++ b/codecov.yml @@ -0,0 +1,2 @@ +fixes: + - "ros_ws/src/control_toolbox/::"