-
Notifications
You must be signed in to change notification settings - Fork 158
57 lines (57 loc) · 1.79 KB
/
github-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build and run ROS tests
on:
push:
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
build:
strategy:
matrix:
rosdistro: [noetic]
runs-on: ubuntu-latest
container:
image: ros:${{ matrix.rosdistro }}-ros-core
steps:
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
detached: true
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential clang-format-10 file git python3-catkin-lint python3-catkin-tools python3-pip python3-rosdep
- name: Install pip dependencies
run: pip install pre-commit
- name: Checkout repository
uses: actions/checkout@v4
with:
path: src/mir_robot
- name: Use rosdep to install remaining dependencies
run: |
sudo rosdep init
rosdep update
rosdep install --from-paths src -i -y --rosdistro ${{ matrix.rosdistro }}
- name: Build
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh
catkin init
catkin config -j 1 -p 1
catkin build --limit-status-rate 0.1 --no-notify
catkin build --limit-status-rate 0.1 --no-notify --make-args tests
- name: Run tests
run: |
. devel/setup.sh
catkin run_tests
catkin_test_results
- name: Run pre-commit hooks
run: |
cd src/mir_robot
pre-commit run -a