|
10 | 10 | CARGO_TERM_COLOR: always |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - check: |
14 | | - name: Check & Test |
| 13 | + fmt: |
| 14 | + name: Formatting |
15 | 15 | runs-on: ubuntu-latest |
16 | 16 | steps: |
17 | 17 | - uses: actions/checkout@v4 |
| 18 | + - uses: dtolnay/rust-toolchain@stable |
| 19 | + - run: cargo fmt -- --check |
18 | 20 |
|
| 21 | + build: |
| 22 | + name: Build |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
19 | 26 | - uses: dtolnay/rust-toolchain@stable |
| 27 | + - uses: Swatinem/rust-cache@v2 |
20 | 28 |
|
| 29 | + - name: Patch candle deps for CI |
| 30 | + run: | |
| 31 | + sed -i 's|candle-core = { path = "[^"]*" }|candle-core = "0.9"|' Cargo.toml |
| 32 | + sed -i 's|candle-nn = { path = "[^"]*" }|candle-nn = "0.9"|' Cargo.toml |
| 33 | + sed -i 's|candle-transformers = { path = "[^"]*" }|candle-transformers = "0.9"|' Cargo.toml |
| 34 | +
|
| 35 | + - run: cargo build --no-default-features |
| 36 | + |
| 37 | + test: |
| 38 | + name: Tests |
| 39 | + runs-on: ubuntu-latest |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + - uses: dtolnay/rust-toolchain@stable |
21 | 43 | - uses: Swatinem/rust-cache@v2 |
22 | 44 |
|
23 | | - # Candle deps use local path refs that don't exist in CI. |
24 | | - # Swap them for the matching crates.io release. |
25 | 45 | - name: Patch candle deps for CI |
26 | 46 | run: | |
27 | 47 | sed -i 's|candle-core = { path = "[^"]*" }|candle-core = "0.9"|' Cargo.toml |
28 | 48 | sed -i 's|candle-nn = { path = "[^"]*" }|candle-nn = "0.9"|' Cargo.toml |
29 | 49 | sed -i 's|candle-transformers = { path = "[^"]*" }|candle-transformers = "0.9"|' Cargo.toml |
30 | 50 |
|
31 | | - - name: Check formatting |
32 | | - run: cargo fmt -- --check |
| 51 | + - run: cargo test --no-default-features |
33 | 52 |
|
34 | | - - name: Build (CPU only) |
35 | | - run: cargo build --no-default-features |
| 53 | + clippy: |
| 54 | + name: Clippy |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v4 |
| 58 | + - uses: dtolnay/rust-toolchain@stable |
| 59 | + - uses: Swatinem/rust-cache@v2 |
36 | 60 |
|
37 | | - - name: Run tests |
38 | | - run: cargo test --no-default-features |
| 61 | + - name: Patch candle deps for CI |
| 62 | + run: | |
| 63 | + sed -i 's|candle-core = { path = "[^"]*" }|candle-core = "0.9"|' Cargo.toml |
| 64 | + sed -i 's|candle-nn = { path = "[^"]*" }|candle-nn = "0.9"|' Cargo.toml |
| 65 | + sed -i 's|candle-transformers = { path = "[^"]*" }|candle-transformers = "0.9"|' Cargo.toml |
39 | 66 |
|
40 | | - - name: Clippy |
41 | | - run: cargo clippy --no-default-features -- -D warnings |
| 67 | + - run: cargo clippy --no-default-features -- -D warnings |
0 commit comments