Merge pull request #166 from AdaWorldAPI/claude/review-rustynum-pr-80… #120
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: "CI: Master (Build, Test, Lint)" | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "benches/**" | |
| - "examples/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/ci-master.yml" | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Mirror proof.yml: allow noise lints in evolving 115K-line codebase | |
| RUSTFLAGS: "-D warnings -A unused -A dead-code -A private-interfaces -A mismatched-lifetime-syntaxes -A unsafe-op-in-unsafe-fn -A unexpected-cfgs -A ambiguous-glob-reexports -A overlapping-range-endpoints -A confusable-idents" | |
| jobs: | |
| # --------------------------------------------------------------------------- | |
| # Build — debug + release | |
| # --------------------------------------------------------------------------- | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Init vendor submodules | |
| run: git submodule update --init vendor/rustynum | |
| - name: Clone sibling repos (OBLIGATORY deps) | |
| run: | | |
| git clone --depth 1 https://github.com/AdaWorldAPI/rustynum.git ../rustynum | |
| git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust | |
| git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.93.0" | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Cargo build (debug, default features) | |
| run: cargo build --lib --bins --tests --benches | |
| - name: Cargo build (release) | |
| run: cargo build --release --lib --bins | |
| # --------------------------------------------------------------------------- | |
| # Test — unit + integration + doc tests | |
| # --------------------------------------------------------------------------- | |
| test: | |
| name: Test | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Init vendor submodules | |
| run: git submodule update --init vendor/rustynum | |
| - name: Clone sibling repos (OBLIGATORY deps) | |
| run: | | |
| git clone --depth 1 https://github.com/AdaWorldAPI/rustynum.git ../rustynum | |
| git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust | |
| git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.93.0" | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Unit tests (all modules) | |
| run: cargo test --lib -- --test-threads=4 | |
| - name: Integration tests | |
| run: cargo test --tests -- --test-threads=1 | |
| - name: Doc tests | |
| run: cargo test --doc | |
| - name: Examples compile | |
| run: cargo build --examples | |
| # --------------------------------------------------------------------------- | |
| # Lint — clippy + fmt | |
| # --------------------------------------------------------------------------- | |
| lint: | |
| name: Lint | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Init vendor submodules | |
| run: git submodule update --init vendor/rustynum | |
| - name: Clone sibling repos (OBLIGATORY deps) | |
| run: | | |
| git clone --depth 1 https://github.com/AdaWorldAPI/rustynum.git ../rustynum | |
| git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust | |
| git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.93.0" | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy (all targets) | |
| run: cargo clippy --all-targets -- -D warnings -A unused -A dead-code -A private-interfaces -A mismatched-lifetime-syntaxes -A unsafe-op-in-unsafe-fn -A unexpected-cfgs -A ambiguous-glob-reexports -A overlapping-range-endpoints -A confusable-idents | |
| - name: Rustfmt | |
| run: cargo fmt --all -- --check | |
| # --------------------------------------------------------------------------- | |
| # Miri — catches UB in unsafe code (split_at_mut, raw pointers, etc.) | |
| # --------------------------------------------------------------------------- | |
| miri: | |
| name: Miri (unsafe validation) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Init vendor submodules | |
| run: git submodule update --init vendor/rustynum | |
| - name: Clone sibling repos (OBLIGATORY deps) | |
| run: | | |
| git clone --depth 1 https://github.com/AdaWorldAPI/rustynum.git ../rustynum | |
| git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust | |
| git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: miri | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: miri | |
| # 5 min timeout per target — Miri can run 1-3h without timeout | |
| - name: Miri — lib tests (5 min timeout) | |
| run: timeout 300 cargo miri test --lib -- --test-threads=1 | |
| env: | |
| MIRIFLAGS: "-Zmiri-disable-isolation" | |
| continue-on-error: true | |
| # --------------------------------------------------------------------------- | |
| # Summary | |
| # --------------------------------------------------------------------------- | |
| ci-summary: | |
| name: CI Summary | |
| needs: [build, test, lint, miri] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Results | |
| run: | | |
| echo "============================================" | |
| echo " LADYBUG-RS CI MASTER RESULTS" | |
| echo "============================================" | |
| echo "" | |
| echo " Build: ${{ needs.build.result }}" | |
| echo " Test: ${{ needs.test.result }}" | |
| echo " Lint: ${{ needs.lint.result }}" | |
| echo " Miri: ${{ needs.miri.result }}" | |
| echo "" | |
| PASS=true | |
| for r in "${{ needs.build.result }}" "${{ needs.test.result }}" "${{ needs.lint.result }}"; do | |
| [ "$r" != "success" ] && PASS=false | |
| done | |
| if [ "$PASS" = true ]; then | |
| echo " ✅ ALL CI CHECKS PASSED" | |
| else | |
| echo " ❌ SOME CI CHECKS FAILED" | |
| exit 1 | |
| fi | |
| echo "============================================" |