|
| 1 | +name: Rust Minimal |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
| 8 | + schedule: |
| 9 | + # Run the CI at 01:22 UTC every Tuesday |
| 10 | + # We pick an arbitrary time outside of most of the world's work hours |
| 11 | + # to minimize the likelihood of running alongside a heavy workload. |
| 12 | + - cron: '22 1 * * 2' |
| 13 | + |
| 14 | +env: |
| 15 | + CARGO_TERM_COLOR: always |
| 16 | + |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + strategy: |
| 20 | + matrix: |
| 21 | + ros_distribution: |
| 22 | + - humble |
| 23 | + - jazzy |
| 24 | + - kilted |
| 25 | + - rolling |
| 26 | + include: |
| 27 | + # Humble Hawksbill (May 2022 - May 2027) |
| 28 | + - docker_image: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest |
| 29 | + ros_distribution: humble |
| 30 | + ros_version: 2 |
| 31 | + # Jazzy Jalisco (May 2024 - May 2029) |
| 32 | + - docker_image: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest |
| 33 | + ros_distribution: jazzy |
| 34 | + ros_version: 2 |
| 35 | + # Kilted Kaiju (May 2025 - Dec 2026) |
| 36 | + - docker_image: rostooling/setup-ros-docker:ubuntu-noble-ros-kilted-ros-base-latest |
| 37 | + ros_distribution: kilted |
| 38 | + ros_version: 2 |
| 39 | + # Rolling Ridley (June 2020 - Present) |
| 40 | + - docker_image: rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-ros-base-latest |
| 41 | + ros_distribution: rolling |
| 42 | + ros_version: 2 |
| 43 | + |
| 44 | + runs-on: ubuntu-latest |
| 45 | + continue-on-error: ${{ matrix.ros_distribution == 'rolling' }} |
| 46 | + container: |
| 47 | + image: ${{ matrix.docker_image }} |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + |
| 51 | + - name: Setup ROS environment |
| 52 | + uses: ros-tooling/[email protected] |
| 53 | + with: |
| 54 | + required-ros-distributions: ${{ matrix.ros_distribution }} |
| 55 | + use-ros2-testing: ${{ matrix.ros_distribution == 'rolling' }} |
| 56 | + |
| 57 | + - name: Setup Rust |
| 58 | + uses: dtolnay/rust-toolchain@stable |
| 59 | + with: |
| 60 | + components: clippy, rustfmt |
| 61 | + |
| 62 | + - name: Test default features |
| 63 | + run: cargo test --workspace |
| 64 | + |
| 65 | + - name: Test with serde |
| 66 | + run: cargo test --workspace -F=serde |
| 67 | + |
| 68 | + - name: Build docs |
| 69 | + run: cargo doc --all-features |
0 commit comments