-
Notifications
You must be signed in to change notification settings - Fork 71
70 lines (60 loc) · 2.14 KB
/
windows-build-and-test.yml
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
name: rclnodejs - Windows Build & Test
on:
push:
branches:
- develop
- iron-irwini
- humble-hawksbill
- galactic-geochelone
- foxy-fitzroy
pull_request:
branches:
- develop
- iron-irwini
- humble-hawksbill
- galactic-geochelone
- foxy-fitzroy
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:
# Explicit node versions are used to workaround an error
# where node-gyp fails due to some silly cacheing
node-version: [18.16.0, 20.X]
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
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/checkout@v3
- 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)"