---

name: CI

on: [push, pull_request]

jobs:
  industrial_ci:
    strategy:
      matrix:
        env:
          # - {ROS_DISTRO: melodic, ROS_REPO: testing}
          - {ROS_DISTRO: melodic, ROS_REPO: main}
          - {ROS_DISTRO: noetic, ROS_REPO: main}
    env:
      CCACHE_DIR: /github/home/.ccache
      AFTER_INSTALL_TARGET_DEPENDENCIES: ./mavros/scripts/install_geographiclib_datasets.sh
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: "${{ env.CCACHE_DIR }}"
          key: "ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}"
      - uses: 'ros-industrial/industrial_ci@master'
        env: ${{matrix.env}}
