mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
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:
@@ -1,15 +1,14 @@
|
|||||||
name: whisper.cpp Vulkan bundle
|
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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packaging/whisper-vulkan/**
|
- packaging/whisper-vulkan/**
|
||||||
- .github/workflows/whisper-vulkan.yml
|
- .github/workflows/whisper-vulkan.yml
|
||||||
- dikte/ggml.py
|
|
||||||
- tests/test_ggml.py
|
|
||||||
- tests/test_packaging.py
|
|
||||||
- README.md
|
|
||||||
- README.tr.md
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
whisper_version:
|
whisper_version:
|
||||||
|
|||||||
+11
-4
@@ -58,11 +58,18 @@ class WhisperVulkanPackaging(unittest.TestCase):
|
|||||||
publish_script = publish_script.split(" run: |", 1)[1]
|
publish_script = publish_script.split(" run: |", 1)[1]
|
||||||
self.assertNotIn("${{ inputs.", publish_script)
|
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")
|
workflow = WORKFLOW.read_text(encoding="utf-8")
|
||||||
for path in ("dikte/ggml.py", "tests/test_packaging.py",
|
trigger = workflow.split("workflow_dispatch:", 1)[0]
|
||||||
"README.md", "README.tr.md"):
|
self.assertIn("- packaging/whisper-vulkan/**", trigger)
|
||||||
self.assertIn(f"- {path}", workflow)
|
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):
|
def test_the_validator_checks_tar_links_before_extraction(self):
|
||||||
validator = (PACKAGING / "validate-package.sh").read_text(
|
validator = (PACKAGING / "validate-package.sh").read_text(
|
||||||
|
|||||||
Reference in New Issue
Block a user