Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub actions #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check
run: make check

ros:
runs-on: ubuntu-latest
container: ros:${{ matrix.ros-version }}-robot
strategy:
matrix:
ros-version: [melodic, noetic]
steps:
- uses: actions/checkout@v2
- name: Setup
run: ./install_dependencies.sh
- name: Init Workspace
run: |
mkdir -p $GITHUB_WORKSPACE/../catkin_ws/src
cd $GITHUB_WORKSPACE/../catkin_ws/src
ln -s $GITHUB_WORKSPACE
cd ..
catkin init
- name: Build, Test, Lint
shell: bash
run: |
source /opt/ros/${{ matrix.ros-version }}/setup.bash
cd $GITHUB_WORKSPACE/../catkin_ws &&
catkin build --summarize --no-status --force-color
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ if(${ROS_VERSION} EQUAL 1)

generate_messages(DEPENDENCIES std_msgs geometry_msgs diagnostic_msgs)

catkin_package(CATKIN_DEPENDS message_runtime std_msgs geometry_msgs diagnostic_msgs)
catkin_package(CATKIN_DEPENDS message_runtime std_msgs geometry_msgs
diagnostic_msgs)

elseif(${ROS_VERSION} EQUAL 2)

Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
file_finder = find . -type f \( $(1) \) -not \( -path '*/venv/*' -o -path '*/build/*' -o -path '*/cmake-build-debug/*' \)

CMAKE_FILES = $(call file_finder,-name "*.cmake" -o -name "CMakeLists.txt")

check: check_format

format:
$(CMAKE_FILES) | xargs cmake-format -i

check_format:
$(CMAKE_FILES) | xargs cmake-format --check
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# ros-carla-msgs

[![Actions Status](https://github.com/carla-simulator/ros-carla-msgs/workflows/CI/badge.svg)](https://github.com/carla-simulator/ros-carla-msgs)
[![GitHub](https://img.shields.io/github/license/carla-simulator/ros-carla-msgs)](https://github.com/carla-simulator/ros-carla-msgs/blob/master/LICENSE)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/carla-simulator/ros-carla-msgs)](https://github.com/carla-simulator/ros-carla-msgs/releases/latest)

Official ROS messages for CARLA.

Use them in conjunction with [CARLA ROS bridge](https://github.com/carla-simulator/ros-bridge).
14 changes: 14 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROS_VERSION=$(rosversion -d)
if [ "$ROS_VERSION" = "noetic" ]; then
PYTHON_SUFFIX=3
else
PYTHON_SUFFIX=""
fi

sudo apt-get update
sudo apt-get install --no-install-recommends -y \
python$PYTHON_SUFFIX-osrf-pycommon \
python$PYTHON_SUFFIX-catkin-tools
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmakelang