From 6035a6e613894c6d5c184e357e40516082aa1178 Mon Sep 17 00:00:00 2001 From: Loy van Beek Date: Tue, 29 Jun 2021 09:18:04 +0200 Subject: [PATCH] Add Industrial CI config and for Github Actions --- .github/workflows/main.yml | 46 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 24 ++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8cd8f02 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + pull_request: +# schedule: +# - cron: "0 0 * * 0" # every Sunday at midnight + workflow_dispatch: + +jobs: + industrial_ci: + if: github.event.pull_request.draft == false # only run on non-draft PRs + runs-on: ubuntu-latest + timeout-minutes: 60 + + env: + ADDITIONAL_DEBS: 'apt-utils dialog' + CATKIN_LINT: pedantic + CATKIN_LINT_ARGS: '--ignore description_boilerplate' + CCACHE_DIR: /github/home/.ccache # Directory for ccache (and how we enable ccache in industrial_ci) + CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Release + PYLINT_ARGS: '--output-format=parseable --errors-only --disable=method-hidden' + PYLINT_CHECK: true + ROS_REPO: main + + strategy: + matrix: + include: + - { ROS_DISTRO: kinetic } + - { ROS_DISTRO: noetic } + + steps: + - uses: actions/checkout@v2 + with: + lfs: true + ssh-known-hosts: '' + + # This step will fetch/store the directory used by ccache before/after the ci run + - uses: actions/cache@v2 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-${{ matrix.ROS_DISTRO }} + + - uses: ros-industrial/industrial_ci@master + with: + config: ${{toJSON(matrix)}} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8732886 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: generic +services: + - docker + +notifications: + email: + on_success: change + on_failure: always +env: + global: + - ADDITIONAL_DEBS='apt-utils dialog' + - CATKIN_LINT=pedantic + - CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release + - PARALLEL_TESTS=1 + - PYLINT_ARGS='--output-format=parseable --errors-only --disable=method-hidden' + - PYLINT_CHECK=true + - ROS_REPO=main + matrix: + - ROS_DISTRO=kinetic + - ROS_DISTRO=noetic +install: + - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b master +script: + - .industrial_ci/travis.sh