Skip to content

Update Windows action for rolling #1101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions .github/workflows/windows-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

build:
needs: identify-ros-distro
runs-on: windows-2019
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -30,34 +30,44 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Setup ROS2
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: ${{ needs.identify-ros-distro.outputs.distro }}
- name: Install 7-Zip
shell: powershell
run: |
choco install 7zip wget -y

- 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
wget --quiet https://github.com/ros2/ros2/releases/download/release-kilted-beta-20250430/ros2-kilted-beta-20250430-windows-release-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: prefix-dev/setup-pixi@v0.8.8
with:
run-install: false
- run: |
cd C:\dev
irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/rolling/pixi.toml -OutFile pixi.toml
pixi install


- name: Source the pixi environment
shell: cmd
run: |
cd C:\dev
pixi shell
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\local_setup.bat"

- uses: actions/checkout@v4

- name: Build rclnodejs
shell: cmd
run: |
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\setup.bat"
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\local_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 if NOT ${{ needs.identify-ros-distro.outputs.distro }}==rolling (npm test)"
call "c:\dev\${{ needs.identify-ros-distro.outputs.distro }}\ros2-windows\local_setup.bat"
npm test
Loading