Support ROS 2 Jazzy #56
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: build_and_test | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| branches: | |
| - main | |
| - humble | |
| - jazzy | |
| - '*-devel' | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| branches: | |
| - '*' | |
| workflow_dispatch: | |
| # Do not run multiple jobs for the same branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_and_test: | |
| strategy: | |
| matrix: | |
| ros_distro: [jazzy, kilted, rolling] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| file: docker/Dockerfile | |
| tags: mujoco_ros2_simulation:${{ github.head_ref || github.ref_name }} | |
| target: mujoco_ros | |
| build-args: | | |
| ROS_DISTRO=${{ matrix.ros_distro }} | |
| push: false | |
| load: true | |
| - name: Run tests | |
| run: | | |
| docker run --rm \ | |
| mujoco_ros2_simulation:${{ github.head_ref || github.ref_name }} \ | |
| bash -c " | |
| colcon test && | |
| colcon test-result --verbose | |
| " | |
| - name: Clean up Docker image | |
| if: always() | |
| run: | | |
| docker image rm --force mujoco_ros2_simulation:${{ github.head_ref || github.ref_name }} || true |