-
-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (95 loc) · 2.77 KB
/
ci.yml
File metadata and controls
114 lines (95 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Code Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check code formatting
run: |
echo "🎨 Checking code formatting"
cargo fmt -- --check
clippy:
name: Clippy Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run clippy lints
run: |
echo "🔍 Running clippy lints"
cargo clippy -- -D warnings
test:
name: Test Suite
runs-on: ubuntu-latest
needs: [fmt, clippy]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Download test model
run: |
echo "📦 Setting up test model"
mkdir -p ~/.cache/models/gguf
# Note: Tests expect GPT-2 model at standard path
# If model doesn't exist, tests will be skipped or fail gracefully
- name: Run test suite
run: |
echo "🧪 Running all tests (30 total)"
cargo test --verbose
build:
name: Build Verification
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: [fmt, clippy]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build library
run: |
echo "🔨 Building shimmytok on ${{ matrix.os }}"
cargo build --release --verbose
- name: Verify library builds
run: |
echo "✅ Build successful on ${{ matrix.os }}"