Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)

name: Build and Test

on:
workflow_dispatch:
pull_request:
push:
branches:
- ros2

jobs:
industrial_ci:
strategy:
matrix:
env:
- ROS_DISTRO: foxy
ROS_REPO: main
- ROS_DISTRO: foxy
ROS_REPO: testing
- ROS_DISTRO: rolling
ROS_REPO: main
- ROS_DISTRO: rolling
ROS_REPO: testing
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}

name: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# The target directory cache doesn't include the source directory because
# that comes from the checkout. See "prepare target_ws for cache" task below
- name: cache target_ws
if: ${{ ! matrix.env.CCOV }}
uses: pat-s/always-upload-cache@v2.1.3
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
- name: cache ccache
uses: pat-s/always-upload-cache@v2.1.3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
- name: industrial_ci
uses: 'ros-industrial/industrial_ci@master'
env: ${{ matrix.env }}
- name: upload test artifacts (on failure)
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: prepare target_ws for cache
if: ${{ always() && ! matrix.env.CCOV }}
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is a format job. Pre-commit has a first-party GitHub action, so we use
# that: https://github.com/pre-commit/action

name: Format
name: Formatting (pre-commit)

on:
workflow_dispatch:
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/industrial_ci_action.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ repos:
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: pretty-format-json
- id: trailing-whitespace

- repo: local
hooks:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Abstract interface for persisting ROS message data. Implementations are loaded

| Branch | CI Status |
| ------ | --------- |
| `ros2` | [![Format](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yml/badge.svg?branch=ros2)](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yml?branch=ros2) [![BuildAndTest](https://github.com/ros-planning/warehouse_ros/actions/workflows/industrial_ci_action.yml/badge.svg?branch=ros2)](https://github.com/ros-planning/warehouse_ros/actions/workflows/industrial_ci_action.yml?branch=ros2) |
| `kinetic-devel` | [![Format](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yml/badge.svg?branch=kinetic-devel)](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yml?branch=kinetic-devel) [![BuildAndTest](https://github.com/ros-planning/warehouse_ros/actions/workflows/industrial_ci_action.yml/badge.svg?branch=kinetic-devel)](https://github.com/ros-planning/warehouse_ros/actions/workflows/industrial_ci_action.yml?branch=kinetic-devel) |
| `ros2` | [![Formatting (pre-commit)](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yaml/badge.svg?branch=ros2)](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yaml?query=branch%3Aros2) [![Build and Test](https://github.com/ros-planning/warehouse_ros/actions/workflows/build_and_test.yaml/badge.svg?branch=ros2)](https://github.com/ros-planning/warehouse_ros/actions/workflows/build_and_test.yaml?query=branch%3Aros2) |
| `kinetic-devel` | [![Formatting (pre-commit)](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yaml/badge.svg?branch=kinetic-devel)](https://github.com/ros-planning/warehouse_ros/actions/workflows/format.yaml?query=branch%3Akinetic-devel) [![Build and Test](https://github.com/ros-planning/warehouse_ros/actions/workflows/build_and_test.yaml/badge.svg?branch=kinetic-devel)](https://github.com/ros-planning/warehouse_ros/actions/workflows/build_and_test.yaml?query=branch%3Akinetic-devel) |