-
Notifications
You must be signed in to change notification settings - Fork 61
40 lines (40 loc) · 1.17 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
name: Build and run ROS tests
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
rosdistro: [rolling, humble, iron]
fail-fast: false
runs-on: ubuntu-latest
container:
image: ros:${{ matrix.rosdistro }}-ros-core
steps:
- name: Install apt dependencies
run: |
apt-get update
apt-get install -y build-essential clang-format file git python3-pip python3-colcon-common-extensions python3-rosdep
- name: Install pip dependencies
run: pip install pre-commit
- name: Checkout repository
uses: actions/checkout@v4
with:
path: src/phidgets_drivers
- name: Use rosdep to install remaining dependencies
run: |
rosdep init
rosdep update
rosdep install --from-paths src -i -y --rosdistro ${{ matrix.rosdistro }}
- name: Build
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh
colcon build --parallel-workers 1
- name: Run tests
run: |
. install/setup.sh
colcon test --parallel-workers 1
colcon test-result
- name: Run pre-commit hooks
run: |
cd src/phidgets_drivers
pre-commit run -a