|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + |
| 8 | +env: |
| 9 | + CARGO_TERM_COLOR: always |
| 10 | + RUSTFLAGS: -D warnings |
| 11 | + |
| 12 | +jobs: |
| 13 | + check: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + - uses: dtolnay/rust-toolchain@stable |
| 18 | + with: |
| 19 | + components: rustfmt, clippy |
| 20 | + - uses: Swatinem/rust-cache@v2 |
| 21 | + |
| 22 | + - name: Format |
| 23 | + run: cargo fmt --all -- --check |
| 24 | + |
| 25 | + - name: Clippy |
| 26 | + run: cargo clippy --locked --all-targets --all-features -- -D warnings |
| 27 | + |
| 28 | + - name: Test |
| 29 | + run: cargo test --locked --all-features |
| 30 | + |
| 31 | + # The configuration a slim OpenHuman build embeds: no socket, no |
| 32 | + # proc-macro, no CLI. It has to keep compiling, because it is the proof |
| 33 | + # that `ports` is a real seam rather than decoration. |
| 34 | + - name: Slim build |
| 35 | + run: cargo check --locked --no-default-features |
| 36 | + |
| 37 | + - name: Docs |
| 38 | + run: cargo doc --locked --all-features --no-deps |
| 39 | + env: |
| 40 | + RUSTDOCFLAGS: -D warnings |
| 41 | + |
| 42 | + # The bus is meant to be embeddable on every platform OpenHuman ships on. The |
| 43 | + # Unix transport is Unix-only by construction, so Windows builds the slim |
| 44 | + # configuration until the named-pipe backend lands (ROADMAP.md, M6). |
| 45 | + portability: |
| 46 | + strategy: |
| 47 | + fail-fast: false |
| 48 | + matrix: |
| 49 | + os: [macos-latest, windows-latest] |
| 50 | + runs-on: ${{ matrix.os }} |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + - uses: dtolnay/rust-toolchain@stable |
| 54 | + - uses: Swatinem/rust-cache@v2 |
| 55 | + - name: Build |
| 56 | + run: cargo check --locked --no-default-features --features macros |
| 57 | + - name: Test |
| 58 | + run: cargo test --locked --no-default-features --features macros |
0 commit comments