Skip to content

Sitl shared memory - eg swarms, following, master-slave, virtual peripheral/s, etc #22665

Sitl shared memory - eg swarms, following, master-slave, virtual peripheral/s, etc

Sitl shared memory - eg swarms, following, master-slave, virtual peripheral/s, etc #22665

Workflow file for this run

name: colcon build/test
on:
push:
paths-ignore:
# remove not tests vehicles
- 'AntennaTracker/**'
- 'ArduSub/**'
- 'Blimp/**'
- 'Rover/**'
# remove esp32 HAL
- 'libraries/AP_HAL_ESP32/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/bootloaders/**'
- 'Tools/CHDK-Scripts/**'
- 'Tools/CodeStyle/**'
- 'Tools/completion/**'
- 'Tools/CPUInfo/**'
- 'Tools/debug/**'
- 'Tools/environment_install/**'
- 'Tools/FilterTestTool/**'
- 'Tools/Frame_params/**'
- 'Tools/geotag/**'
- 'Tools/GIT_Test/**'
- 'Tools/gittools/**'
- 'Tools/Hello/**'
- 'Tools/IO_Firmware/**'
- 'Tools/mavproxy_modules/**'
- 'Tools/Pozyx/**'
- 'Tools/PrintVersion.py'
- 'Tools/Replay/**'
- 'Tools/simulink/**'
- 'Tools/UDP_Proxy/**'
- 'Tools/vagrant/**'
- 'Tools/Vicon/**'
# Discard python file from Tools/scripts as not used
- 'Tools/scripts/**.py'
- 'Tools/scripts/build_sizes/**'
- 'Tools/scripts/build_tests/**'
- 'Tools/scripts/CAN/**'
- 'Tools/scripts/signing/**'
# Remove autotests stuff
- 'Tools/autotest/**'
# Remove markdown files as irrelevant
- '**.md'
# Remove dotfile at root directory
- '.dir-locals.el'
- '.dockerignore'
- '.editorconfig'
- '.flake8'
- '.gitattributes'
- '.github'
- '.gitignore'
- '.pre-commit-config.yaml'
- '.pydevproject'
- '.valgrind-suppressions'
- '.valgrindrc'
- 'Dockerfile'
- 'Vagrantfile'
- 'Makefile'
# Remove some directories check
- '.vscode/**'
- '.github/ISSUE_TEMPLATE/**'
# Remove change on other workflows
- '.github/**'
- '!.github/workflows/colcon.yml' # except this one
pull_request:
paths-ignore:
# remove not tests vehicles
- 'AntennaTracker/**'
- 'ArduSub/**'
- 'Rover/**'
- 'Blimp/**'
# remove esp32 HAL
- 'libraries/AP_HAL_ESP32/**'
# remove non SITL directories
- 'Tools/AP_Bootloader/**'
- 'Tools/bootloaders/**'
- 'Tools/CHDK-Scripts/**'
- 'Tools/CodeStyle/**'
- 'Tools/completion/**'
- 'Tools/CPUInfo/**'
- 'Tools/debug/**'
- 'Tools/environment_install/**'
- 'Tools/FilterTestTool/**'
- 'Tools/Frame_params/**'
- 'Tools/geotag/**'
- 'Tools/GIT_Test/**'
- 'Tools/gittools/**'
- 'Tools/Hello/**'
- 'Tools/IO_Firmware/**'
- 'Tools/mavproxy_modules/**'
- 'Tools/Pozyx/**'
- 'Tools/PrintVersion.py'
- 'Tools/Replay/**'
- 'Tools/simulink/**'
- 'Tools/UDP_Proxy/**'
- 'Tools/vagrant/**'
- 'Tools/Vicon/**'
# Discard python file from Tools/scripts as not used
- 'Tools/scripts/**.py'
- 'Tools/scripts/build_sizes/**'
- 'Tools/scripts/build_tests/**'
- 'Tools/scripts/CAN/**'
- 'Tools/scripts/signing/**'
# Remove autotests stuff
- 'Tools/autotest/**'
# Remove markdown files as irrelevant
- '**.md'
# Remove dotfile at root directory
- '.dir-locals.el'
- '.dockerignore'
- '.editorconfig'
- '.flake8'
- '.gitattributes'
- '.github'
- '.gitignore'
- '.pre-commit-config.yaml'
- '.pydevproject'
- '.valgrind-suppressions'
- '.valgrindrc'
- 'Dockerfile'
- 'Vagrantfile'
- 'Makefile'
# Remove some directories check
- '.vscode/**'
- '.github/ISSUE_TEMPLATE/**'
# Remove change on other workflows
- '.github/**'
- '!.github/workflows/colcon.yml' # except this one
workflow_dispatch:
concurrency:
group: ci-${{github.workflow}}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # checkout; build-test adds actions:write per-job
jobs:
build-test:
permissions:
contents: read
actions: write # save/prune ccache on master
runs-on: ubuntu-22.04
timeout-minutes: 60
container:
image: ardupilot/ardupilot-dev-ros:latest
steps:
# Sparse checkout to make .github/actions/* available without polluting the colcon workspace
- uses: actions/checkout@v7
with:
fetch-depth: 1
persist-credentials: false
sparse-checkout: .github
sparse-checkout-cone-mode: false
# git checkout the PR
- uses: actions/checkout@v7
with:
submodules: 'recursive'
path: src/ardupilot
- uses: ./.github/actions/setup-ccache
with:
key-suffix: ros
# https://ardupilot.org/dev/docs/ros2.html#installation-ubuntu
- name: Pull in repos with vcs
run: |
cd src
vcs import --recursive --debug --shallow --skip-existing < ./ardupilot/Tools/ros2/ros2.humble.repos
- name: Install rosdep dependencies
shell: 'bash'
run: |
apt update
rosdep update
source /opt/ros/humble/setup.bash
rosdep install --from-paths src --ignore-src --default-yes
- name: Install MAVProxy
run: |
# Install this specific version just to prevent rolling updates.
# See the latest available at https://pypi.org/project/MAVProxy
python3 -m pip install MAVProxy==1.8.71
- name: Install local pymavlink
working-directory: ./src/ardupilot/modules/mavlink/pymavlink
run: |
python3 -m pip install . --upgrade --user
- name: Build with colcon
shell: 'bash'
run: |
source /opt/ros/humble/setup.bash
PATH="/tmp/Micro-XRCE-DDS-Gen/scripts:$PATH"
colcon build --packages-up-to ardupilot_dds_tests --cmake-args -DBUILD_TESTING=ON
- uses: ./.github/actions/save-ccache
with:
key-suffix: ros
- name: Test with colcon
shell: 'bash'
run: |
# force on debugging so we can see ros2 launch internal errors
sed -i'' "s|debug: bool = False|debug: bool = True|g" /opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py
source install/setup.bash
colcon test --python-testing "pytest" --pytest-args " --verbose" " --stepwise" --executor sequential --parallel-workers 0 --base-paths src/ardupilot --event-handlers=console_cohesion+
- name: Report colcon test results
run: |
colcon test-result --all --verbose