Skip to content

feat: mdbook

feat: mdbook #97

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
formatting:
name: Check Formatting
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: DeterminateSystems/determinate-nix-action@v3
- name: Check formatting
run: nix build .#checks.x86_64-linux.pre-commit-check -L
no-ros:
name: ROS-independent Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
accept-flake-config = true
- name: Setup sccache
if: env.ACT != 'true'
uses: mozilla-actions/sccache-action@v0.0.9
- name: Clippy (default workspace)
run: |
nix develop '.#pureRust-ci' -c cargo clippy --lib --bins --tests -- -D warnings
- name: Check default workspace
run: |
nix develop '.#pureRust-ci' -c cargo check
- name: Build default workspace
run: |
nix develop '.#pureRust-ci' -c cargo build
- name: Build examples without ROS dependencies
run: |
nix develop '.#pureRust-ci' -c cargo build --examples
- name: Run tests
run: |
nix develop '.#pureRust-ci' -c cargo nextest run
- name: Check ros-z-msgs with bundled messages (no ROS required)
run: |
nix develop '.#pureRust-ci' -c cargo check -p ros-z-msgs
nix develop '.#pureRust-ci' -c cargo check -p ros-z-msgs --features bundled_msgs
nix develop '.#pureRust-ci' -c cargo check -p ros-z-msgs --features common_interfaces
- name: Build ros-z-msgs with individual bundled packages
run: |
nix develop '.#pureRust-ci' -c cargo build -p ros-z-msgs --no-default-features --features std_msgs
nix develop '.#pureRust-ci' -c cargo build -p ros-z-msgs --no-default-features --features geometry_msgs
nix develop '.#pureRust-ci' -c cargo build -p ros-z-msgs --no-default-features --features sensor_msgs
nix develop '.#pureRust-ci' -c cargo build -p ros-z-msgs --no-default-features --features nav_msgs
with-ros:
name: ROS-dependent Test (${{ matrix.distro }})
runs-on: ubuntu-latest
strategy:
matrix:
distro: [jazzy]
# distro: [jazzy, rolling] # Uncomment to test rolling when stable
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
accept-flake-config = true
extra-substituters = https://ros.cachix.org
extra-trusted-public-keys = ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo=
- name: Setup Cachix
uses: cachix/cachix-action@v15
with:
name: ros
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
skipPush: true
- name: Setup sccache
if: env.ACT != 'true'
uses: mozilla-actions/sccache-action@v0.0.9
- name: Clippy (all targets, all features)
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c \
cargo clippy --all-targets --all-features --workspace -- -D warnings
- name: Check rcl-z
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p rcl-z
- name: Check ros-z-msgs (default bundled features)
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p ros-z-msgs
- name: Check ros-z-msgs with external messages
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p ros-z-msgs --features external_msgs
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p ros-z-msgs --features example_interfaces
- name: Check ros-z-msgs with all messages (bundled + external)
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p ros-z-msgs --features all_msgs
- name: Check with protobuf feature
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p ros-z -p ros-z-msgs \
--features ros-z/protobuf,ros-z-msgs/protobuf
- name: Check ros-z (with rcl-z feature)
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo check -p ros-z --features rcl-z
- name: Build ROS message examples
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo build -p ros-z-msgs
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo build --examples
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo build --example z_srvcli --features external_msgs
- name: Build protobuf demo
run: |
nix develop '.#ros-${{ matrix.distro }}-ci' -c cargo build -p protobuf_demo
# FIXME: This requires the installation of rmw_zenoh_cpp triggering a build from source...
# - name: Run unit tests
# run: |
# nix develop .#ci -c cargo test --all-features