Test setup-gazebo #1597
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: 'Test setup-gazebo' | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - 'releases/*' | |
| schedule: | |
| # Run the CI automatically twice per day to look for flakyness. | |
| - cron: '0 */12 * * *' | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test_action_linux: | |
| name: 'Unit testing action on GitHub runners' | |
| runs-on: ${{ matrix.ubuntu_distribution }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ubuntu_distribution: | |
| - ubuntu-22.04 | |
| - ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - run: .github/workflows/build-and-test.sh | |
| test_action_linux_docker: | |
| name: 'Unit testing action in a docker container' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ matrix.docker_image }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| docker_image: | |
| - ubuntu:jammy | |
| - ubuntu:noble | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - run: .github/workflows/build-and-test.sh | |
| test_gazebo_install_ubuntu: | |
| name: 'Install Gazebo on Ubuntu GitHub runner' | |
| runs-on: ${{ matrix.ubuntu_distribution }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ubuntu_distribution: | |
| - ubuntu-22.04 | |
| - ubuntu-24.04 | |
| gazebo_distribution: | |
| - fortress | |
| - harmonic | |
| - ionic | |
| - jetty | |
| exclude: | |
| # Gazebo Fortress (Sep 2021 - Sep 2026) | |
| # Compatible ubuntu distributions: 22.04 | |
| - ubuntu_distribution: ubuntu-24.04 | |
| gazebo_distribution: fortress | |
| # Gazebo Ionic (Sep 2024 - Sep 2026) | |
| # Compatible ubuntu distributions: 24.04 | |
| - ubuntu_distribution: ubuntu-22.04 | |
| gazebo_distribution: ionic | |
| # Gazebo Jetty (Sep 2024 - Sep 2026) | |
| # Compatible ubuntu distributions: 24.04 | |
| - ubuntu_distribution: ubuntu-22.04 | |
| gazebo_distribution: jetty | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Check Gazebo installation on Ubuntu runner' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: ${{ matrix.gazebo_distribution }} | |
| - name: 'Test Gazebo installation' | |
| run: | | |
| if command -v ign > /dev/null; then | |
| ign gazebo --versions | |
| elif command -v gz > /dev/null; then | |
| gz sim --versions | |
| else | |
| echo "Neither ign nor gz command found" | |
| exit 1 | |
| fi | |
| test_gazebo_install_ubuntu_docker: | |
| name: 'Install Gazebo on Ubuntu docker' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ matrix.docker_image }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| docker_image: | |
| - ubuntu:jammy | |
| - ubuntu:noble | |
| gazebo_distribution: | |
| - fortress | |
| - harmonic | |
| - ionic | |
| exclude: | |
| # Gazebo Fortress (Sep 2021 - Sep 2026) | |
| # Compatible ubuntu docker images: jammy | |
| - docker_image: ubuntu:noble | |
| gazebo_distribution: fortress | |
| # Gazebo Ionic (Sep 2024 - Sep 2026) | |
| # Compatible ubuntu distributions: 24.04 | |
| - docker_image: ubuntu:jammy | |
| gazebo_distribution: ionic | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Check Gazebo installation on Ubuntu runner' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: ${{ matrix.gazebo_distribution }} | |
| - name: 'Test Gazebo installation' | |
| run: | | |
| if command -v ign > /dev/null; then | |
| ign gazebo --versions | |
| elif command -v gz > /dev/null; then | |
| gz sim --versions | |
| else | |
| echo "Neither ign nor gz command found" | |
| exit 1 | |
| fi | |
| test_gazebo_install_ubuntu_prerelease_docker: | |
| name: 'Install Gazebo pre-release on Ubuntu docker' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ matrix.docker_image }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| docker_image: | |
| - ubuntu:jammy | |
| - ubuntu:noble | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Check Gazebo installation on Ubuntu runner' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'harmonic' | |
| use-gazebo-prerelease: 'true' | |
| - name: 'Test Gazebo installation' | |
| run: 'gz sim --versions' | |
| test_gazebo_install_ubuntu_nightly_docker: | |
| name: 'Install Gazebo nightly on Ubuntu docker' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:noble | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Check Gazebo installation on Ubuntu runner' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'jetty' | |
| use-gazebo-nightly: 'true' | |
| - name: 'Test Gazebo installation' | |
| run: 'gz sim --versions' | |
| test_gazebo_install_macos: | |
| name: 'Install Gazebo on macOS' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| # macOS Sonoma | |
| - macos-14 | |
| # macOS Sequoia | |
| - macos-15 | |
| # macOS Tahoe (not available in GH) | |
| # macos-16 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Check Gazebo installation on macOS runner' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'ionic' | |
| - name: 'Test Gazebo installation' | |
| run: 'gz sim --versions' | |
| test_gazebo_install_windows: | |
| name: 'Install Gazebo on Windows' | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3 | |
| - name: 'Check Gazebo installation on Windows runner' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'harmonic' | |
| - name: 'Test Gazebo installation' | |
| shell: pwsh | |
| run: | | |
| conda activate | |
| gz sim --versions | |
| test_install_ros_gz_unofficial: | |
| name: 'Install Humble and Harmonic side-by-side' | |
| env: | |
| ROS_DISTROS: 'humble' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:jammy | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Install ROS 2 Humble' | |
| uses: ros-tooling/setup-ros@2b7b7e10fd30ff131dfb33248ddd71c5ba31dd30 # v0.7.15 | |
| with: | |
| required-ros-distributions: ${{ env.ROS_DISTROS }} | |
| - name: 'Install Gazebo Harmonic with ros_gz' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'harmonic' | |
| install-ros-gz: ${{ env.ROS_DISTROS }} | |
| - name: Test Humble ros_gz installation | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| ros2 pkg list | grep ros_gz | |
| gz sim --version | grep -E 'version 8\.[0-9]+\.[0-9]+' | |
| test_install_ros_gz_official: | |
| name: 'Install Humble and Fortress side-by-side' | |
| env: | |
| ROS_DISTROS: 'humble' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:jammy | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Install ROS 2 Humble' | |
| uses: ros-tooling/setup-ros@2b7b7e10fd30ff131dfb33248ddd71c5ba31dd30 # v0.7.15 | |
| with: | |
| required-ros-distributions: ${{ env.ROS_DISTROS }} | |
| - name: 'Install Gazebo with ros_gz' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'fortress' | |
| install-ros-gz: ${{ env.ROS_DISTROS }} | |
| - name: Test Humble ros_gz installation | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| ros2 pkg list | grep ros_gz | |
| ign gazebo --version | grep 'version 6.*' | |
| test_install_ros_gz_vendor: | |
| name: 'Install Harmonic on Jazzy through vendor packages' | |
| env: | |
| ROS_DISTROS: 'jazzy' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:noble | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Install ROS 2 Jazzy' | |
| uses: ros-tooling/setup-ros@2b7b7e10fd30ff131dfb33248ddd71c5ba31dd30 # v0.7.15 | |
| with: | |
| required-ros-distributions: ${{ env.ROS_DISTROS }} | |
| - name: 'Install Gazebo with ros_gz' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'harmonic' | |
| install-ros-gz: ${{ env.ROS_DISTROS }} | |
| - name: Test Jazzy ros_gz installation | |
| run: | | |
| source /opt/ros/jazzy/setup.bash | |
| ! [ $(apt list --installed gz-harmonic) ] | |
| ros2 pkg list | grep ros_gz | |
| gz sim --version | grep -E 'version 8\.[0-9]+\.[0-9]+' | |
| test_install_ros_gz_kilted: | |
| name: 'Install Ionic on Kilted through vendor packages' | |
| env: | |
| ROS_DISTROS: 'kilted' | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:noble | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '20.x' | |
| - name: 'Install ROS 2 Kilted' | |
| uses: ros-tooling/setup-ros@2b7b7e10fd30ff131dfb33248ddd71c5ba31dd30 # v0.7.15 | |
| with: | |
| required-ros-distributions: ${{ env.ROS_DISTROS }} | |
| - name: 'Install Gazebo with ros_gz' | |
| uses: ./ | |
| with: | |
| required-gazebo-distributions: 'ionic' | |
| install-ros-gz: ${{ env.ROS_DISTROS }} | |
| - name: Test Kilted ros_gz installation | |
| run: | | |
| source /opt/ros/kilted/setup.bash | |
| ! [ $(apt list --installed gz-ionic) ] | |
| ros2 pkg list | grep ros_gz | |
| gz sim --version | grep -E 'version 9\.[0-9]+\.[0-9]+' |