-
Notifications
You must be signed in to change notification settings - Fork 84
89 lines (80 loc) · 2.59 KB
/
linux-x64-build-and-test.yml
File metadata and controls
89 lines (80 loc) · 2.59 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build and Test (Reusable)
on:
workflow_call:
inputs:
trigger_type:
description: 'Type of trigger (pr or push)'
required: true
type: string
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
node-version: [24.X, 25.X]
architecture: [x64]
ros_distribution:
- humble
- jazzy
- kilted
- rolling
include:
# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
# Jazzy Jalisco (May 2024 - May 2029)
- docker_image: ubuntu:noble
ros_distribution: jazzy
# Kilted Kaiju (May 2025 - Dec 2026)
- docker_image: ubuntu:noble
ros_distribution: kilted
# Rolling Ridley (No End-Of-Life)
- docker_image: ubuntu:noble
ros_distribution: rolling
steps:
- name: Setup Node.js ${{ matrix.node-version }} on ${{ matrix.architecture }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
architecture: ${{ matrix.architecture }}
- name: Setup ROS2
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
use-ros2-testing: ${{ matrix.ros_distribution == 'rolling' }}
- name: Install test-msgs and mrpt_msgs on Linux
run: |
sudo apt install ros-${{ matrix.ros_distribution }}-test-msgs ros-${{ matrix.ros_distribution }}-mrpt-msgs
# Adjust dependencies based on Ubuntu version
LIBASOUND_PKG="libasound2"
if grep -q "24.04" /etc/os-release; then
LIBASOUND_PKG="libasound2t64"
fi
sudo apt install -y xvfb libgtk-3-0 libnss3 $LIBASOUND_PKG libgbm-dev
- uses: actions/checkout@v6
- name: Build and test rclnodejs
run: |
uname -a
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
npm i
npm run lint
npm test
npm run clean
- name: Test with IDL ROS messages against rolling
if: ${{ matrix.ros_distribution == 'rolling' }}
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
npm i
npm run test-idl
npm run clean
- name: Coveralls
if: ${{ matrix.ros_distribution == 'rolling' && matrix['node-version'] == '24.X' }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}