Skip to content

GLM-5.3-Flash EXL3 on 2x DGX Spark with TensorFold

Python

ci: CPU checks for patch applicability, image pin drift and tools tests

plotarmordevbbf7e4b5b0a4
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..459b6e9
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,49 @@
+name: ci
+# CPU-only checks: patches apply to the pinned TensorFold source, the image pin matches the
+# patch set, and the self-contained tools tests pass. No GPU, no docker, no model downloads.
+on:
+ pull_request:
+ push:
+ branches: [main]
+
+jobs:
+ patches-and-pin:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Image pin matches the patch set
+ run: |
+ # image_hash() from scripts/config.sh: sha256(cat patches/*.patch + IMAGE_EXTRAS)[:12]
+ E="$(sed -n 's/^IMAGE_EXTRAS="\(.*\)"/\1/p' scripts/config.sh)"
+ H="$( (cat patches/*.patch; echo "$E") | sha256sum | cut -c1-12)"
+ T="$(sed -n 's/^IMAGE_TAG="\${IMAGE_TAG:-\(v[^"]*\)}"/\1/p' scripts/config.sh)"
+ echo "patch-set hash: $H pinned IMAGE_TAG: $T"
+ if [ "$T" != "v0.6.0-$H" ]; then
+ echo "::error::IMAGE_TAG ($T) does not match the current patch set (v0.6.0-$H). Publish an image for this patch set or bump the pin."
+ exit 1
+ fi
+ - name: Patches apply to the pinned TensorFold source
+ run: |
+ git clone --depth 1 --branch "${TF_TAG:-v0.6.0}" https://github.com/ashhart/TensorFold.git /tmp/tf
+ cd /tmp/tf/src
+ rc=0
+ for p in "$OLDPWD"/patches/*.patch; do
+ if ! patch -p0 --forward --check < "$p" > /tmp/patchlog 2>&1; then
+ echo "::error::$(basename "$p") does not apply to TensorFold ${TF_TAG:-v0.6.0}"
+ sed -n '1,8p' /tmp/patchlog
+ rc=1
+ fi
+ done
+ # A second pass must be a full no-op (patches use --forward semantics in the image build)
+ exit $rc
+ tools-tests:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+ - name: Self-contained tools tests
+ run: |
+ python tools/test_chunked_bodies.py
+ python tools/test_effort_tail.py