Skip to content

Commit

Permalink
Add GitHub actions for linting and source-build CI (#178)
Browse files Browse the repository at this point in the history
* Use github actions to perform CI

- One source build to test against latest master
- One build on top of nightly image to give quick feedback

Signed-off-by: Mikael Arguedas <[email protected]>

* comment integration tests until fastrtps is fixed

Signed-off-by: Mikael Arguedas <[email protected]>

* comment out end-to-end testing for now

Signed-off-by: Mikael Arguedas <[email protected]>

* add badges to readme

Signed-off-by: Mikael Arguedas <[email protected]>

* use ROS_DISTRO env var

Signed-off-by: Mikael Arguedas <[email protected]>

* test sequentially and print to console

Signed-off-by: Mikael Arguedas <[email protected]>

* run after nightly docker images rebuild

Signed-off-by: Mikael Arguedas <[email protected]>

* add comment about using upstream action-ros-ci

Signed-off-by: Mikael Arguedas <[email protected]>
  • Loading branch information
mikaelarguedas authored Apr 1, 2020
1 parent 547e2c2 commit 9e1d105
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fixes:
- "ros_ws/src/sros2/::"
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: SROS2 CI
on:
pull_request:
push:
schedule:
# Run daily
- cron: '0 20 * * *'

jobs:
test_latest:
runs-on: ubuntu-latest
container: osrf/ros2:devel
steps:
- run: |
apt-get -qq update
apt-get -qq upgrade -y
apt-get -qq install -y curl libasio-dev libtinyxml2-dev
# TODO(mikaelarguedas) switch back to ros-tooling/action-ros-ci once
# https://github.com/ros-tooling/action-ros-ci/pull/109 is released
- uses: mikaelarguedas/action-ros-ci@sros2-version
with:
package-name: |
sros2
sros2_cmake
# skipping end-to-end tests for now https://github.com/eProsima/Fast-RTPS/issues/1087
# test_security
# extra-cmake-args: '-DSECURITY=ON --no-warn-unused-cli'
- name: Upload coverage to Codecov
uses: codecov/[email protected]
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
with:
file: ros_ws/build/sros2/coverage.xml
flags: unittests
name: sros2-coverage
fail_ci_if_error: true
yml: .codecov.yml
- name: Upload Logs
uses: actions/upload-artifact@v1
if: failure()
with:
name: colcon-logs
path: ros_ws/log
test_nightly:
runs-on: ubuntu-latest
container: osrf/ros2:nightly
steps:
- uses: actions/checkout@v1
- run: |
apt-get -qq update
apt-get -qq upgrade -y
rosdep update
rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_DISTRO
- run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build
- run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon test --executor sequential --event-handlers console_direct+
- run: colcon test-result
- name: Upload Logs
uses: actions/upload-artifact@v1
if: failure()
with:
name: colcon-logs
path: ros_ws/log
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Context

![SROS2 CI](https://github.com/ros2/sros2/workflows/SROS2%20CI/badge.svg)
[![codecov](https://codecov.io/gh/ros2/sros2/branch/master/graph/badge.svg)](https://codecov.io/gh/ros2/sros2)

This package provides the tools and instructions to use ROS2 on top of DDS-Security.
The security feature is tested across platforms (Linux, macOS, and Windows) as well as across different languages (C++ and Python).

Expand Down
4 changes: 4 additions & 0 deletions sros2/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
omit =
# omit test directory
test/*

0 comments on commit 9e1d105

Please sign in to comment.