-
Notifications
You must be signed in to change notification settings - Fork 85
101 lines (90 loc) · 3.47 KB
/
Copy pathprebuild-linux-x64.yml
File metadata and controls
101 lines (90 loc) · 3.47 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
90
91
92
93
94
95
96
97
98
99
100
101
name: Prebuild Linux x64
on:
workflow_dispatch:
workflow_call:
jobs:
prebuild:
runs-on: ubuntu-latest
container:
image: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
node-version: [24.X]
architecture: [x64]
ros_distribution:
- humble
- jazzy
- kilted
- lyrical
include:
# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
ubuntu_codename: jammy
# Jazzy Jalisco (May 2024 - May 2029)
- docker_image: ubuntu:noble
ros_distribution: jazzy
ubuntu_codename: noble
# Kilted Kaiju (May 2025 - Dec 2026)
- docker_image: ubuntu:noble
ros_distribution: kilted
ubuntu_codename: noble
# Lyrical Luth (May 2026 - May 2031)
- docker_image: ubuntu:26.04
ros_distribution: lyrical
ubuntu_codename: resolute
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
if: ${{ matrix.ros_distribution != 'lyrical' }}
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Enable ROS2 apt repository (lyrical)
if: ${{ matrix.ros_distribution == 'lyrical' }}
run: |
apt-get update
apt-get install -y software-properties-common curl
# Per https://docs.ros.org/en/lyrical/Installation/Ubuntu-Install-Debs.html
add-apt-repository universe
ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F'"' '{print $4}')
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
dpkg -i /tmp/ros2-apt-source.deb
apt-get update
apt-get install -y build-essential cmake python3
- name: Install ROS2 from apt (lyrical)
if: ${{ matrix.ros_distribution == 'lyrical' }}
run: |
apt-get install -y ros-lyrical-desktop
- uses: actions/checkout@v6
- name: Install dependencies
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
npm i
- name: Generate prebuilt binary
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
npm run prebuild
- name: Upload prebuilt binary
uses: actions/upload-artifact@v7
with:
name: prebuilt-linux-x64-node${{ matrix.node-version }}-${{ matrix.ubuntu_codename }}-${{ matrix.ros_distribution }}
path: prebuilds/linux-x64/*.node
if-no-files-found: error
- name: Test loading prebuilt
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
node -e "
const rclnodejs = require('./index.js');
console.log('Successfully loaded rclnodejs with prebuilt binary');
console.log('Platform:', process.platform, 'Arch:', process.arch);
console.log('ROS_DISTRO:', process.env.ROS_DISTRO);
"