Skip to content

Commit

Permalink
CI (#1) (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Fixit-Davide <graziato.davide@outlook.it>
  • Loading branch information
roncapat and Fixit-Davide committed Dec 7, 2023
1 parent 34f648b commit e1ab96a
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/iron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Ubuntu 22.04 Iron Build

on:
pull_request:
push:
branches:
- iron

jobs:
Build:
runs-on: self-hosted
container:
image: osrf/ros:iron-desktop-full-jammy

steps:
- name: Update
run: apt update

- name: Install PIP
run: apt install -y python3-pip lcov

- name: Install colcon tools
run: python3 -m pip install colcon-lcov-result colcon-coveragepy-result

- name: Checkout
uses: actions/checkout@v2

- name: Run Tests
uses: ros-tooling/action-ros-ci@0.3.5
with:
target-ros2-distro: iron
import-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ros_ws/log
if: always()
39 changes: 39 additions & 0 deletions .github/workflows/rolling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Ubuntu 22.04 Rolling Build

on:
pull_request:
push:
branches:
- iron

jobs:
Build:
runs-on: self-hosted
container:
image: osrf/ros:rolling-desktop-full-jammy

steps:
- name: Update
run: apt update

- name: Install PIP
run: apt install -y python3-pip lcov

- name: Install colcon tools
run: python3 -m pip install colcon-lcov-result colcon-coveragepy-result

- name: Checkout
uses: actions/checkout@v2

- name: Run Tests
uses: ros-tooling/action-ros-ci@0.3.5
with:
target-ros2-distro: rolling
import-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ros_ws/log
if: always()
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ install(DIRECTORY
DESTINATION share/${PROJECT_NAME}/
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# ROS2-systemctl Node:
# ROS2-systemctl Node

[![Ubuntu 22.04 Iron Build](https://github.com/Fixit-Davide/ros-systemctl/actions/workflows/iron.yaml/badge.svg?branch=iron)](https://github.com/Fixit-Davide/ros-systemctl/actions/workflows/iron.yaml)
[![Ubuntu 22.04 Rolling Build](https://github.com/Fixit-Davide/ros-systemctl/actions/workflows/rolling.yaml/badge.svg?branch=iron)](https://github.com/Fixit-Davide/ros-systemctl/actions/workflows/rolling.yaml)


**systemctl** is a command line utility that is used to control and manage system services on Linux operating system.
This Node enables the communication with **systemctl** using basic ROS2 services (std_srvs::srv::Request). It allows the user to start, stop, restart and visualize the status of a specific system service.

## How to Use:
- In order to function correctly as a normal user, the custom Systemd unit file has to be generated in the `~/.config/systemd/user/` directory.
- In the params file the names of the systemd services can be set as a simple list **omitting** the .service extension of the name.
Expand Down
7 changes: 6 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
<depend>builtin_interfaces</depend>
<depend>std_srvs</depend>
<depend>rosidl_default_generators</depend>
<depend>libsystemd-dev</depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<test_depend>ament_cmake_uncrustify</test_depend>
<test_depend>ament_cmake_cppcheck</test_depend>
<test_depend>ament_cmake_cpplint</test_depend>
<test_depend>ament_cmake_lint_cmake</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down

0 comments on commit e1ab96a

Please sign in to comment.