Skip to content

Initial flatbuffers schema #14

Initial flatbuffers schema

Initial flatbuffers schema #14

Workflow file for this run

on: [push, pull_request]
name: Tests and linting
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
flatbuffers:
name: Check FlatBuffers generated file
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install flatc
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: flatbuffers-compiler
- name: Generate rust code from schema
run: flatc --rust schema/lrs.fbs
- name: Ensure same output as commited
run: diff src/lrs_generated.rs lrs_generated.rs