Add flatbuffer tonic demo #14
This file contains 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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev | |
paths: | |
- 'src/**' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
# Common environment variables | |
env: | |
RUSTFLAGS: "-C debuginfo=1" | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: "1" | |
jobs: | |
style-check: | |
name: style-check | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- run: | | |
sudo apt update | |
sudo apt install -y protobuf-compiler | |
sudo sh compile-flatc.sh | |
- name: Cache Crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./target | |
~/.cargo | |
key: debug-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('Cargo.lock') }} | |
restore-keys: | | |
debug-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}- | |
debug-${{ runner.os }}- | |
- name: Run Style Check | |
run: | | |
make ci | |
- name: Run | |
run: | | |
make run | |
- name: Check git status | |
run: | | |
git diff --exit-code |