-
Notifications
You must be signed in to change notification settings - Fork 57
84 lines (76 loc) · 2.74 KB
/
build_linux.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build (Linux)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-linux:
strategy:
matrix:
ros_distribution:
- foxy
- humble
- iron
- rolling
include:
# Foxy Fitzroy (June 2020 - May 2023)
- os: ubuntu-20.04
test_target_framework: net6.0
ros_distribution: foxy
ros_version: 2
# Humble Hawksbill (May 2022 - May 2027)
- os: ubuntu-22.04
test_target_framework: net6.0
ros_distribution: humble
ros_version: 2
# Iron Irwini (May 2023 - November 2024)
- os: ubuntu-22.04
test_target_framework: net6.0
ros_distribution: iron
ros_version: 2
# Rolling Ridley (June 2020 - Present)
- os: ubuntu-22.04
test_target_framework: net6.0
ros_distribution: rolling
ros_version: 2
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.ros_distribution == 'rolling' }}
env:
RCLDOTNET_TEST_TARGET_FRAMEWORK: ${{ matrix.test_target_framework }}
steps:
- name: Checkout source
uses: actions/checkout@v3
# https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#supported-distributions
- name: Install .NET SDK v6.0
if: matrix.os == 'ubuntu-20.04'
run: |
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-sdk-6.0
- name: Setup ROS2
uses: ros-tooling/setup-ros@v0.6
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
use-ros2-testing: ${{ matrix.ros_distribution == 'rolling' }}
- name: Configure ros2_dotnet workspace
run: |
mkdir -p ~/ros2_dotnet_ws/src
cd ~/ros2_dotnet_ws
cp ${{github.workspace}}/ros2_dotnet_${{ matrix.ros_distribution }}.repos .
vcs import src < ros2_dotnet_${{ matrix.ros_distribution }}.repos
rm -rf src/ros2_dotnet/ros2_dotnet
cp -r ${{github.workspace}} src/ros2_dotnet/ros2_dotnet
vcs branch
- name: Build ros2_dotnet source
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
cd ~/ros2_dotnet_ws
colcon build --event-handlers console_cohesion+ console_package_list+
- name: Run tests
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
cd ~/ros2_dotnet_ws
colcon test --event-handlers console_cohesion+ --return-code-on-test-failure --packages-select rcldotnet