Build the bundle only for what the bundle is built from

The trigger listed dikte/ggml.py, both test files and the two READMEs,
which are among the files that change most often. A typo fix in the
README started a run that builds a container image, compiles every
Vulkan shader and starts two more containers, with a 45 minute timeout
on it because that is roughly what it costs.

Nothing is lost. What ties ggml.py to the release, the tag, version,
commit and reviewed digest, is asserted in tests/test_packaging.py, and
that file already runs on every pull request in milliseconds.
This commit is contained in:
2026-09-05 09:37:08 +03:00
parent 59180b8eff
commit c3bf328eef
2 changed files with 15 additions and 9 deletions
+4 -5
View File
@@ -1,15 +1,14 @@
name: whisper.cpp Vulkan bundle
# Only what the bundle is built from. Compiling the Vulkan shaders takes
# tens of minutes, and a README typo is not worth one: what ties ggml.py to
# this release is a handful of assertions in tests/test_packaging.py, and
# those run on every pull request in milliseconds.
on:
pull_request:
paths:
- packaging/whisper-vulkan/**
- .github/workflows/whisper-vulkan.yml
- dikte/ggml.py
- tests/test_ggml.py
- tests/test_packaging.py
- README.md
- README.tr.md
workflow_dispatch:
inputs:
whisper_version:
+11 -4
View File
@@ -58,11 +58,18 @@ class WhisperVulkanPackaging(unittest.TestCase):
publish_script = publish_script.split(" run: |", 1)[1]
self.assertNotIn("${{ inputs.", publish_script)
def test_bundle_ci_runs_when_its_installer_or_contract_changes(self):
def test_bundle_ci_runs_only_for_what_the_bundle_is_built_from(self):
"""A 45 minute build on a README typo is a tax on every other change.
What ties ggml.py to the release is checked in this file instead, and
this file runs on every pull request in milliseconds."""
workflow = WORKFLOW.read_text(encoding="utf-8")
for path in ("dikte/ggml.py", "tests/test_packaging.py",
"README.md", "README.tr.md"):
self.assertIn(f"- {path}", workflow)
trigger = workflow.split("workflow_dispatch:", 1)[0]
self.assertIn("- packaging/whisper-vulkan/**", trigger)
self.assertIn("- .github/workflows/whisper-vulkan.yml", trigger)
for path in ("dikte/ggml.py", "tests/test_ggml.py",
"tests/test_packaging.py", "README.md", "README.tr.md"):
self.assertNotIn(f"- {path}", trigger)
def test_the_validator_checks_tar_links_before_extraction(self):
validator = (PACKAGING / "validate-package.sh").read_text(