tenseleyflow/documentlanguagemodel / ff8a0d0

Browse files

ci(slow-tests): init llama.cpp submodule + build llama-quantize (options 1+3)

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
ff8a0d006a71430ba4fc980814438b7f7bb8c31e
Parents
ee39831
Tree
f8ee6ec

2 changed files

StatusFile+-
M .github/workflows/ci.yml 23 2
M .gitmodules 4 0
.github/workflows/ci.ymlmodified
@@ -173,10 +173,15 @@ jobs:
173173
   slow-tests:
174174
     # Sprint 02: marker-gated tests that touch HF. Cache-keyed on
175175
     # (pyproject.toml hash, tiny-model revision) per audit guidance.
176
-    name: slow tests (hf-cache)
176
+    # Sprint 11: also initializes + builds `vendor/llama.cpp` so export
177
+    # integration tests can exercise real GGUF conversion.
178
+    name: slow tests (hf-cache + llama.cpp)
177179
     runs-on: ubuntu-latest
178180
     steps:
179
-      - uses: actions/checkout@v4
181
+      - name: Checkout with llama.cpp submodule
182
+        uses: actions/checkout@v4
183
+        with:
184
+          submodules: recursive
180185
 
181186
       - name: Install uv
182187
         uses: astral-sh/setup-uv@v4
@@ -207,6 +212,22 @@ jobs:
207212
           print("tiny model at:", tiny_model_path())
208213
           PY
209214
 
215
+      - name: Restore llama.cpp build cache
216
+        id: llama-cpp-cache
217
+        uses: actions/cache@v4
218
+        with:
219
+          path: vendor/llama.cpp/build
220
+          # Cache key: submodule HEAD sha. Bumping llama.cpp invalidates the cache.
221
+          key: llama-cpp-build-${{ hashFiles('.gitmodules', 'vendor/llama.cpp/VERSION') }}
222
+
223
+      - name: Build llama-quantize (if not cached)
224
+        if: steps.llama-cpp-cache.outputs.cache-hit != 'true'
225
+        run: |
226
+          set -euxo pipefail
227
+          # ubuntu-latest ships cmake; `sudo apt-get install -y cmake` is a no-op fallback.
228
+          command -v cmake >/dev/null 2>&1 || sudo apt-get install -y cmake
229
+          scripts/bump-llama-cpp.sh build
230
+
210231
       - name: Run slow tests
211232
         env:
212233
           HF_HOME: ${{ github.workspace }}/.hf-cache
.gitmodulesmodified
@@ -1,3 +1,7 @@
11
 [submodule "vendor/llama.cpp"]
22
 	path = vendor/llama.cpp
33
 	url = https://github.com/ggml-org/llama.cpp
4
+	# Don't surface build-artifact noise in the outer repo's git status.
5
+	# `scripts/bump-llama-cpp.sh build` writes under vendor/llama.cpp/build/
6
+	# which the submodule's own .gitignore covers.
7
+	ignore = untracked