-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 2 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
cache: "pip
- name: Set up ROS 2 Humble
run: |
sudo apt update
sudo apt install -y curl gnupg2 lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install ros-humble-desktop -y
sudo apt install python3-colcon-common-extensions -y
sudo apt install python3-rosdep -y
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source /opt/ros/humble/setup.bash
sudo rosdep init
rosdep update
- name: Install ROS 2 dependencies
run: |
source /opt/ros/humble/setup.bash
sudo apt install -y ros-humble-executive-smach ros-humble-rclpy ros-humble-geometry-msgs ros-humble-std-msgs ros-humble-sensor-msgs
- name: Install Python dependencies
run: |
source /opt/ros/humble/setup.bash
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install pyyaml # Install pyyaml to handle YAML files
pip install lark-parser # Install lark module for parsing
pip install numpy # Install numpy for scientific computing
pip install -r requirements.txt # Install other dependencies
sudo apt install rclpy
sudo apt install ros-humble-executive-smach
pip install git+https://github.com/splintered-reality/py_trees.git
pip install git+https://github.com/splintered-reality/py_trees_ros.git
- name: Run tests
run: |
source /opt/ros/humble/setup.bash
source venv/bin/activate
pytest tests/