Skip to content

Add nodejs 22.x as latest LTS #205

Add nodejs 22.x as latest LTS

Add nodejs 22.x as latest LTS #205

name: rclnodejs - Windows Build & Test
on:
push:
branches:
- develop
- jazzy
- iron-irwini
- humble-hawksbill
pull_request:
branches:
- develop
- jazzy
- iron-irwini
- humble-hawksbill
workflow_dispatch:
jobs:
identify-ros-distro:
uses: ./.github/workflows/identify-ros-distro.yml
build:
needs: identify-ros-distro
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
node-version: [22.X]
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Setup ROS2
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ needs.identify-ros-distro.outputs.distro }}
- name: Install ROS2 Rolling (Conditional)
if: ${{ needs.identify-ros-distro.outputs.distro == 'rolling' }}
shell: bash
run: |
wget --quiet https://ci.ros2.org/view/packaging/job/packaging_windows/lastSuccessfulBuild/artifact/ws/ros2-package-windows-AMD64.zip -O rolling.zip
7z x rolling.zip -y -o/c/dev/rolling
- name: Prebuild - Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- uses: actions/[email protected]
- name: Build rclnodejs
shell: cmd
run: |
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\setup.bat"
npm i
# On the windows/foxy combination the Eclipse CycloneDDS RMW implementation is used to workaround
# an error when loading the default fastrtps ddl
- name: Test rclnodejs
shell: cmd
run: |
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\setup.bat"
cmd /c "if ${{ needs.identify-ros-distro.outputs.distro }}==foxy (set RMW_IMPLEMENTATION=rmw_cyclonedds_cpp&&npm test)"
cmd /c "if NOT ${{ needs.identify-ros-distro.outputs.distro }}==foxy (npm test)"