-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (53 loc) · 1.58 KB
/
_ros.yaml
File metadata and controls
61 lines (53 loc) · 1.58 KB
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
58
59
60
61
name: ROS Build & Test
on:
workflow_call:
inputs:
ros_distro:
required: true
type: string
container:
required: true
type: string
runner:
required: true
type: string
jobs:
build-and-test:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.container }}
env:
HOME: /root
ROS_HOME: /root/.ros
name: ${{ inputs.ros_distro }}
steps:
- uses: actions/checkout@v4
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ inputs.ros_distro }}
max-size: 500M
- name: Configure ccache
run: echo "/usr/lib/ccache" >> $GITHUB_PATH
- name: Install dependencies
shell: bash
run: |
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
apt-get update
rosdep update --rosdistro ${{ inputs.ros_distro }}
rosdep install --from-paths . --ignore-src -y --rosdistro ${{ inputs.ros_distro }}
- name: Build
shell: bash
run: |
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
colcon build --packages-select pj_bridge \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Test
shell: bash
run: |
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
source install/setup.bash
colcon test --packages-select pj_bridge
colcon test-result --verbose