Skip to content

Merge pull request #7 from ika-rwth-aachen/launch-file-improvements #74

Merge pull request #7 from ika-rwth-aachen/launch-file-improvements

Merge pull request #7 from ika-rwth-aachen/launch-file-improvements #74

Workflow file for this run

name: Check samples
# avoiding duplicate jobs on push with open pull_request: https://github.com/orgs/community/discussions/26940#discussioncomment-6656489
on: [push, pull_request]
jobs:
check:
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
runs-on: ubuntu-latest
strategy:
matrix:
include:
- package_name: ros2_cpp_pkg
template: ros2_cpp_pkg
node_name: ros2_cpp_node
is_component: false
is_lifecycle: false
has_launch_file: true
has_params: true
has_subscriber: true
has_publisher: true
has_service_server: false
has_action_server: false
has_timer: false
has_docker_ros: true
- package_name: ros2_cpp_component_pkg
template: ros2_cpp_pkg
node_name: ros2_cpp_node
is_component: true
is_lifecycle: false
has_launch_file: true
has_params: true
has_subscriber: true
has_publisher: true
has_service_server: false
has_action_server: false
has_timer: false
has_docker_ros: true
- package_name: ros2_cpp_lifecycle_pkg
template: ros2_cpp_pkg
node_name: ros2_cpp_node
is_component: false
is_lifecycle: true
has_launch_file: true
has_params: true
has_subscriber: true
has_publisher: true
has_service_server: false
has_action_server: false
has_timer: false
has_docker_ros: true
- package_name: ros2_cpp_all_pkg
template: ros2_cpp_pkg
node_name: ros2_cpp_node
is_component: true
is_lifecycle: true
has_launch_file: true
has_params: true
has_subscriber: true
has_publisher: true
has_service_server: true
has_action_server: true
has_timer: true
has_docker_ros: true
- package_name: ros2_python_pkg
template: ros2_python_pkg
node_name: ros2_python_node
is_lifecycle: false
has_launch_file: true
has_params: true
has_subscriber: true
has_publisher: true
has_service_server: false
has_action_server: false
has_timer: false
has_docker_ros: true
- package_name: ros2_python_all_pkg
template: ros2_python_pkg
node_name: ros2_python_node
is_lifecycle: false
has_launch_file: true
has_params: true
has_subscriber: true
has_publisher: true
has_service_server: true
has_action_server: true
has_timer: true
has_docker_ros: true
- package_name: ros2_interfaces_pkg
template: ros2_interfaces_pkg
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install "copier~=9.2.0" "jinja2-strcase~=0.0.2"
- name: Configure git to run copier
run: |
git config --global user.name "dummy"
git config --global user.email "dummy@dummy.com"
- name: Generate packages
run: |
copier copy --trust --defaults --overwrite --vcs-ref=HEAD \
-d template=${{ matrix.template }} \
-d package_name=${{ matrix.package_name }} \
-d node_name=${{ matrix.node_name }} \
-d is_component=${{ matrix.is_component }} \
-d is_lifecycle=${{ matrix.is_lifecycle }} \
-d has_launch_file=${{ matrix.has_launch_file }} \
-d has_params=${{ matrix.has_params }} \
-d has_subscriber=${{ matrix.has_subscriber }} \
-d has_publisher=${{ matrix.has_publisher }} \
-d has_service_server=${{ matrix.has_service_server }} \
-d has_action_server=${{ matrix.has_action_server }} \
-d has_timer=${{ matrix.has_timer }} \
-d has_docker_ros=${{ matrix.has_docker_ros }} \
. packages
- name: Check for repository changes
run: |
rm -rf samples/${{ matrix.package_name }}*
mv packages/${{ matrix.package_name }}* samples/
if [[ ! -z "$(git status --porcelain)" ]]; then
echo "Sample generation resulted in changes to the repository"
git status
git diff
exit 1
fi