permissions:
contents: read
name: Rust CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
env:
CARGO_TERM_COLOR: always
PROTOC_VERSION: '3.25.3'
jobs:
format:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-01-30
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-01-30
components: clippy
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Run Clippy
run: cargo clippy --all-targets -- -D warnings
test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2026-01-30
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Build project
run: cargo build --workspace --exclude e2e-tests --all-targets --verbose
- name: Run tests
run: cargo test --workspace --exclude e2e-tests --verbose -- --no-capture
test-stable:
name: Test Stable (no-simd)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc@${{ env.PROTOC_VERSION }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Build wacore-binary (stable, no SIMD)
run: cargo build -p wacore-binary --no-default-features --verbose
- name: Test wacore-binary (stable, no SIMD)
run: cargo test -p wacore-binary --no-default-features --lib --verbose
- name: Build wacore-appstate (stable, no SIMD)
run: cargo build -p wacore-appstate --no-default-features --verbose
- name: Test wacore-appstate (stable, no SIMD)
run: cargo test -p wacore-appstate --no-default-features --lib --verbose
- name: Build wacore (stable, no SIMD)
run: cargo build -p wacore --no-default-features --verbose
- name: Test wacore (stable, no SIMD)
run: cargo test -p wacore --no-default-features --lib --verbose