Skip to content

Commit

Permalink
Merge branch 'ros2' into shm-simple-test
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikN authored Jan 4, 2024
2 parents 9f156b6 + 149c417 commit 04e5869
Show file tree
Hide file tree
Showing 12 changed files with 201 additions and 196 deletions.
129 changes: 66 additions & 63 deletions .github/workflows/ros-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,77 +2,80 @@
name: Build/Publish ROS Docker Image

on:
workflow_dispatch:
inputs:
build_type:
description: Is it a "development" or a "stable" release?
required: true
default: development
type: choice
options:
- development
- stable
target_distro:
description: In case of "stable" release specify the ROS distro of the existing docker image (eg. humble)
type: string
default: ardent
target_release:
description: In case of "stable" release specify the version of the existing docker image (eg. 1.0.12)
type: string
default: 0.0.0
target_date:
description: In case of "stable" release specify the date of the existing docker image in format YYYYMMDD (eg. 20220124)
type: string
default: '20131206'
repository_dispatch:
types: [rebuild, ros-package-update]
pull_request:
types:
- closed
- opened
workflow_dispatch:
inputs:
build_type:
description: Is it a "development" or a "stable" release?
required: true
default: development
type: choice
options:
- development
- stable
target_distro:
description: In case of "stable" release specify the ROS distro of the existing docker image (eg.
humble)
type: string
default: ardent
target_release:
description: In case of "stable" release specify the version of the existing docker image (eg.
1.0.12)
type: string
default: 0.0.0
target_date:
description: In case of "stable" release specify the date of the existing docker image in format
YYYYMMDD (eg. 20220124)
type: string
default: '20131206'
repository_dispatch:
types: [rebuild, ros-package-update]
pull_request:
types:
- closed
- opened

jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:

include:
- dockerfile: Dockerfile.hardware
repo_name: ''
platforms: linux/amd64, linux/arm64
ros_distro: humble
- dockerfile: Dockerfile.gazebo
repo_name: rosbot-gazebo
platforms: linux/amd64
ros_distro: humble
- dockerfile: Dockerfile.hardware
repo_name: ''
platforms: linux/amd64, linux/arm64
ros_distro: iron
include:
- dockerfile: Dockerfile.hardware
repo_name: ''
platforms: linux/amd64, linux/arm64
ros_distro: humble
- dockerfile: Dockerfile.gazebo
repo_name: rosbot-gazebo
platforms: linux/amd64
ros_distro: humble
- dockerfile: Dockerfile.hardware
repo_name: ''
platforms: linux/amd64, linux/arm64
ros_distro: iron
# - dockerfile: Dockerfile.gazebo
# repo_name: rosbot-gazebo
# platforms: linux/amd64
# ros_distro: iron

steps:
steps:

- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: ${{ matrix.dockerfile }} | ${{ matrix.ros_distro }} | Build
uses: husarion-ci/[email protected]
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
main_branch_name: ros2
dockerfile: ${{ matrix.dockerfile }}
repo_name: ${{ matrix.repo_name }}
build_type: ${{ inputs.build_type }}
ros_distro: ${{ matrix.ros_distro }}
platforms: ${{ matrix.platforms }}
- name: ${{ matrix.dockerfile }} | ${{ matrix.ros_distro }} | Build
uses: husarion-ci/[email protected]
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
main_branch_name: ros2
dockerfile: ${{ matrix.dockerfile }}
repo_name: ${{ matrix.repo_name }}
build_type: ${{ inputs.build_type }}
ros_distro: ${{ matrix.ros_distro }}
platforms: ${{ matrix.platforms }}
# variables important only for stable release
target_distro: ${{ inputs.target_distro }}
target_release: ${{ inputs.target_release }}
target_date: ${{ inputs.target_date }}
target_distro: ${{ inputs.target_distro }}
target_release: ${{ inputs.target_release }}
target_date: ${{ inputs.target_date }}
123 changes: 63 additions & 60 deletions .github/workflows/vulcanexus-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,73 @@
name: Build/Publish Vulcanexus Docker Image

on:
workflow_dispatch:
inputs:
build_type:
description: Is it a "development" or a "stable" release?
required: true
default: development
type: choice
options:
- development
- stable
target_distro:
description: In case of "stable" release specify the ROS distro of the existing docker image (eg. humble)
type: string
default: ardent
target_release:
description: In case of "stable" release specify the version of the existing docker image (eg. 1.0.12)
type: string
default: 0.0.0
target_date:
description: In case of "stable" release specify the date of the existing docker image in format YYYYMMDD (eg. 20220124)
type: string
default: '20131206'
repository_dispatch:
types: [rebuild, ros-package-update]
pull_request:
types:
- closed
- opened
workflow_dispatch:
inputs:
build_type:
description: Is it a "development" or a "stable" release?
required: true
default: development
type: choice
options:
- development
- stable
target_distro:
description: In case of "stable" release specify the ROS distro of the existing docker image (eg.
humble)
type: string
default: ardent
target_release:
description: In case of "stable" release specify the version of the existing docker image (eg.
1.0.12)
type: string
default: 0.0.0
target_date:
description: In case of "stable" release specify the date of the existing docker image in format
YYYYMMDD (eg. 20220124)
type: string
default: '20131206'
repository_dispatch:
types: [rebuild, ros-package-update]
pull_request:
types:
- closed
- opened

jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:

include:
- dockerfile: Dockerfile.hardware
repo_name: ''
platforms: linux/amd64, linux/arm64
ros_distro: humble
- dockerfile: Dockerfile.gazebo
repo_name: rosbot-gazebo
platforms: linux/amd64
ros_distro: humble
include:
- dockerfile: Dockerfile.hardware
repo_name: ''
platforms: linux/amd64, linux/arm64
ros_distro: humble
- dockerfile: Dockerfile.gazebo
repo_name: rosbot-gazebo
platforms: linux/amd64
ros_distro: humble

steps:
steps:

- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: ${{ matrix.dockerfile }} | ${{ matrix.ros_distro }} | Build
uses: husarion-ci/[email protected]
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
main_branch_name: ros2
dockerfile: ${{ matrix.dockerfile }}
repo_name: ${{ matrix.repo_name }}
build_type: ${{ inputs.build_type }}
ros_distro: ${{ matrix.ros_distro }}
platforms: ${{ matrix.platforms }}
prefix: vulcanexus-
- name: ${{ matrix.dockerfile }} | ${{ matrix.ros_distro }} | Build
uses: husarion-ci/[email protected]
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
main_branch_name: ros2
dockerfile: ${{ matrix.dockerfile }}
repo_name: ${{ matrix.repo_name }}
build_type: ${{ inputs.build_type }}
ros_distro: ${{ matrix.ros_distro }}
platforms: ${{ matrix.platforms }}
prefix: vulcanexus-
# variables important only for stable release
target_distro: ${{ inputs.target_distro }}
target_release: ${{ inputs.target_release }}
target_date: ${{ inputs.target_date }}
target_distro: ${{ inputs.target_distro }}
target_release: ${{ inputs.target_release }}
target_date: ${{ inputs.target_date }}
93 changes: 45 additions & 48 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,55 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: name-tests-test
files: ^.*\/test\/.*$
args: [--pytest-test-first]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: name-tests-test
files: ^.*\/test\/.*$
args: [--pytest-test-first]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell *
language: python
types: [text]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
entry: codespell *

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
files: ^.github|./\.yaml
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
files: ^(?!.*compose).*$
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '100']

- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
args: ["--line-length=99"]
- repo: https://github.com/psf/black
rev: 23.12.0
hooks:
- id: black
args: [--line-length=99]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["--ignore=E501,W503"] # ignore too long line and line break before binary operator,
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ['--ignore=E501,W503'] # ignore too long line and line break before binary operator,
# black checks it

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
args: ['--max-line-length=100', '--ignore=D001']
exclude: ^.*\/CHANGELOG\.rst/.*$
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
args: [--max-line-length=100, --ignore=D001]
exclude: ^.*\/CHANGELOG\.rst/.*$

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.4
hooks:
- id: clang-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
4 changes: 2 additions & 2 deletions Dockerfile.gazebo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN mkdir src && \
install(TARGETS healthcheck_node DESTINATION lib/${PROJECT_NAME})' \
/ros2_ws/src/healthcheck_pkg/CMakeLists.txt

COPY healthcheck.cpp src/healthcheck_pkg/src/
COPY healthcheck.cpp src/healthcheck_pkg/src/

RUN MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \
source /opt/$MYDISTRO/$ROS_DISTRO/setup.bash && \
Expand Down Expand Up @@ -107,7 +107,7 @@ RUN apt-get update && apt-get install -y \
COPY healthcheck.sh /
COPY run_healthcheck_node.sh /

HEALTHCHECK --interval=5s --timeout=2s --start-period=5s --retries=4 \
HEALTHCHECK --interval=2s --timeout=1s --start-period=30s --retries=1 \
CMD ["/healthcheck.sh"]

RUN sed -i "/# <additional-user-commands>/r /run_healthcheck_node.sh" /*_entrypoint.sh && \
Expand Down
Loading

0 comments on commit 04e5869

Please sign in to comment.