Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run: |
python tools/bootstrap_dependencies.py --cache-dir .cache/dependencies
python tools/bootstrap_models.py --cache-dir .cache/models
python tools/package_model_bundle.py
- name: Configure without dependency network access (Unix)
if: runner.os != 'Windows'
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/webgpu-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ jobs:
--build-dir build-webgpu \
--configuration Release \
--platform-id "${{ matrix.id }}" \
--output-dir "reports/webgpu/${{ matrix.id }}"
--output-dir "reports/webgpu/${{ matrix.id }}" \
--model-free
qualification_args=()
if [[ "$WEBGPU_QUALIFICATION_BUILD" == "ON" ]]; then
qualification_args+=(--qualification-build)
Expand Down
39 changes: 39 additions & 0 deletions tests/python/test_ci_workflow_contracts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from __future__ import annotations

from pathlib import Path
import unittest


ROOT = Path(__file__).resolve().parents[2]


def workflow_step(source: str, name: str) -> str:
marker = f" - name: {name}\n"
start = source.index(marker)
end = source.find("\n - ", start + len(marker))
return source[start:] if end == -1 else source[start:end]


class CiWorkflowContractTests(unittest.TestCase):
def test_core_packages_the_locked_model_before_model_bound_metadata(self) -> None:
source = (ROOT / ".github/workflows/core.yml").read_text("utf-8")
bootstrap = workflow_step(source, "Bootstrap locked dependencies and models")
metadata = workflow_step(
source, "Generate build manifest, licenses, and SPDX SBOM"
)

self.assertIn("python tools/package_model_bundle.py", bootstrap)
self.assertNotIn("--model-free", metadata)

def test_webgpu_native_metadata_is_model_free(self) -> None:
source = (ROOT / ".github/workflows/webgpu-native.yml").read_text("utf-8")
metadata = workflow_step(
source, "Generate license, SBOM, and native package input"
)

self.assertIn("python tools/generate_release_metadata.py", metadata)
self.assertIn("--model-free", metadata)


if __name__ == "__main__":
unittest.main()
Loading