RPC features #37
Workflow file for this run
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: Builds | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - src/** | |
| - include/** | |
| - examples/** | |
| - client-sdk-rust/** | |
| - CMakeLists.txt | |
| - build.sh | |
| - .github/workflows/** | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - src/** | |
| - include/** | |
| - examples/** | |
| - client-sdk-rust/** | |
| - CMakeLists.txt | |
| - build.sh | |
| - .github/workflows/** | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| - os: macos-latest | |
| # Windows needs protobuf *libraries* too (not just protoc). | |
| # Enable after wiring vcpkg (see notes below). | |
| # - os: windows-latest | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| # ---------- OS-specific deps: install protoc + libprotobuf that MATCH ---------- | |
| - name: Install deps (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| set -eux | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build build-essential \ | |
| protobuf-compiler libprotobuf-dev libabsl-dev \ | |
| libx11-dev libxext-dev libgl1-mesa-dev libssl-dev \ | |
| libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \ | |
| libxrandr-dev libxi-dev libxkbcommon-dev \ | |
| libdrm-dev libgbm-dev libva-dev \ | |
| libasound2-dev libpulse-dev | |
| protoc --version | |
| pkg-config --modversion protobuf | |
| # Fail if versions don't match (best-effort) | |
| test "$(protoc --version | awk '{print $2}')" = "$(pkg-config --modversion protobuf)" || { | |
| echo "protoc and libprotobuf versions differ"; exit 1; } | |
| - name: Install deps (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| set -eux | |
| brew update | |
| # EITHER: latest protobuf | |
| brew install cmake protobuf ninja | |
| # OR pin a specific version (e.g., protobuf@6) if you need it: | |
| # brew install protobuf@6 && brew link --overwrite --force protobuf@6 | |
| protoc --version | |
| pkg-config --modversion protobuf | |
| # ---------- Rust toolchain ---------- | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| # ---------- Cache Cargo ---------- | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-reg-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-reg- | |
| - name: Cache Cargo target | |
| uses: actions/cache@v4 | |
| with: | |
| path: client-sdk-rust/target | |
| key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-target- | |
| # ---------- Build (Debug / Release) ---------- | |
| - name: Build Debug | |
| shell: bash | |
| run: | | |
| chmod +x build.sh | |
| ./build.sh debug | |
| - name: Build Release | |
| shell: bash | |
| run: | | |
| ./build.sh release | |
| # ---------- Smoke test example (no server needed) ---------- | |
| - name: Smoke test example (Debug) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| if [[ -x build/examples/SimpleRoom ]]; then | |
| build/examples/SimpleRoom --help || true | |
| fi | |
| # ---------- Cleanup ---------- | |
| - name: Clean after build (best-effort) | |
| if: always() | |
| shell: bash | |
| run: | | |
| [[ -x build.sh ]] && ./build.sh clean-all || true |