Repository navigation
ci: fix all-features advisories + 0BSD license + target-cpu=native SI… #4
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Override .cargo/config.toml's `target-cpu=native`. GitHub runners are | |
| # heterogeneous and `native` can emit instructions (e.g. AVX-512) the actual | |
| # silicon traps, crashing rustc/proc-macros with SIGILL. Empty = portable codegen. | |
| CARGO_BUILD_RUSTFLAGS: "" | |
| jobs: | |
| clippy: | |
| name: clippy (workspace) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| # Default features only: --all-features pulls qdrant/onnx/candle which need | |
| # system libs not present on a bare runner. | |
| - run: cargo clippy --workspace --lib -- -D warnings | |
| test: | |
| name: test (graphrag-core) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test -p graphrag-core --lib | |
| msrv: | |
| name: MSRV 1.85 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Verified floor: `jsonfixer` uses edition 2024 → rustc >= 1.85. | |
| - uses: dtolnay/rust-toolchain@1.85.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build -p graphrag-core -p graphrag-cli | |
| deny: | |
| name: cargo-deny | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| # Non-blocking: the repo is not yet `cargo fmt` clean. Flip continue-on-error | |
| # to false once a one-time `cargo fmt --all` has been applied. | |
| fmt: | |
| name: rustfmt (informational) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check |