Skip to content

Commit

Permalink
Merge pull request #5 from Wiktor-99/ci_refactor
Browse files Browse the repository at this point in the history
Ci refactor
  • Loading branch information
Wiktor-99 authored Aug 29, 2024
2 parents 25607dd + 47618ed commit fbc1c5a
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 36 deletions.
7 changes: 7 additions & 0 deletions .github/actions/lint/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Lint
description: Lint using devcontainer
runs:
using: docker
image: ../../../.devcontainer/Dockerfile
entrypoint: .github/actions/lint/run.sh
10 changes: 10 additions & 0 deletions .github/actions/lint/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e

sudo apt-get update
source /opt/ros/$ROS_DISTRO/setup.bash
if [[ "ament_flake8" == "ament_${LINTER}" ]]; then
ament_${LINTER} . --config python_linter.flake8
else
ament_${LINTER}
fi
25 changes: 25 additions & 0 deletions .github/workflows/build_and_test_iron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Build and Test (iron)

on:
push:
branches: [iron]

pull_request:
branches: [iron]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:jammy

steps:
- uses: ros-tooling/setup-ros@v0.7
with:
use-ros2-testing: true
- uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros2-distro: iron
25 changes: 25 additions & 0 deletions .github/workflows/build_and_test_jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Build and Test (jazzy)

on:
push:
branches: [jazzy]

pull_request:
branches: [jazzy]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:noble

steps:
- uses: ros-tooling/setup-ros@v0.7
with:
use-ros2-testing: true
- uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros2-distro: jazzy
25 changes: 25 additions & 0 deletions .github/workflows/build_and_test_rolling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Build and Test (rolling)

on:
push:
branches: [rolling]

pull_request:
branches: [rolling]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:noble

steps:
- uses: ros-tooling/setup-ros@v0.7
with:
use-ros2-testing: true
- uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros2-distro: rolling
36 changes: 0 additions & 36 deletions .github/workflows/lint.yaml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: ROS

on:
pull_request:
push:
branches:
- foxy*
- humble*
- iron*
- rolling*
- main*
workflow_dispatch:

jobs:
ament_lint_general:
name: ament_${{ matrix.linter }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
linter: [xmllint, flake8, pep257]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run linter
uses: ./.github/actions/lint/
env:
LINTER: ${{ matrix.linter }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Human Detector for ROS 2
![rolling](https://github.com/Wiktor-99/human_detector/actions/workflows/build_and_test_rolling.yaml/badge.svg)
![jazzy](https://github.com/Wiktor-99/human_detector/actions/workflows/build_and_test_jazzy.yaml/badge.svg)
![iron](https://github.com/Wiktor-99/human_detector/actions/workflows/build_and_test_iron.yaml/badge.svg)
![humble](https://github.com/Wiktor-99/human_detector/actions/workflows/build_and_test_humble.yaml/badge.svg)

This ROS 2 package utilizes MediaPipe and depth images to detect the position of a human in the x, y, and z coordinates.
Expand Down

0 comments on commit fbc1c5a

Please sign in to comment.