From 1078f8ae2d7aa6d561b88a63bebab2edb7cce673 Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Fri, 6 Jun 2025 13:44:32 +0800 Subject: [PATCH 1/4] [NOT MERGE] Test on Windows --- .github/workflows/windows-build-and-test.yml | 46 ++++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/windows-build-and-test.yml b/.github/workflows/windows-build-and-test.yml index f4cba976..d04ef2e3 100644 --- a/.github/workflows/windows-build-and-test.yml +++ b/.github/workflows/windows-build-and-test.yml @@ -23,44 +23,52 @@ jobs: matrix: node-version: [22.X] ros_distribution: - - humble - - jazzy - kilted - - rolling steps: - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - name: Setup ROS2 - uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: ${{ matrix.ros_distribution }} + - name: Install pixi + shell: powershell + run: | + irm -useb https://pixi.sh/install.ps1 | iex + + - name: Install dependencies + shell: powershell + run: | + irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/kilted/pixi.toml -OutFile pixi.toml + pixi install + + - name: Install 7-Zip + shell: powershell + run: | + choco install 7zip wget -y - name: Install ROS2 Rolling (Conditional) - if: ${{ matrix.ros_distribution == '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 + wget --quiet https://github.com/ros2/ros2/releases/download/release-kilted-20250523/ros2-kilted-20250523-windows-release-amd64.zip -O rolling.zip + 7z x rolling.zip -y -o/c/dev/kilted - uses: actions/checkout@v4 - name: Build rclnodejs shell: cmd run: | - set RMW_IMPLEMENTATION=rmw_fastrtps_cpp - call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat" + call "c:\dev\kilted\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: powershell + run: | + pixi shell + call "c:\dev\kilted\ros2-windows\setup.bat" + npm test + - name: Test rclnodejs shell: cmd run: | - set RMW_IMPLEMENTATION=rmw_fastrtps_cpp - call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat" + call "c:\dev\kilted\ros2-windows\local_setup.bat" + npm test From 0956217b925883ec8d0a21e1cfd8ab57f1644902 Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Fri, 6 Jun 2025 14:00:41 +0800 Subject: [PATCH 2/4] Address comments --- .github/workflows/windows-build-and-test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-build-and-test.yml b/.github/workflows/windows-build-and-test.yml index d04ef2e3..4c672c26 100644 --- a/.github/workflows/windows-build-and-test.yml +++ b/.github/workflows/windows-build-and-test.yml @@ -34,12 +34,18 @@ jobs: shell: powershell run: | irm -useb https://pixi.sh/install.ps1 | iex + # Refresh PATH environment + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","User") + ";" + [System.Environment]::GetEnvironmentVariable("Path","Machine") + # Show installation location + Write-Host "Pixi installed at: $(where.exe pixi)" - name: Install dependencies shell: powershell run: | + # Ensure pixi is accessible by using the full path + $pixiPath = "$env:USERPROFILE\.pixi\bin\pixi.exe" irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/kilted/pixi.toml -OutFile pixi.toml - pixi install + & $pixiPath install - name: Install 7-Zip shell: powershell @@ -63,7 +69,8 @@ jobs: - name: Test rclnodejs shell: powershell run: | - pixi shell + $pixiPath = "$env:USERPROFILE\.pixi\bin\pixi.exe" + & $pixiPath shell call "c:\dev\kilted\ros2-windows\setup.bat" npm test From 3dba07580dd95c97c97231b096381eda5343c21e Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Fri, 6 Jun 2025 14:10:32 +0800 Subject: [PATCH 3/4] Address comments --- .github/workflows/windows-build-and-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/windows-build-and-test.yml b/.github/workflows/windows-build-and-test.yml index 4c672c26..ee522569 100644 --- a/.github/workflows/windows-build-and-test.yml +++ b/.github/workflows/windows-build-and-test.yml @@ -46,6 +46,7 @@ jobs: $pixiPath = "$env:USERPROFILE\.pixi\bin\pixi.exe" irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/kilted/pixi.toml -OutFile pixi.toml & $pixiPath install + & $pixiPath shell - name: Install 7-Zip shell: powershell @@ -69,8 +70,6 @@ jobs: - name: Test rclnodejs shell: powershell run: | - $pixiPath = "$env:USERPROFILE\.pixi\bin\pixi.exe" - & $pixiPath shell call "c:\dev\kilted\ros2-windows\setup.bat" npm test From 63c468a7ca544ea07935b3cb4d5c780a8fe49077 Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Fri, 6 Jun 2025 14:32:37 +0800 Subject: [PATCH 4/4] Address comments --- .github/workflows/windows-build-and-test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/windows-build-and-test.yml b/.github/workflows/windows-build-and-test.yml index ee522569..7a94418c 100644 --- a/.github/workflows/windows-build-and-test.yml +++ b/.github/workflows/windows-build-and-test.yml @@ -67,12 +67,6 @@ jobs: call "c:\dev\kilted\ros2-windows\setup.bat" npm i - - name: Test rclnodejs - shell: powershell - run: | - call "c:\dev\kilted\ros2-windows\setup.bat" - npm test - - name: Test rclnodejs shell: cmd run: |