1# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
2# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
3
4name: CI
5
6# This determines when this workflow is run
7on: [push, pull_request] # on all pushes and PRs
8
9jobs:
10  CI:
11    strategy:
12      matrix:
13        env:
14          - {ROS_DISTRO: melodic}
15          - {ROS_DISTRO: noetic}
16          - {ROS_DISTRO: foxy, PRERELEASE: true}
17          - {ROS_DISTRO: rolling, PRERELEASE: true}
18    env:
19      CCACHE_DIR: /github/home/.ccache # Enable ccache
20      BUILDER: colcon
21    runs-on: ubuntu-latest
22    steps:
23      - uses: actions/checkout@v2
24      # This step will fetch/store the directory used by ccache before/after the ci run
25      - uses: actions/cache@v2
26        with:
27          path: ${{ env.CCACHE_DIR }}
28          key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
29      # Run industrial_ci
30      - uses: 'ros-industrial/industrial_ci@master'
31        env: ${{ matrix.env }}
32