Repository navigation
95 lines (89 loc) · 2.88 KB
/
Copy pathci.yml
File metadata and controls
95 lines (89 loc) · 2.88 KB
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
85
86
87
88
89
90
91
92
93
94
95
# Copyright 2026 VirtusCo
name: Porter ROS CI
on:
push:
branches: [main, prototype, 'feat/**']
pull_request:
branches: [main, prototype]
defaults:
run:
shell: bash
jobs:
unit-tests:
name: Unit Tests (Python)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install pytest
- run: pytest tests/unit/ -v --tb=short
ros2-build-test:
name: ROS 2 Build & Test
runs-on: ubuntu-latest
container:
image: ros:jazzy
options: --user root
steps:
- name: Install git + git-lfs
run: |
apt-get update
apt-get install -y git git-lfs
git lfs install
- uses: actions/checkout@v4
with:
lfs: true
- name: Install system deps + YDLidar SDK
run: |
apt-get install -y python3-pip python3-colcon-common-extensions python3-rosdep build-essential cmake
git clone --depth 1 https://github.com/YDLIDAR/YDLidar-SDK.git /tmp/sdk
mkdir -p /tmp/sdk/build && cd /tmp/sdk/build
cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc) && make install && ldconfig
- name: Install ROS deps
run: |
source /opt/ros/jazzy/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -r -y --skip-keys="ament_python" || true
- name: Build
run: |
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install --cmake-args -Wno-dev
- name: Test
run: |
source /opt/ros/jazzy/setup.bash
source install/setup.bash
colcon test --event-handlers console_direct+
colcon test-result --verbose || true
firmware-ztest:
name: ESP32 Firmware Ztest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Zephyr toolchain
run: |
pip install west pyelftools intelhex esptool
sudo apt-get update && sudo apt-get install -y cmake ninja-build gperf ccache dfu-util \
device-tree-compiler wget xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev
- name: Init west workspace
run: |
cd esp32_firmware
west init -l .
west update --narrow --fetch-opt=--depth=1
- name: Run Ztest on native_sim
run: |
cd esp32_firmware
west twister -T tests/ -p native_sim --no-color || true
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install flake8
- run: flake8 src/ tests/ --max-line-length=99 --exclude=build,install,log,__pycache__,models --count || true