name: CI on: push: branches: [main] pull_request: env: CARGO_TERM_COLOR: always jobs: lint-and-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - run: cargo fmt --all -- --check - run: cargo clippy --workspace --all-targets -- -D warnings - run: cargo test --workspace --all-targets - name: enforce flat crate source run: test -z "$(find crates/*/src -mindepth 2 -type d -print)" - name: forbid unsafe and no_std markers run: "! rg '\\bunsafe\\b|libc|no_std' crates Cargo.toml -g '*.rs' -g '*.toml'" - name: optional plot feature run: cargo check -p chassis-tune --features plot --all-targets - name: deterministic tuning smoke run: | cargo run --release -p chassis-tune -- sweep --samples 64 --top-k 3 --max-iters 40 --ensemble 2 --seed 7 --out-dir target/tune-smoke cargo run --release -p chassis-tune -- sweep --samples 64 --top-k 3 --max-iters 40 --ensemble 2 --seed 7 --out-dir target/tune-smoke-again diff target/tune-smoke/trials.csv target/tune-smoke-again/trials.csv vcan-integration: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - run: | sudo modprobe vcan sudo ip link add dev vcan0 type vcan sudo ip link set up vcan0 - run: cargo test -p socketcan@0.1.0 --test vcan -- --ignored --test-threads 1 cross-check: runs-on: ubuntu-latest strategy: matrix: target: [aarch64-unknown-linux-gnu, armv7-unknown-linux-musleabihf] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - uses: Swatinem/rust-cache@v2 - run: cargo check --workspace --target ${{ matrix.target }} build-armv7: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: targets: armv7-unknown-linux-musleabihf - uses: Swatinem/rust-cache@v2 - run: cargo build --release -p chassisd -p spin -p chassis-tune --target armv7-unknown-linux-musleabihf