mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 14:19:57 +08:00
* ci(ros): reuse the Jazzy toolchain for translation tests
Use the same pinned PX4 development image as the ROS integration tests while preserving the Humble environment and both distro-specific caches.
Assisted-by: Copilot:gpt-6-astra
* ci(ros): pin published Humble and Jazzy development images
Use the multi-architecture toolchains published from d8c01514ac for both translation-test distributions. Reuse bundled ccache while preserving separate caches, message-versioning checks and checkout-matched translation builds.
Assisted-by: Copilot:gpt-6-astra
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
name: ROS Translation Node Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Build and test [${{ matrix.config.ros_version }}]
|
|
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
- ros_version: "humble"
|
|
image: ghcr.io/px4/px4-dev-ros2:main-humble@sha256:22477581e61d0fd3edff894e8a4b9615898f0534273d3745831a819bd1c5b5a4
|
|
- ros_version: "jazzy"
|
|
image: ghcr.io/px4/px4-dev-ros2:main-jazzy@sha256:741c007bc5faadf41ef92258b0cdadf7dea5c84447afcb8545ea7c1ef42ffd71
|
|
container:
|
|
image: ${{ matrix.config.image }}
|
|
steps:
|
|
- uses: runs-on/action@v2
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Configure Git Safe Directory
|
|
run: git config --system --add safe.directory '*'
|
|
|
|
- uses: ./.github/actions/setup-ccache
|
|
id: ccache
|
|
with:
|
|
cache-key-prefix: ccache-ros-translation-${{ matrix.config.ros_version }}
|
|
max-size: 150M
|
|
base-dir: /ros_ws
|
|
|
|
- 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 - Translation Node
|
|
run: |
|
|
ros_ws=/ros_ws
|
|
mkdir -p $ros_ws/src
|
|
./Tools/copy_to_ros_ws.sh $ros_ws
|
|
cd $ros_ws
|
|
source /opt/ros/${{ matrix.config.ros_version }}/setup.sh
|
|
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache --symlink-install --event-handlers=console_cohesion+
|
|
|
|
- name: Test - Translation Node Unit Tests
|
|
run: |
|
|
source /ros_ws/install/setup.sh
|
|
/ros_ws/build/translation_node/translation_node_unit_tests
|
|
|
|
- uses: ./.github/actions/save-ccache
|
|
if: always()
|
|
with:
|
|
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
|