refactor(service): make clients call-based #741
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Interop Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'book/**' | |
| - '.github/workflows/docs.yml' | |
| - '.github/workflows/mdbook-preview.yml' | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/rmw-zenoh-rs.yml' | |
| - '.github/workflows/semantic-pr.yml' | |
| - '.github/workflows/pr-draft-check.yml' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'book/**' | |
| - '.github/workflows/docs.yml' | |
| - '.github/workflows/mdbook-preview.yml' | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/rmw-zenoh-rs.yml' | |
| - '.github/workflows/semantic-pr.yml' | |
| - '.github/workflows/pr-draft-check.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| interop_test: | |
| name: Interop tests with ROS 2 ${{ matrix.distro }} | |
| runs-on: ubuntu-latest | |
| # Skip for draft PRs to save CI time during development | |
| if: | | |
| github.event_name == 'push' || | |
| github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distro: [humble, jazzy, kilted] | |
| include: | |
| - distro: humble | |
| image: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest | |
| ros_z_feature: humble | |
| - distro: jazzy | |
| image: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest | |
| ros_z_feature: jazzy | |
| - distro: kilted | |
| image: rostooling/setup-ros-docker:ubuntu-noble-ros-kilted-ros-base-latest | |
| ros_z_feature: kilted | |
| container: | |
| image: ${{ matrix.image }} | |
| steps: | |
| - name: Cache apt packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/apt/archives | |
| key: apt-${{ matrix.distro }}-${{ hashFiles('.github/workflows/test.yml') }} | |
| restore-keys: apt-${{ matrix.distro }}- | |
| - name: Install system dependencies | |
| run: apt-get update && apt-get install -y nodejs | |
| - name: Install ROS dependencies | |
| run: | | |
| apt-get install -y \ | |
| ros-${{ matrix.distro }}-example-interfaces \ | |
| ros-${{ matrix.distro }}-rmw-zenoh-cpp \ | |
| ros-${{ matrix.distro }}-demo-nodes-cpp \ | |
| ros-${{ matrix.distro }}-action-tutorials-cpp \ | |
| ros-${{ matrix.distro }}-geometry-msgs \ | |
| ros-${{ matrix.distro }}-sensor-msgs \ | |
| ros-${{ matrix.distro }}-nav-msgs \ | |
| protobuf-compiler | |
| - name: Fix broken rmw_zenoh_cpp config for Kilted | |
| if: matrix.distro == 'kilted' | |
| run: | | |
| # WORKAROUND: ros-kilted-rmw-zenoh-cpp 0.6.6 has invalid transport_optimization field | |
| # The rostooling image has 0.6.2, but apt-get install upgrades to 0.6.6 | |
| CONFIG_FILE="/opt/ros/kilted/share/rmw_zenoh_cpp/config/DEFAULT_RMW_ZENOH_SESSION_CONFIG.json5" | |
| if grep -q "transport_optimization" "$CONFIG_FILE" 2>/dev/null; then | |
| sed -i '/transport_optimization:/,/},$/d' "$CONFIG_FILE" | |
| echo "Fixed rmw_zenoh_cpp config by removing invalid transport_optimization section" | |
| fi | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.distro }}-interop | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Run interop tests | |
| shell: bash | |
| run: | | |
| source /opt/ros/${{ matrix.distro }}/setup.bash | |
| export RMW_IMPLEMENTATION=rmw_zenoh_cpp | |
| FEATURES="${{ matrix.ros_z_feature }}" | |
| if [ "$FEATURES" = "humble" ]; then | |
| cargo nextest run -p ros-z-tests --profile interop \ | |
| --no-default-features --features ros-interop,humble --release | |
| cargo nextest run -p ros-z-console \ | |
| --no-default-features --features ros-interop,humble --release | |
| else | |
| cargo nextest run -p ros-z-tests --profile interop \ | |
| --features "ros-interop,$FEATURES" --release | |
| cargo nextest run -p ros-z-console \ | |
| --features ros-interop --release | |
| fi |