Update Rust workflow to include Planus installation #45
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: Rust CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: '1.89.0' | |
| # Add this before your 'cargo build' step | |
| - name: Install Planus v1.2.0 | |
| run: cargo install planus --version 1.2.0 | |
| # Add additional planus generate commands if you have more .fbs files | |
| - name: Regenerate FlatBuffers code | |
| run: | | |
| planus generate path/to/schema.fbs -o path/to/generated.rs | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --all --verbose | |
| - name: Run clippy (linter) | |
| run: cargo clippy --all -- -D warnings | |
| - name: Run fmt (format check) | |
| run: cargo fmt --all -- --check |