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:b9a4dc001d01a5ef6dd701fc42b36f1c4bb62b2047ce458177577fbd0a727653 - ros_version: "jazzy" image: ghcr.io/px4/px4-dev-ros2:main-jazzy@sha256:ad977ec1a3b3fadc1a68a34ec9f8bfd013f80a4236aaf4708c2eb031dc7f338f 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 }}