|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + |
| 8 | +env: |
| 9 | + CARGO_TERM_COLOR: always |
| 10 | + |
| 11 | +jobs: |
| 12 | + msrv: |
| 13 | + name: msrv build (1.85.0 ${{ matrix.features }}) |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + features: |
| 19 | + - "--no-default-features" |
| 20 | + - "--features serde" |
| 21 | + - "--features rayon" |
| 22 | + - "--all-features" |
| 23 | + env: |
| 24 | + RUSTUP_TOOLCHAIN: 1.85.0 |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v5 |
| 27 | + - uses: dtolnay/rust-toolchain@master |
| 28 | + with: |
| 29 | + toolchain: 1.85.0 |
| 30 | + - uses: Swatinem/rust-cache@v2 |
| 31 | + with: |
| 32 | + key: msrv-${{ matrix.features }} |
| 33 | + # MSRV is verified on the published crate only — dev-deps (nalgebra, |
| 34 | + # criterion, etc.) are not part of the consumer-facing surface and |
| 35 | + # may require a newer rustc than lambert_izzo itself. |
| 36 | + - run: cargo build -p lambert_izzo ${{ matrix.features }} |
| 37 | + |
| 38 | + test: |
| 39 | + name: test (stable ${{ matrix.features }}) |
| 40 | + runs-on: ubuntu-latest |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + features: |
| 45 | + - "--no-default-features" |
| 46 | + - "--features serde" |
| 47 | + - "--features rayon" |
| 48 | + - "--all-features" |
| 49 | + env: |
| 50 | + RUSTUP_TOOLCHAIN: stable |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v5 |
| 53 | + - uses: dtolnay/rust-toolchain@stable |
| 54 | + - uses: Swatinem/rust-cache@v2 |
| 55 | + with: |
| 56 | + key: test-${{ matrix.features }} |
| 57 | + - run: cargo build --workspace ${{ matrix.features }} |
| 58 | + - run: cargo test --workspace ${{ matrix.features }} |
| 59 | + - run: cargo test --doc -p lambert_izzo ${{ matrix.features }} |
| 60 | + |
| 61 | + clippy: |
| 62 | + name: clippy |
| 63 | + runs-on: ubuntu-latest |
| 64 | + env: |
| 65 | + RUSTUP_TOOLCHAIN: stable |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v5 |
| 68 | + - uses: dtolnay/rust-toolchain@stable |
| 69 | + with: |
| 70 | + components: clippy |
| 71 | + - uses: Swatinem/rust-cache@v2 |
| 72 | + with: |
| 73 | + key: clippy |
| 74 | + - run: cargo clippy --workspace --all-targets --all-features -- -D warnings |
| 75 | + |
| 76 | + docs: |
| 77 | + name: docs |
| 78 | + runs-on: ubuntu-latest |
| 79 | + env: |
| 80 | + RUSTUP_TOOLCHAIN: stable |
| 81 | + RUSTDOCFLAGS: -D warnings |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v5 |
| 84 | + - uses: dtolnay/rust-toolchain@stable |
| 85 | + - uses: Swatinem/rust-cache@v2 |
| 86 | + with: |
| 87 | + key: docs |
| 88 | + - run: cargo doc --workspace --no-deps --all-features |
| 89 | + |
| 90 | + wasm: |
| 91 | + name: wasm build |
| 92 | + runs-on: ubuntu-latest |
| 93 | + env: |
| 94 | + RUSTUP_TOOLCHAIN: stable |
| 95 | + steps: |
| 96 | + - uses: actions/checkout@v5 |
| 97 | + - uses: dtolnay/rust-toolchain@stable |
| 98 | + with: |
| 99 | + targets: wasm32-unknown-unknown |
| 100 | + - uses: Swatinem/rust-cache@v2 |
| 101 | + with: |
| 102 | + key: wasm |
| 103 | + - run: cargo build --target wasm32-unknown-unknown -p lambert_izzo --lib |
| 104 | + - run: cargo build --target wasm32-unknown-unknown -p lambert_izzo --lib --features serde |
| 105 | + - run: cargo build --target wasm32-unknown-unknown -p lambert_izzo_wasm --lib |
| 106 | + |
| 107 | + stress: |
| 108 | + name: stress example |
| 109 | + runs-on: ubuntu-latest |
| 110 | + env: |
| 111 | + RUSTUP_TOOLCHAIN: stable |
| 112 | + steps: |
| 113 | + - uses: actions/checkout@v5 |
| 114 | + - uses: dtolnay/rust-toolchain@stable |
| 115 | + - uses: Swatinem/rust-cache@v2 |
| 116 | + with: |
| 117 | + key: stress |
| 118 | + - run: cargo run --release -p lambert_izzo --example stress |
0 commit comments