From 0c7d713c521441197ca1a5fe0704c56019a19bfa Mon Sep 17 00:00:00 2001 From: Martin Pecka Date: Thu, 12 Dec 2024 13:49:15 +0100 Subject: [PATCH] Added CI. --- .github/ci.rosinstall | 7 +++++++ .github/workflows/ci.yaml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/ci.rosinstall create mode 100644 .github/workflows/ci.yaml diff --git a/.github/ci.rosinstall b/.github/ci.rosinstall new file mode 100644 index 0000000..10371ca --- /dev/null +++ b/.github/ci.rosinstall @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-FileCopyrightText: Czech Technical University in Prague + +- git: + local-name: ros-utils + uri: https://github.com/ctu-vras/ros-utils.git + version: master \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..19e6e17 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-FileCopyrightText: Czech Technical University in Prague + +# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). +# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) + +name: CI + +# This determines when this workflow is run +on: [push, pull_request] # on all pushes and PRs + +jobs: + industrial_ci: + strategy: + matrix: + env: + - {ROS_DISTRO: noetic, ROS_REPO: testing} + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache # Directory for ccache (and how we enable ccache in industrial_ci) + UPSTREAM_WORKSPACE: .github/ci.rosinstall + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # This step will fetch/store the directory used by ccache before/after the ci run + - name: Cache ccache + uses: rhaschke/cache@main + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}-${{ github.sha }} + ccache-${{ matrix.env.ROS_DISTRO }} + env: + GHA_CACHE_SAVE: always + # Run industrial_ci + - uses: 'ros-industrial/industrial_ci@master' + env: ${{ matrix.env }}