name: ROS2 Build & Test

on:
  push:
    branches: [ main, develop ]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macOS-latest, windows-latest]
    steps:
      - uses: ros-tooling/setup-ros@v0.7
        with:
          required-ros-distributions: jazzy
      - uses: ros-tooling/action-ros-ci@v0.4
        with:
          package-name: modelec_utils
          target-ros2-distro: jazzy

  build_docker:
    runs-on: ubuntu-latest
    container:
      image: ubuntu:noble
    steps:
      - name: Setup ROS
        uses: ros-tooling/setup-ros@v0.7
        with:
          required-ros-distributions: jazzy

      - uses: ros-tooling/action-ros-ci@v0.4
        with:
          package-name: modelec_utils
          target-ros2-distro: jazzy
