mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: ROS Translation Node Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
jobs:
|
|
build_and_test:
|
|
name: Build and test
|
|
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
|
container:
|
|
image: rostooling/setup-ros-docker:ubuntu-jammy-latest
|
|
steps:
|
|
- name: Setup ROS 2
|
|
uses: ros-tooling/setup-ros@v0.7
|
|
with:
|
|
required-ros-distributions: humble
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# Workaround for https://github.com/actions/runner/issues/2033
|
|
- name: ownership workaround
|
|
run: git config --system --add safe.directory '*'
|
|
|
|
- name: Check .msg file versioning
|
|
if: github.event_name == 'pull_request'
|
|
run: |
|
|
./Tools/ci/check_msg_versioning.sh ${{ github.event.pull_request.base.sha }} ${{github.event.pull_request.head.sha}}
|
|
|
|
- name: Build and test
|
|
run: |
|
|
ros_ws=/ros_ws
|
|
mkdir -p $ros_ws/src
|
|
./Tools/copy_to_ros_ws.sh $ros_ws
|
|
cd $ros_ws
|
|
source /opt/ros/humble/setup.sh
|
|
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install --event-handlers=console_cohesion+
|
|
./build/translation_node/translation_node_unit_tests
|