Skip to content

Week9

Week9 #38

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: cargo check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: git clone https://github.com/dora-rs/dora.git dora && git -C dora checkout 45436aad124fe46463d0b0411e3922dae8ee9ebd
working-directory: ${{ github.workspace }}
- run: git -C dora apply ../dora-patches/testing-input-channel.patch
# Cache dora build artifacts so we don't recompile from scratch.
- uses: actions/cache@v4
with:
path: dora/target
key: dora-target-${{ runner.os }}-${{ hashFiles('dora/**/*.rs', 'dora/**/Cargo.toml') }}
- run: cargo check
test:
name: cargo test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: git clone https://github.com/dora-rs/dora.git dora && git -C dora checkout 45436aad124fe46463d0b0411e3922dae8ee9ebd
working-directory: ${{ github.workspace }}
- run: git -C dora apply ../dora-patches/testing-input-channel.patch
# Cache dora build artifacts so we don't recompile from scratch.
- uses: actions/cache@v4
with:
path: dora/target
key: dora-target-${{ runner.os }}-${{ hashFiles('dora/**/*.rs', 'dora/**/Cargo.toml') }}
# All tests now pass with default parallelism — flume→tokio mpsc
# migration (dora-rs/dora#1603) eliminated the spinlock deadlock.
- run: cargo test --lib
# e2e and smoke tests run NodeHarness which spawns daemon threads.
# Parallel execution (>2 threads) hits an intermittent deadlock on
# low-CPU CI runners — run them serially (only add ~3s per suite).
- run: cargo test --test e2e -- --test-threads=1
- run: cargo test --test smoke -- --test-threads=1
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: git clone https://github.com/dora-rs/dora.git dora && git -C dora checkout 45436aad124fe46463d0b0411e3922dae8ee9ebd
working-directory: ${{ github.workspace }}
- run: git -C dora apply ../dora-patches/testing-input-channel.patch
# Cache dora build artifacts so we don't recompile from scratch.
- uses: actions/cache@v4
with:
path: dora/target
key: dora-target-${{ runner.os }}-${{ hashFiles('dora/**/*.rs', 'dora/**/Cargo.toml') }}
- run: cargo clippy -- -D warnings
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
integration-test:
name: cargo test --integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: git clone https://github.com/dora-rs/dora.git dora && git -C dora checkout 45436aad124fe46463d0b0411e3922dae8ee9ebd
working-directory: ${{ github.workspace }}
- run: git -C dora apply ../dora-patches/testing-input-channel.patch
# Cache dora build artifacts — keyed on dora source hash so the
# cache hits every run after the first (commit is locked).
- uses: actions/cache@v4
with:
path: dora/target
key: dora-target-${{ runner.os }}-${{ hashFiles('dora/**/*.rs', 'dora/**/Cargo.toml') }}
# Build the dora CLI (binary lives in binaries/cli, not workspace root).
# PYO3_NO_PYTHON=1 skips Python version detection — the CLI's default
# features don't include Python support, and CI doesn't need it.
- run: PYO3_NO_PYTHON=1 cargo build --bin dora --manifest-path dora/binaries/cli/Cargo.toml
# Build our test binaries first (integration test expects them pre-built).
- run: cargo build --bin test-source --bin test-sink --bin echo-node --bin classifier-node
# Run integration tests serially (dora daemon binds port 6013).
- run: cargo test --test integration -- --test-threads=1