Skip to content

Commit 09f8a7a

Browse files
hippo5329PaulBouchier
authored andcommitted
ci: expand matrix build targets to cover serial, WiFi micro-ROS, and standalone diagnostics tools
1 parent 08137c7 commit 09f8a7a

1 file changed

Lines changed: 61 additions & 6 deletions

File tree

.github/workflows/reusable-platformio-ci.yml

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ on:
2222
type: string
2323

2424
jobs:
25-
# This job is used to build the calibration firmware
26-
build-calibration:
27-
name: Build Calibration
25+
# This job builds the diagnostics utilities and toolchains
26+
build-tools:
27+
name: Build Diagnostics & Tools on ROS ${{ inputs.ros_distro }}
2828
runs-on: ${{ inputs.os }}
2929

3030
steps:
@@ -42,14 +42,69 @@ jobs:
4242
~/.platformio/.cache
4343
key: ${{ runner.os }}-pio
4444

45+
- name: Install Python dependencies
46+
run: |
47+
pip install osrf_pycommon pyyaml
48+
49+
- name: Setup ROS
50+
uses: ros-tooling/setup-ros@v0.7
51+
with:
52+
required-ros-distributions: ${{ inputs.ros_distro }}
53+
54+
- name: Install ROS 2 rmw
55+
shell: bash
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y ros-${{ inputs.ros_distro }}-rmw-cyclonedds-cpp ros-${{ inputs.ros_distro }}-rmw-fastrtps-cpp || true
59+
4560
- name: Install environment
4661
uses: ./repo/.github/actions/platformio-env
4762

48-
- name: Build Calibration
63+
- name: Run Configuration Engine Tests
64+
run: |
65+
if [ -d "repo/tools/robot_config_engine" ]; then
66+
python3 -m unittest discover repo/tools/robot_config_engine
67+
fi
68+
69+
- name: Build Calibration (test_acc)
70+
shell: bash
4971
run: |
72+
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
5073
export PATH=$PATH:~/.platformio/penv/bin
51-
cd repo/calibration
52-
pio run
74+
if [ -d "repo/calibration" ]; then
75+
cd repo/calibration
76+
pio run
77+
fi
78+
79+
- name: Build Sensor Diagnostics (test_sensors)
80+
shell: bash
81+
run: |
82+
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
83+
export PATH=$PATH:~/.platformio/penv/bin
84+
if [ -d "repo/test_sensors" ]; then
85+
cd repo/test_sensors
86+
pio run -e pico2 -e esp32 -e gendrv
87+
fi
88+
89+
- name: Build Motor Diagnostics (test_motors)
90+
shell: bash
91+
run: |
92+
source /opt/ros/${{ inputs.ros_distro }}/setup.bash
93+
export PATH=$PATH:~/.platformio/penv/bin
94+
if [ -d "repo/test_motors" ]; then
95+
cd repo/test_motors
96+
pio run -e pico2 -e esp32 -e gendrv
97+
fi
98+
99+
- name: Build ADC Calibration (adc_calibrate)
100+
shell: bash
101+
run: |
102+
export PATH=$PATH:~/.platformio/penv/bin
103+
if [ -d "repo/adc_calibrate" ]; then
104+
cd repo/adc_calibrate
105+
pio run -e esp32 -e gendrv
106+
fi
107+
53108
54109
55110
# This job parses the firmware/platformio.ini file

0 commit comments

Comments
 (0)