refactor: migrate from Go to Rust implementation #5
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-and-test: | |
| name: Linux build and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| libssl-dev \ | |
| pkg-config \ | |
| libsasl2-dev \ | |
| protobuf-compiler | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "linux-build" | |
| - name: Generate protocol files | |
| run: cargo check --package protocol | |
| - name: Format generated code | |
| run: cargo fmt --all | |
| - name: Check format | |
| run: cargo fmt --all -- --check | |
| - name: Build | |
| run: cargo build --all-targets --workspace | |
| - name: Test | |
| run: cargo test --workspace |