livingproof-evaluator 1.16.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- livingproof_evaluator-1.16.4/.github/workflows/deploy-manual.yml +163 -0
- livingproof_evaluator-1.16.4/.github/workflows/dispatch-pypi.yml +60 -0
- livingproof_evaluator-1.16.4/.github/workflows/manual.yml +155 -0
- livingproof_evaluator-1.16.4/.github/workflows/publish-pypi.yml +125 -0
- livingproof_evaluator-1.16.4/.github/workflows/release.yml +122 -0
- livingproof_evaluator-1.16.4/.github/workflows/replay-manual.yml +60 -0
- livingproof_evaluator-1.16.4/.github/workflows/verify.yml +260 -0
- livingproof_evaluator-1.16.4/.gitignore +10 -0
- livingproof_evaluator-1.16.4/.python-version +1 -0
- livingproof_evaluator-1.16.4/AGENTS.md +8 -0
- livingproof_evaluator-1.16.4/LICENSE +201 -0
- livingproof_evaluator-1.16.4/PKG-INFO +52 -0
- livingproof_evaluator-1.16.4/README.md +43 -0
- livingproof_evaluator-1.16.4/Taskfile.yml +51 -0
- livingproof_evaluator-1.16.4/demo/verifications/unitree-g1-stock-mujoco-hallway.lock.json +88 -0
- livingproof_evaluator-1.16.4/demo/verifications/unitree-g1-stock-mujoco-hallway.toml +30 -0
- livingproof_evaluator-1.16.4/docs/advisory.md +32 -0
- livingproof_evaluator-1.16.4/docs/contribute.md +27 -0
- livingproof_evaluator-1.16.4/docs/demo-reports.md +14 -0
- livingproof_evaluator-1.16.4/docs/evaluator-descriptor.md +255 -0
- livingproof_evaluator-1.16.4/docs/implementation-descriptor.md +111 -0
- livingproof_evaluator-1.16.4/docs/index.md +19 -0
- livingproof_evaluator-1.16.4/docs/manual.md +59 -0
- livingproof_evaluator-1.16.4/docs/observable-vocabulary.md +62 -0
- livingproof_evaluator-1.16.4/docs/observation-binding.md +32 -0
- livingproof_evaluator-1.16.4/docs/pypi-publication.md +24 -0
- livingproof_evaluator-1.16.4/docs/run-integrity.md +275 -0
- livingproof_evaluator-1.16.4/docs-brand.lock.json +7 -0
- livingproof_evaluator-1.16.4/examples/advisory/battery-thermal/notes.txt +1 -0
- livingproof_evaluator-1.16.4/examples/advisory/battery-thermal/result.json +49 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/details-file-scheme.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/details-file-sha256.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/details-file-traversal.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/details-html.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/format-1-2-0.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/integrity-carries-advisory.json +95 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/missing-descriptor.json +47 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/scenario-carries-advisory.json +72 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/summary-too-long.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/tier-not-observation.json +55 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/with-integrity.json +103 -0
- livingproof_evaluator-1.16.4/examples/advisory/invalid/with-scenario.json +65 -0
- livingproof_evaluator-1.16.4/examples/advisory/recorded-observation/health.json +1 -0
- livingproof_evaluator-1.16.4/examples/advisory/recorded-observation/result.json +55 -0
- livingproof_evaluator-1.16.4/examples/binding/merged/unitree-g1-stock-livingproof-sim-mujoco.json +35 -0
- livingproof_evaluator-1.16.4/examples/binding/producer/livingproof-sim-mujoco.json +28 -0
- livingproof_evaluator-1.16.4/examples/binding/robot/unitree-g1-stock.json +12 -0
- livingproof_evaluator-1.16.4/examples/descriptor/integrity-with-facts/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/descriptor/integrity-with-facts/result.json +144 -0
- livingproof_evaluator-1.16.4/examples/descriptor/integrity-with-icon/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/descriptor/integrity-with-icon/result.json +100 -0
- livingproof_evaluator-1.16.4/examples/descriptor/integrity-without-icon/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/descriptor/integrity-without-icon/result.json +91 -0
- livingproof_evaluator-1.16.4/examples/descriptor/scenario-with-icon/request.json +72 -0
- livingproof_evaluator-1.16.4/examples/descriptor/scenario-with-icon/result.json +78 -0
- livingproof_evaluator-1.16.4/examples/descriptor/scenario-without-icon/request.json +72 -0
- livingproof_evaluator-1.16.4/examples/descriptor/scenario-without-icon/result.json +75 -0
- livingproof_evaluator-1.16.4/examples/implementation/advisory.json +32 -0
- livingproof_evaluator-1.16.4/examples/implementation/battery-thermal.json +32 -0
- livingproof_evaluator-1.16.4/examples/implementation/consumer/two-robot-graders.json +62 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/absolute-package-source.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/advisory-grading.json +32 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/advisory-media-run.json +25 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/advisory-result-minor.json +32 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/advisory-thresholds.json +18 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/extra-field.json +18 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/integrity-media-run.json +25 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/integrity-thresholds.json +18 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/missing-exit-0.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/nested-extra-field.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/result-major-2.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/scenario-grading-none.json +30 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/scenario-result-media.json +31 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/scenario-result-then.json +31 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/scenario-result.json +31 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/unknown-kind-name.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/unknown-kind.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/unknown-placeholder.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/invalid/url-package-source.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/run-integrity.json +17 -0
- livingproof_evaluator-1.16.4/examples/implementation/scenario.json +32 -0
- livingproof_evaluator-1.16.4/examples/integrity/all-not-applicable/request.json +108 -0
- livingproof_evaluator-1.16.4/examples/integrity/all-not-applicable/result.json +83 -0
- livingproof_evaluator-1.16.4/examples/integrity/ci-publisher/request.json +132 -0
- livingproof_evaluator-1.16.4/examples/integrity/ci-publisher/result.json +84 -0
- livingproof_evaluator-1.16.4/examples/integrity/clean/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/integrity/clean/result.json +81 -0
- livingproof_evaluator-1.16.4/examples/integrity/completeness/request.json +223 -0
- livingproof_evaluator-1.16.4/examples/integrity/completeness/result.json +169 -0
- livingproof_evaluator-1.16.4/examples/integrity/completeness-preconditions-unmet/request.json +108 -0
- livingproof_evaluator-1.16.4/examples/integrity/completeness-preconditions-unmet/result.json +83 -0
- livingproof_evaluator-1.16.4/examples/integrity/completeness-recording-listed-missing/request.json +200 -0
- livingproof_evaluator-1.16.4/examples/integrity/completeness-recording-listed-missing/result.json +101 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins/result.json +97 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins-none-checked/request.json +96 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins-none-checked/result.json +86 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins-not-checked/request.json +106 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins-not-checked/result.json +83 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins-partial/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/integrity/pins-partial/result.json +79 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/conformant/request.json +184 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/conformant/result.json +82 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/findings/request.json +204 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/findings/result.json +130 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/lock-checked/request.json +184 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/lock-checked/result.json +83 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/no-lock/request.json +178 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/no-lock/result.json +92 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/preconditions-unmet/request.json +108 -0
- livingproof_evaluator-1.16.4/examples/integrity/plan-conformance/preconditions-unmet/result.json +75 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/clean/request.json +185 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/clean/result.json +73 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/findings/request.json +414 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/findings/result.json +147 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/no-media/request.json +123 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/no-media/result.json +69 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/none-judged/request.json +127 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/none-judged/result.json +101 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/not-checked/request.json +386 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/not-checked/result.json +172 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/over-limit/request.json +176 -0
- livingproof_evaluator-1.16.4/examples/integrity/recording/over-limit/result.json +90 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/grader-disagreement/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/grader-disagreement/result.json +76 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/recording-mismatch/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/recording-mismatch/result.json +76 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/robot-variation/request.json +112 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/robot-variation/result.json +75 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/undeclared/request.json +111 -0
- livingproof_evaluator-1.16.4/examples/integrity/same-input-agreement/undeclared/result.json +76 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/clean/request.json +181 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/clean/result.json +83 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/findings/request.json +195 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/findings/result.json +115 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/simulation-broken/request.json +138 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/simulation-broken/result.json +79 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/timeout-single-report/request.json +148 -0
- livingproof_evaluator-1.16.4/examples/integrity/termination/timeout-single-report/result.json +110 -0
- livingproof_evaluator-1.16.4/examples/scenario/graded/request.json +72 -0
- livingproof_evaluator-1.16.4/examples/scenario/graded/result.json +58 -0
- livingproof_evaluator-1.16.4/examples/scenario/graded-with-details/request.json +72 -0
- livingproof_evaluator-1.16.4/examples/scenario/graded-with-details/result.json +70 -0
- livingproof_evaluator-1.16.4/examples/scenario/not-evaluated/request.json +70 -0
- livingproof_evaluator-1.16.4/examples/scenario/not-evaluated/result.json +60 -0
- livingproof_evaluator-1.16.4/examples/vocabulary/hallway/vocabulary.json +60 -0
- livingproof_evaluator-1.16.4/mock/mock-evaluator-a.json +27 -0
- livingproof_evaluator-1.16.4/mock/mock-evaluator-b.json +27 -0
- livingproof_evaluator-1.16.4/pyproject.toml +51 -0
- livingproof_evaluator-1.16.4/renovate.json +5 -0
- livingproof_evaluator-1.16.4/schema/binding.schema.json +520 -0
- livingproof_evaluator-1.16.4/schema/defs.schema.json +97 -0
- livingproof_evaluator-1.16.4/schema/descriptor.schema.json +170 -0
- livingproof_evaluator-1.16.4/schema/evaluator-request.schema.json +79 -0
- livingproof_evaluator-1.16.4/schema/evaluator-result.schema.json +296 -0
- livingproof_evaluator-1.16.4/schema/implementation.schema.json +537 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/ci-publisher.schema.json +79 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/completeness.schema.json +40 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/pins.schema.json +61 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/plan-conformance.schema.json +111 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/recording.schema.json +207 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/registry.json +85 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/registry.schema.json +49 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/same-input-agreement.schema.json +51 -0
- livingproof_evaluator-1.16.4/schema/integrity/checks/termination.schema.json +81 -0
- livingproof_evaluator-1.16.4/schema/integrity/request.schema.json +182 -0
- livingproof_evaluator-1.16.4/schema/integrity/result.schema.json +432 -0
- livingproof_evaluator-1.16.4/schema/scenario/request.schema.json +71 -0
- livingproof_evaluator-1.16.4/schema/scenario/result.schema.json +64 -0
- livingproof_evaluator-1.16.4/schema/vocabulary.schema.json +78 -0
- livingproof_evaluator-1.16.4/src/livingproof_evaluator_mock/__init__.py +2 -0
- livingproof_evaluator-1.16.4/src/livingproof_evaluator_mock/__main__.py +127 -0
- livingproof_evaluator-1.16.4/src/livingproof_evaluator_schema/__init__.py +12 -0
- livingproof_evaluator-1.16.4/tests/binding_rules.py +81 -0
- livingproof_evaluator-1.16.4/tests/data/descriptor.schema.v1.11.2.json +137 -0
- livingproof_evaluator-1.16.4/tests/data/examples-v1.9.1.sha256 +83 -0
- livingproof_evaluator-1.16.4/tests/integrity/published_examples_v1_1_0.json +38 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_all_not_applicable.py +122 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_ci_publisher.py +31 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_completeness.py +97 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_inconclusive_probes.py +81 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_malformed_request.py +253 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_not_checked.py +437 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_pins.py +106 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_plan_conformance.py +230 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_recording.py +339 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_recording_answers.py +182 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_recording_over_limit.py +381 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_review_34.py +241 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_review_34_open.py +60 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_review_boundaries.py +257 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_same_input_agreement.py +79 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_status_compat_note.py +22 -0
- livingproof_evaluator-1.16.4/tests/integrity/test_termination.py +302 -0
- livingproof_evaluator-1.16.4/tests/integrity_rules.py +518 -0
- livingproof_evaluator-1.16.4/tests/scenario/test_scenario.py +64 -0
- livingproof_evaluator-1.16.4/tests/scenario/test_scenario_reason_matrix.py +51 -0
- livingproof_evaluator-1.16.4/tests/scenario/test_step_details.py +145 -0
- livingproof_evaluator-1.16.4/tests/scenario/test_step_details_boundaries.py +72 -0
- livingproof_evaluator-1.16.4/tests/support.py +113 -0
- livingproof_evaluator-1.16.4/tests/test_advisory.py +838 -0
- livingproof_evaluator-1.16.4/tests/test_binding.py +328 -0
- livingproof_evaluator-1.16.4/tests/test_binding_entries_complete.py +52 -0
- livingproof_evaluator-1.16.4/tests/test_binding_rejections.py +95 -0
- livingproof_evaluator-1.16.4/tests/test_body_contact_source_text.py +27 -0
- livingproof_evaluator-1.16.4/tests/test_contract.py +319 -0
- livingproof_evaluator-1.16.4/tests/test_demo_reporter_pin.py +43 -0
- livingproof_evaluator-1.16.4/tests/test_demo_wiring.py +61 -0
- livingproof_evaluator-1.16.4/tests/test_deploy_freshness_auth.py +498 -0
- livingproof_evaluator-1.16.4/tests/test_descriptor.py +558 -0
- livingproof_evaluator-1.16.4/tests/test_descriptor_facts.py +208 -0
- livingproof_evaluator-1.16.4/tests/test_descriptor_followups.py +188 -0
- livingproof_evaluator-1.16.4/tests/test_docs_brand_lock.py +145 -0
- livingproof_evaluator-1.16.4/tests/test_guidelines_pin_resolves.py +92 -0
- livingproof_evaluator-1.16.4/tests/test_implementation_descriptor.py +1227 -0
- livingproof_evaluator-1.16.4/tests/test_manual_attempt.py +24 -0
- livingproof_evaluator-1.16.4/tests/test_manual_delivery.py +171 -0
- livingproof_evaluator-1.16.4/tests/test_mock_evaluators.py +181 -0
- livingproof_evaluator-1.16.4/tests/test_pypi_handoff.py +209 -0
- livingproof_evaluator-1.16.4/tests/test_release_first.py +139 -0
- livingproof_evaluator-1.16.4/tests/test_release_gate_race.py +167 -0
- livingproof_evaluator-1.16.4/tests/test_release_package.py +67 -0
- livingproof_evaluator-1.16.4/tests/test_release_without_forecast.py +54 -0
- livingproof_evaluator-1.16.4/tests/test_release_workflow.py +255 -0
- livingproof_evaluator-1.16.4/tests/test_schema_in_wheel.py +77 -0
- livingproof_evaluator-1.16.4/tests/test_test_results.py +332 -0
- livingproof_evaluator-1.16.4/tests/test_verification_gate.py +89 -0
- livingproof_evaluator-1.16.4/tests/test_vocabulary.py +194 -0
- livingproof_evaluator-1.16.4/tests/test_vocabulary_sources.py +49 -0
- livingproof_evaluator-1.16.4/tools/ajv/package-lock.json +66 -0
- livingproof_evaluator-1.16.4/tools/ajv/package.json +8 -0
- livingproof_evaluator-1.16.4/tools/ajv/validate.mjs +33 -0
- livingproof_evaluator-1.16.4/tools/manual/build.py +216 -0
- livingproof_evaluator-1.16.4/tools/manual/delivery.py +78 -0
- livingproof_evaluator-1.16.4/tools/manual/mkdocs.yml +44 -0
- livingproof_evaluator-1.16.4/tools/manual/requirements.in +4 -0
- livingproof_evaluator-1.16.4/tools/manual/requirements.lock +450 -0
- livingproof_evaluator-1.16.4/tools/manual/tests/test_contracts_verbatim.py +23 -0
- livingproof_evaluator-1.16.4/tools/manual/tests/test_manual.py +376 -0
- livingproof_evaluator-1.16.4/tools/manual/tests/test_playwright_runtime_review.py +44 -0
- livingproof_evaluator-1.16.4/tools/package_release.py +168 -0
- livingproof_evaluator-1.16.4/tools/pypi_handoff.py +273 -0
- livingproof_evaluator-1.16.4/tools/test_results.py +380 -0
- livingproof_evaluator-1.16.4/tools/validate_contract.py +489 -0
- livingproof_evaluator-1.16.4/uv.lock +382 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Deploy released evaluator manual
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
release_tag: {type: string, required: true}
|
|
7
|
+
version: {type: string, required: true}
|
|
8
|
+
commit: {type: string, required: true}
|
|
9
|
+
run: {type: string, required: true}
|
|
10
|
+
attempt: {type: string, required: true}
|
|
11
|
+
artifact_id: {type: string, required: true}
|
|
12
|
+
digest: {type: string, required: true}
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
if: >-
|
|
18
|
+
github.ref == 'refs/heads/main' &&
|
|
19
|
+
(github.event_name == 'push' ||
|
|
20
|
+
(github.event_name == 'workflow_dispatch' &&
|
|
21
|
+
github.event.inputs.replay_tag != '' &&
|
|
22
|
+
github.event.inputs.replay_tag == inputs.release_tag))
|
|
23
|
+
runs-on: ubuntu-24.04
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
pages: write
|
|
27
|
+
id-token: write
|
|
28
|
+
concurrency:
|
|
29
|
+
group: evaluator-pages
|
|
30
|
+
cancel-in-progress: false
|
|
31
|
+
environment:
|
|
32
|
+
name: github-pages
|
|
33
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
34
|
+
env:
|
|
35
|
+
RELEASE_TAG: ${{ inputs.release_tag }}
|
|
36
|
+
VERSION: ${{ inputs.version }}
|
|
37
|
+
SOURCE: ${{ inputs.commit }}
|
|
38
|
+
PLAN_RUN: ${{ inputs.run }}
|
|
39
|
+
PLAN_ATTEMPT: ${{ inputs.attempt }}
|
|
40
|
+
ARTIFACT_ID: ${{ inputs.artifact_id }}
|
|
41
|
+
DIGEST: ${{ inputs.digest }}
|
|
42
|
+
REPLAY_TAG: ${{ github.event.inputs.replay_tag }}
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
45
|
+
with:
|
|
46
|
+
ref: ${{ github.sha }}
|
|
47
|
+
fetch-depth: 0
|
|
48
|
+
fetch-tags: true
|
|
49
|
+
persist-credentials: false
|
|
50
|
+
- name: Require exact published stable tag and same-run build
|
|
51
|
+
env:
|
|
52
|
+
GH_TOKEN: ${{ github.token }}
|
|
53
|
+
run: |
|
|
54
|
+
set -euo pipefail
|
|
55
|
+
[[ "$VERSION" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
|
|
56
|
+
[[ "$ARTIFACT_ID" =~ ^[1-9][0-9]*$ ]]
|
|
57
|
+
[[ "$PLAN_ATTEMPT" =~ ^[1-9][0-9]{0,5}$ ]]
|
|
58
|
+
test "$PLAN_ATTEMPT" -le "$GITHUB_RUN_ATTEMPT"
|
|
59
|
+
if [[ "$GITHUB_EVENT_NAME" == 'workflow_dispatch' ]]; then
|
|
60
|
+
test "$PLAN_ATTEMPT" = "$GITHUB_RUN_ATTEMPT"
|
|
61
|
+
test "$REPLAY_TAG" = "$RELEASE_TAG"
|
|
62
|
+
fi
|
|
63
|
+
test "$RELEASE_TAG" = "v$VERSION"
|
|
64
|
+
test "$SOURCE" = "$GITHUB_SHA"
|
|
65
|
+
test "$(git rev-parse HEAD)" = "$SOURCE"
|
|
66
|
+
test "$(git rev-parse --verify "refs/tags/${RELEASE_TAG}^{commit}")" = "$SOURCE"
|
|
67
|
+
test "$PLAN_RUN" = "$GITHUB_RUN_ID"
|
|
68
|
+
gh api "repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" |
|
|
69
|
+
python3 tools/manual/delivery.py published "$RELEASE_TAG"
|
|
70
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
|
71
|
+
with:
|
|
72
|
+
artifact-ids: ${{ inputs.artifact_id }}
|
|
73
|
+
path: ${{ runner.temp }}/verified-evaluator
|
|
74
|
+
merge-multiple: true
|
|
75
|
+
- name: Use the exact sealed bytes and validate their build identity
|
|
76
|
+
id: pages-package
|
|
77
|
+
run: |
|
|
78
|
+
set -euo pipefail
|
|
79
|
+
[[ "$DIGEST" =~ ^[0-9a-f]{64}$ ]]
|
|
80
|
+
archive="$RUNNER_TEMP/verified-evaluator/artifact.tar"
|
|
81
|
+
printf '%s %s\n' "$DIGEST" "$archive" | sha256sum --check
|
|
82
|
+
python3 tools/manual/delivery.py archive "$archive" "$VERSION" "$SOURCE" "$PLAN_RUN" "$PLAN_ATTEMPT"
|
|
83
|
+
cp "$archive" "$RUNNER_TEMP/artifact.tar"
|
|
84
|
+
echo "tar-sha256=$DIGEST" >> "$GITHUB_OUTPUT"
|
|
85
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
86
|
+
id: pages-artifact
|
|
87
|
+
with:
|
|
88
|
+
name: github-pages-${{ github.run_attempt }}
|
|
89
|
+
path: ${{ runner.temp }}/artifact.tar
|
|
90
|
+
retention-days: 1
|
|
91
|
+
if-no-files-found: error
|
|
92
|
+
# Use the same-run Actions artifact client (like deploy-pages), not the REST index.
|
|
93
|
+
# An exact ID and name must both resolve to the sealed Pages tar before deploying.
|
|
94
|
+
- name: Require a valid Pages artifact ID
|
|
95
|
+
shell: bash
|
|
96
|
+
env:
|
|
97
|
+
UPLOADED_ID: ${{ steps.pages-artifact.outputs.artifact-id }}
|
|
98
|
+
run: |
|
|
99
|
+
[[ "$UPLOADED_ID" =~ ^[1-9][0-9]*$ ]]
|
|
100
|
+
- name: Read exact Pages artifact by ID
|
|
101
|
+
id: pages-id-first
|
|
102
|
+
continue-on-error: true
|
|
103
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
104
|
+
with:
|
|
105
|
+
artifact-ids: ${{ steps.pages-artifact.outputs.artifact-id }}
|
|
106
|
+
path: ${{ runner.temp }}/evaluator-pages-id-first
|
|
107
|
+
- name: Allow the ID lookup to settle
|
|
108
|
+
if: steps.pages-id-first.outcome == 'failure'
|
|
109
|
+
run: sleep 4
|
|
110
|
+
- name: Retry read by ID once
|
|
111
|
+
id: pages-id-retry
|
|
112
|
+
if: steps.pages-id-first.outcome == 'failure'
|
|
113
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
114
|
+
with:
|
|
115
|
+
artifact-ids: ${{ steps.pages-artifact.outputs.artifact-id }}
|
|
116
|
+
path: ${{ runner.temp }}/evaluator-pages-id-retry
|
|
117
|
+
- name: Read exact Pages artifact by name
|
|
118
|
+
id: pages-name-first
|
|
119
|
+
continue-on-error: true
|
|
120
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
121
|
+
with:
|
|
122
|
+
name: github-pages-${{ github.run_attempt }}
|
|
123
|
+
path: ${{ runner.temp }}/evaluator-pages-name-first
|
|
124
|
+
- name: Allow the name lookup to settle
|
|
125
|
+
if: steps.pages-name-first.outcome == 'failure'
|
|
126
|
+
run: sleep 4
|
|
127
|
+
- name: Retry read by name once
|
|
128
|
+
id: pages-name-retry
|
|
129
|
+
if: steps.pages-name-first.outcome == 'failure'
|
|
130
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
131
|
+
with:
|
|
132
|
+
name: github-pages-${{ github.run_attempt }}
|
|
133
|
+
path: ${{ runner.temp }}/evaluator-pages-name-retry
|
|
134
|
+
- name: Require matching ID and name readback of the exact tar
|
|
135
|
+
shell: bash
|
|
136
|
+
env:
|
|
137
|
+
EXPECTED_TAR: ${{ steps.pages-package.outputs.tar-sha256 }}
|
|
138
|
+
EXPECTED_NAME: github-pages-${{ github.run_attempt }}
|
|
139
|
+
ID_READBACK: ${{ steps.pages-id-first.outcome == 'success' && steps.pages-id-first.outputs.download-path || steps.pages-id-retry.outputs.download-path }}
|
|
140
|
+
NAME_READBACK: ${{ steps.pages-name-first.outcome == 'success' && steps.pages-name-first.outputs.download-path || steps.pages-name-retry.outputs.download-path }}
|
|
141
|
+
run: |
|
|
142
|
+
set -euo pipefail
|
|
143
|
+
[[ "$EXPECTED_TAR" =~ ^[0-9a-f]{64}$ ]]
|
|
144
|
+
test -n "$ID_READBACK"
|
|
145
|
+
test -n "$NAME_READBACK"
|
|
146
|
+
for path in "$ID_READBACK/$EXPECTED_NAME" "$NAME_READBACK"; do
|
|
147
|
+
test -f "$path/artifact.tar"
|
|
148
|
+
digest=$(sha256sum "$path/artifact.tar")
|
|
149
|
+
test "${digest%% *}" = "$EXPECTED_TAR"
|
|
150
|
+
done
|
|
151
|
+
- name: Require current main inside deployment lock
|
|
152
|
+
env:
|
|
153
|
+
GH_TOKEN: ${{ github.token }}
|
|
154
|
+
CANDIDATE: ${{ github.sha }}
|
|
155
|
+
run: |
|
|
156
|
+
set -euo pipefail
|
|
157
|
+
current=$(gh api repos/Living-Proof-Labs/livingproof-evaluator/git/ref/heads/main --jq .object.sha)
|
|
158
|
+
test "$current" = "$CANDIDATE"
|
|
159
|
+
- name: Deploy verified manual
|
|
160
|
+
id: deployment
|
|
161
|
+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
|
|
162
|
+
with:
|
|
163
|
+
artifact_name: github-pages-${{ github.run_attempt }}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Queue Evaluator PyPI publication
|
|
3
|
+
run-name: >-
|
|
4
|
+
Evaluator PyPI handoff @ ${{ github.event.workflow_run.head_sha }}
|
|
5
|
+
(Verify ${{ github.event.workflow_run.id }} attempt ${{ github.event.workflow_run.run_attempt }})
|
|
6
|
+
on:
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: [Verify]
|
|
9
|
+
types: [completed]
|
|
10
|
+
branches: [main]
|
|
11
|
+
permissions: {}
|
|
12
|
+
jobs:
|
|
13
|
+
identify:
|
|
14
|
+
if: >-
|
|
15
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
16
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
17
|
+
github.event.workflow_run.path == '.github/workflows/verify.yml' &&
|
|
18
|
+
github.event.workflow_run.event == 'push' &&
|
|
19
|
+
github.event.workflow_run.head_branch == 'main' &&
|
|
20
|
+
github.event.workflow_run.head_repository.full_name == github.repository &&
|
|
21
|
+
github.event.workflow_run.head_repository.id == github.event.repository.id &&
|
|
22
|
+
github.event.workflow_run.conclusion == 'success'
|
|
23
|
+
runs-on: ubuntu-24.04
|
|
24
|
+
timeout-minutes: 5
|
|
25
|
+
permissions:
|
|
26
|
+
actions: read
|
|
27
|
+
contents: read
|
|
28
|
+
outputs:
|
|
29
|
+
tag: ${{ steps.release.outputs.tag }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
fetch-tags: true
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
- name: Identify the exact published Evaluator release
|
|
37
|
+
id: release
|
|
38
|
+
env:
|
|
39
|
+
GH_TOKEN: ${{ github.token }}
|
|
40
|
+
SOURCE_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
41
|
+
VERIFY_RUN_ID: ${{ github.event.workflow_run.id }}
|
|
42
|
+
VERIFY_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
|
|
43
|
+
run: python3 tools/pypi_handoff.py discover
|
|
44
|
+
|
|
45
|
+
dispatch:
|
|
46
|
+
needs: identify
|
|
47
|
+
if: needs.identify.outputs.tag != ''
|
|
48
|
+
runs-on: ubuntu-24.04
|
|
49
|
+
timeout-minutes: 5
|
|
50
|
+
permissions:
|
|
51
|
+
actions: write
|
|
52
|
+
contents: read
|
|
53
|
+
concurrency:
|
|
54
|
+
group: evaluator-pypi-dispatch-${{ needs.identify.outputs.tag }}
|
|
55
|
+
cancel-in-progress: false
|
|
56
|
+
steps:
|
|
57
|
+
- uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/dispatch-pypi@a150200fe5296e3f2e7fa8ba4eb6628b0858f34b # v9.14.2
|
|
58
|
+
with:
|
|
59
|
+
tag: ${{ needs.identify.outputs.tag }}
|
|
60
|
+
source-sha: ${{ github.event.workflow_run.head_sha }}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Repository manual
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
version: {type: string, required: true}
|
|
7
|
+
commit: {type: string, required: true}
|
|
8
|
+
run: {type: string, required: true}
|
|
9
|
+
attempt: {type: string, required: true}
|
|
10
|
+
demo-reports-artifact:
|
|
11
|
+
description: >-
|
|
12
|
+
This run's verification report artifact from the mock evaluators (#98).
|
|
13
|
+
Empty (a replay) builds the manual without the demo reports site.
|
|
14
|
+
type: string
|
|
15
|
+
required: false
|
|
16
|
+
default: ''
|
|
17
|
+
outputs:
|
|
18
|
+
artifact-id:
|
|
19
|
+
value: ${{ jobs.build.outputs.artifact-id }}
|
|
20
|
+
digest:
|
|
21
|
+
value: ${{ jobs.build.outputs.digest }}
|
|
22
|
+
attempt:
|
|
23
|
+
value: ${{ jobs.build.outputs.attempt }}
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
runs-on: ubuntu-24.04
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
outputs:
|
|
32
|
+
artifact-id: ${{ steps.sealed.outputs.artifact-id }}
|
|
33
|
+
digest: ${{ steps.seal.outputs.digest }}
|
|
34
|
+
attempt: ${{ steps.seal.outputs.attempt }}
|
|
35
|
+
env:
|
|
36
|
+
MANUAL_VERSION: ${{ inputs.version }}
|
|
37
|
+
PLAN_COMMIT: ${{ inputs.commit }}
|
|
38
|
+
PLAN_RUN: ${{ inputs.run }}
|
|
39
|
+
PLAN_ATTEMPT: ${{ inputs.attempt }}
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
42
|
+
with:
|
|
43
|
+
ref: ${{ inputs.commit }}
|
|
44
|
+
persist-credentials: false
|
|
45
|
+
- name: Require the exact planned source and build identity
|
|
46
|
+
env:
|
|
47
|
+
EXPECTED_SOURCE: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
48
|
+
PR_BASE: ${{ github.base_ref }}
|
|
49
|
+
run: |
|
|
50
|
+
set -euo pipefail
|
|
51
|
+
test "$(git rev-parse HEAD)" = "$PLAN_COMMIT"
|
|
52
|
+
test "$PLAN_COMMIT" = "$EXPECTED_SOURCE"
|
|
53
|
+
test "$PLAN_RUN" = "$GITHUB_RUN_ID"
|
|
54
|
+
test "$PLAN_ATTEMPT" = "$GITHUB_RUN_ATTEMPT"
|
|
55
|
+
if [[ "$GITHUB_EVENT_NAME" != 'pull_request' || "$PR_BASE" == 'main' ]]; then
|
|
56
|
+
test -n "$MANUAL_VERSION"
|
|
57
|
+
fi
|
|
58
|
+
- name: Require the existing immutable stable release before rebuilding
|
|
59
|
+
if: github.event_name == 'workflow_dispatch'
|
|
60
|
+
env:
|
|
61
|
+
GH_TOKEN: ${{ github.token }}
|
|
62
|
+
REPLAY_TAG: ${{ github.event.inputs.replay_tag }}
|
|
63
|
+
run: |
|
|
64
|
+
set -euo pipefail
|
|
65
|
+
[[ "$MANUAL_VERSION" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
|
|
66
|
+
test "$REPLAY_TAG" = "v$MANUAL_VERSION"
|
|
67
|
+
gh api "repos/$GITHUB_REPOSITORY/releases/tags/$REPLAY_TAG" |
|
|
68
|
+
python3 tools/manual/delivery.py published "$REPLAY_TAG"
|
|
69
|
+
- uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e
|
|
70
|
+
with:
|
|
71
|
+
version: '3.54.0'
|
|
72
|
+
# No published tooling image: use the documented prepared-host fallback.
|
|
73
|
+
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86
|
|
74
|
+
with:
|
|
75
|
+
python-version: '3.12'
|
|
76
|
+
- run: task manual:setup
|
|
77
|
+
- run: .venv-docs/bin/python -m playwright install --with-deps chromium
|
|
78
|
+
- run: task manual:build
|
|
79
|
+
- run: task manual:verify
|
|
80
|
+
# Demo data from mock evaluators (#98). Built after the manual checks, which cover
|
|
81
|
+
# only the manual's own pages, and sealed with the manual. A pull request builds it
|
|
82
|
+
# as a check; only the released main push deploys the sealed manual.
|
|
83
|
+
- name: Download the demo verification report
|
|
84
|
+
if: inputs.demo-reports-artifact != ''
|
|
85
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
86
|
+
with:
|
|
87
|
+
name: ${{ inputs.demo-reports-artifact }}
|
|
88
|
+
path: artifacts/demo-runs
|
|
89
|
+
- name: Build the demo reports site with the released Reports Action
|
|
90
|
+
if: inputs.demo-reports-artifact != ''
|
|
91
|
+
uses: Living-Proof-Labs/verification-reports-action/site@d3fee55f1690861c5f66077956cff5d473b2c011 # v5.0.0
|
|
92
|
+
with:
|
|
93
|
+
runs-dir: artifacts/demo-runs
|
|
94
|
+
output-dir: artifacts/manual/html/demo-reports
|
|
95
|
+
reset-history: 'true'
|
|
96
|
+
upload-artifact: 'false'
|
|
97
|
+
- name: Publish individual manual checks
|
|
98
|
+
id: tests
|
|
99
|
+
if: ${{ !cancelled() }}
|
|
100
|
+
uses: dorny/test-reporter@8861569aa5348397e7a26b6dda744c17c9265478
|
|
101
|
+
with:
|
|
102
|
+
name: Repository manual checks
|
|
103
|
+
path: artifacts/manual/tests.xml
|
|
104
|
+
reporter: java-junit
|
|
105
|
+
use-actions-summary: 'true'
|
|
106
|
+
list-tests: all
|
|
107
|
+
fail-on-error: 'true'
|
|
108
|
+
fail-on-empty: 'true'
|
|
109
|
+
- name: Retain manual and diagnostics
|
|
110
|
+
id: artifact
|
|
111
|
+
if: ${{ !cancelled() }}
|
|
112
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
113
|
+
with:
|
|
114
|
+
name: repository-manual-${{ github.run_attempt }}-${{ inputs.version || 'development' }}
|
|
115
|
+
path: artifacts/manual/
|
|
116
|
+
retention-days: 14
|
|
117
|
+
if-no-files-found: error
|
|
118
|
+
- name: Verify complete test publication
|
|
119
|
+
if: ${{ !cancelled() }}
|
|
120
|
+
env:
|
|
121
|
+
PASSED: ${{ steps.tests.outputs.passed }}
|
|
122
|
+
FAILED: ${{ steps.tests.outputs.failed }}
|
|
123
|
+
SKIPPED: ${{ steps.tests.outputs.skipped }}
|
|
124
|
+
ARTIFACT_URL: ${{ steps.artifact.outputs.artifact-url }}
|
|
125
|
+
run: |
|
|
126
|
+
for count in "$PASSED" "$FAILED" "$SKIPPED"; do [[ $count =~ ^[0-9]+$ ]]; done
|
|
127
|
+
emitted=$(grep -o '<testcase[[:space:]>]' artifacts/manual/tests.xml | wc -l)
|
|
128
|
+
ingested=$((PASSED + FAILED + SKIPPED))
|
|
129
|
+
echo "Individual cases: $ingested ingested / $emitted emitted" >> "$GITHUB_STEP_SUMMARY"
|
|
130
|
+
echo "Manual and diagnostics (14 days): $ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
|
|
131
|
+
test "$emitted" -gt 0
|
|
132
|
+
test "$emitted" -eq "$ingested"
|
|
133
|
+
- name: Seal the exact tested manual
|
|
134
|
+
id: seal
|
|
135
|
+
if: inputs.version != ''
|
|
136
|
+
run: |
|
|
137
|
+
set -euo pipefail
|
|
138
|
+
cd artifacts/manual/html
|
|
139
|
+
test -f index.html
|
|
140
|
+
test -z "$(find . ! -type f ! -type d -print -quit)"
|
|
141
|
+
python3 ../../../tools/manual/delivery.py seal build.json "$MANUAL_VERSION" \
|
|
142
|
+
"$PLAN_COMMIT" "$PLAN_RUN" "$PLAN_ATTEMPT"
|
|
143
|
+
tar --dereference --hard-dereference -cf "$RUNNER_TEMP/artifact.tar" .
|
|
144
|
+
digest=$(sha256sum "$RUNNER_TEMP/artifact.tar")
|
|
145
|
+
echo "digest=${digest%% *}" >> "$GITHUB_OUTPUT"
|
|
146
|
+
echo "attempt=$PLAN_ATTEMPT" >> "$GITHUB_OUTPUT"
|
|
147
|
+
- name: Retain the sealed manual for this run
|
|
148
|
+
id: sealed
|
|
149
|
+
if: inputs.version != ''
|
|
150
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
151
|
+
with:
|
|
152
|
+
name: evaluator-sealed-${{ github.run_attempt }}-${{ inputs.version }}
|
|
153
|
+
path: ${{ runner.temp }}/artifact.tar
|
|
154
|
+
retention-days: 14
|
|
155
|
+
if-no-files-found: error
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Publish verified Evaluator distributions to PyPI
|
|
3
|
+
run-name: PyPI ${{ inputs.release_tag }} @ ${{ inputs.source_sha }}
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
release_tag:
|
|
8
|
+
description: Existing immutable Evaluator GitHub release tag
|
|
9
|
+
required: true
|
|
10
|
+
type: string
|
|
11
|
+
source_sha:
|
|
12
|
+
description: Exact protected-main release commit
|
|
13
|
+
required: true
|
|
14
|
+
type: string
|
|
15
|
+
release_run_id:
|
|
16
|
+
description: Same-repository automatic handoff run ID
|
|
17
|
+
required: true
|
|
18
|
+
type: string
|
|
19
|
+
permissions: {}
|
|
20
|
+
jobs:
|
|
21
|
+
prepare:
|
|
22
|
+
if: >-
|
|
23
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
24
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
25
|
+
github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]'
|
|
26
|
+
runs-on: ubuntu-24.04
|
|
27
|
+
timeout-minutes: 10
|
|
28
|
+
permissions:
|
|
29
|
+
actions: read
|
|
30
|
+
contents: read
|
|
31
|
+
outputs:
|
|
32
|
+
artifact-id: ${{ steps.retain.outputs.artifact-id }}
|
|
33
|
+
checksums: ${{ steps.stage.outputs.checksums }}
|
|
34
|
+
env:
|
|
35
|
+
TAG: ${{ inputs.release_tag }}
|
|
36
|
+
SOURCE_SHA: ${{ inputs.source_sha }}
|
|
37
|
+
RELEASE_RUN_ID: ${{ inputs.release_run_id }}
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
40
|
+
with:
|
|
41
|
+
fetch-depth: 0
|
|
42
|
+
fetch-tags: true
|
|
43
|
+
persist-credentials: false
|
|
44
|
+
- name: Authenticate exact terminal release and download original distributions
|
|
45
|
+
env:
|
|
46
|
+
GH_TOKEN: ${{ github.token }}
|
|
47
|
+
run: |
|
|
48
|
+
python3 tools/pypi_handoff.py authenticate --record "$RUNNER_TEMP/evaluator-release.json"
|
|
49
|
+
version="${TAG#v}"
|
|
50
|
+
gh release download "$TAG" --repo "$GITHUB_REPOSITORY" \
|
|
51
|
+
--pattern "livingproof_evaluator-${version}-py3-none-any.whl" \
|
|
52
|
+
--pattern "livingproof_evaluator-${version}.tar.gz" \
|
|
53
|
+
--pattern SHA256SUMS --dir "$RUNNER_TEMP/evaluator-release"
|
|
54
|
+
git switch --detach "$SOURCE_SHA"
|
|
55
|
+
- name: Stage only byte-identical distributions from the tagged source
|
|
56
|
+
id: stage
|
|
57
|
+
run: |
|
|
58
|
+
python3 tools/pypi_handoff.py stage --record "$RUNNER_TEMP/evaluator-release.json" \
|
|
59
|
+
--downloads "$RUNNER_TEMP/evaluator-release" --output pypi-dist
|
|
60
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
|
|
61
|
+
with:
|
|
62
|
+
python-version: '3.12'
|
|
63
|
+
version: '0.13.10'
|
|
64
|
+
- name: Strict metadata and fresh installs from both staged distributions
|
|
65
|
+
run: |
|
|
66
|
+
uvx --no-config --index-url https://pypi.org/simple --from twine==7.0.0 \
|
|
67
|
+
--with packaging==26.2 twine check --strict pypi-dist/*
|
|
68
|
+
for extension in whl tar.gz; do
|
|
69
|
+
venv="$RUNNER_TEMP/evaluator-${extension}"
|
|
70
|
+
uv --no-config venv --python 3.12 --no-python-downloads "$venv"
|
|
71
|
+
uv --no-config --no-cache pip install --python "$venv/bin/python" \
|
|
72
|
+
--index-url https://pypi.org/simple pypi-dist/*."$extension"
|
|
73
|
+
uv --no-config pip check --python "$venv/bin/python"
|
|
74
|
+
export VERSION="${TAG#v}"
|
|
75
|
+
(
|
|
76
|
+
cd "$RUNNER_TEMP"
|
|
77
|
+
"$venv/bin/python" -I -c '
|
|
78
|
+
import os
|
|
79
|
+
from importlib.metadata import distribution
|
|
80
|
+
from livingproof_evaluator_schema import SCHEMA_ROOT
|
|
81
|
+
from livingproof_evaluator_mock import __main__ as mock
|
|
82
|
+
dist = distribution("livingproof-evaluator")
|
|
83
|
+
assert dist.version == os.environ["VERSION"] and not dist.requires
|
|
84
|
+
assert SCHEMA_ROOT.is_dir() and any(SCHEMA_ROOT.glob("*.json"))
|
|
85
|
+
assert mock.LABEL == "Demo data from mock evaluators."
|
|
86
|
+
'
|
|
87
|
+
)
|
|
88
|
+
done
|
|
89
|
+
- name: Retain only verified Python distributions
|
|
90
|
+
id: retain
|
|
91
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
92
|
+
with:
|
|
93
|
+
name: evaluator-pypi-distributions-${{ github.run_attempt }}
|
|
94
|
+
path: pypi-dist/
|
|
95
|
+
if-no-files-found: error
|
|
96
|
+
retention-days: 14
|
|
97
|
+
|
|
98
|
+
publish:
|
|
99
|
+
needs: prepare
|
|
100
|
+
if: >-
|
|
101
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
102
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
103
|
+
github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]'
|
|
104
|
+
runs-on: ubuntu-24.04
|
|
105
|
+
timeout-minutes: 10
|
|
106
|
+
environment: pypi
|
|
107
|
+
permissions:
|
|
108
|
+
id-token: write
|
|
109
|
+
concurrency:
|
|
110
|
+
group: evaluator-pypi-${{ inputs.source_sha }}
|
|
111
|
+
cancel-in-progress: false
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
114
|
+
with:
|
|
115
|
+
artifact-ids: ${{ needs.prepare.outputs.artifact-id }}
|
|
116
|
+
path: pypi-dist/
|
|
117
|
+
merge-multiple: true
|
|
118
|
+
- name: Recheck the original bytes after artifact transfer
|
|
119
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/verify-pypi@a150200fe5296e3f2e7fa8ba4eb6628b0858f34b # v9.14.2
|
|
120
|
+
with:
|
|
121
|
+
checksums: ${{ needs.prepare.outputs.checksums }}
|
|
122
|
+
- name: Publish the tested original bytes using Trusted Publishing
|
|
123
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
124
|
+
with:
|
|
125
|
+
packages-dir: pypi-dist/
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Release
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
outputs:
|
|
6
|
+
published:
|
|
7
|
+
value: ${{ jobs.publish.outputs.published }}
|
|
8
|
+
git-tag:
|
|
9
|
+
value: ${{ jobs.release.outputs.git-tag }}
|
|
10
|
+
version:
|
|
11
|
+
value: ${{ jobs.release.outputs.version }}
|
|
12
|
+
commit:
|
|
13
|
+
value: ${{ jobs.release.outputs.commit }}
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
jobs:
|
|
17
|
+
current-main:
|
|
18
|
+
if: >-
|
|
19
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
20
|
+
github.event_name == 'push' &&
|
|
21
|
+
github.ref == 'refs/heads/main' &&
|
|
22
|
+
github.ref_protected
|
|
23
|
+
runs-on: ubuntu-24.04
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
steps:
|
|
27
|
+
- name: Require current main before the release writer
|
|
28
|
+
env:
|
|
29
|
+
GH_TOKEN: ${{ github.token }}
|
|
30
|
+
CANDIDATE: ${{ github.sha }}
|
|
31
|
+
run: |
|
|
32
|
+
set -euo pipefail
|
|
33
|
+
current=$(gh api repos/Living-Proof-Labs/livingproof-evaluator/git/ref/heads/main --jq .object.sha)
|
|
34
|
+
test "$current" = "$CANDIDATE"
|
|
35
|
+
release:
|
|
36
|
+
needs: current-main
|
|
37
|
+
if: >-
|
|
38
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
39
|
+
github.event_name == 'push' &&
|
|
40
|
+
github.ref == 'refs/heads/main' &&
|
|
41
|
+
github.ref_protected
|
|
42
|
+
permissions:
|
|
43
|
+
contents: write
|
|
44
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/workflows/semantic-release.yml@a150200fe5296e3f2e7fa8ba4eb6628b0858f34b # v9.14.2
|
|
45
|
+
with:
|
|
46
|
+
draft-release: true
|
|
47
|
+
package:
|
|
48
|
+
needs: release
|
|
49
|
+
if: >-
|
|
50
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
51
|
+
github.event_name == 'push' &&
|
|
52
|
+
github.ref == 'refs/heads/main' &&
|
|
53
|
+
github.ref_protected &&
|
|
54
|
+
needs.release.outputs.draft-created == 'true' &&
|
|
55
|
+
needs.release.outputs.git-tag == format('v{0}', needs.release.outputs.version) &&
|
|
56
|
+
needs.release.outputs.commit == github.sha
|
|
57
|
+
runs-on: ubuntu-24.04
|
|
58
|
+
timeout-minutes: 10
|
|
59
|
+
permissions:
|
|
60
|
+
contents: read
|
|
61
|
+
outputs:
|
|
62
|
+
artifact-id: ${{ steps.assets.outputs.artifact-id }}
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
65
|
+
with:
|
|
66
|
+
ref: ${{ needs.release.outputs.git-tag }}
|
|
67
|
+
fetch-depth: 0
|
|
68
|
+
persist-credentials: false
|
|
69
|
+
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
|
|
70
|
+
with:
|
|
71
|
+
python-version: '3.12'
|
|
72
|
+
- uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0
|
|
73
|
+
with:
|
|
74
|
+
version: '3.54.0'
|
|
75
|
+
- name: Build and verify the exact tagged evaluator distributions
|
|
76
|
+
env:
|
|
77
|
+
RELEASE_TAG: ${{ needs.release.outputs.git-tag }}
|
|
78
|
+
RELEASE_COMMIT: ${{ needs.release.outputs.commit }}
|
|
79
|
+
run: task package:release
|
|
80
|
+
- id: assets
|
|
81
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
82
|
+
with:
|
|
83
|
+
name: exact-evaluator-release-${{ github.run_attempt }}
|
|
84
|
+
path: dist/
|
|
85
|
+
if-no-files-found: error
|
|
86
|
+
retention-days: 14
|
|
87
|
+
publish:
|
|
88
|
+
needs: [release, package]
|
|
89
|
+
if: >-
|
|
90
|
+
github.repository == 'Living-Proof-Labs/livingproof-evaluator' &&
|
|
91
|
+
github.event_name == 'push' &&
|
|
92
|
+
github.ref == 'refs/heads/main' &&
|
|
93
|
+
github.ref_protected &&
|
|
94
|
+
needs.package.result == 'success' &&
|
|
95
|
+
needs.release.outputs.commit == github.sha &&
|
|
96
|
+
needs.package.outputs.artifact-id != ''
|
|
97
|
+
runs-on: ubuntu-24.04
|
|
98
|
+
timeout-minutes: 10
|
|
99
|
+
permissions:
|
|
100
|
+
contents: write
|
|
101
|
+
outputs:
|
|
102
|
+
published: ${{ steps.complete.outputs.published }}
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
105
|
+
with:
|
|
106
|
+
artifact-ids: ${{ needs.package.outputs.artifact-id }}
|
|
107
|
+
path: dist/
|
|
108
|
+
merge-multiple: true
|
|
109
|
+
- name: Check wheel and source checksums
|
|
110
|
+
working-directory: dist
|
|
111
|
+
run: sha256sum --strict -c SHA256SUMS
|
|
112
|
+
- name: Attach assets, publish draft release, and verify public downloads
|
|
113
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/publish-draft-release@a150200fe5296e3f2e7fa8ba4eb6628b0858f34b # v9.14.2
|
|
114
|
+
with:
|
|
115
|
+
asset-policy: strict
|
|
116
|
+
tag: ${{ needs.release.outputs.git-tag }}
|
|
117
|
+
assets: |
|
|
118
|
+
dist/*.whl
|
|
119
|
+
dist/*.tar.gz
|
|
120
|
+
dist/SHA256SUMS
|
|
121
|
+
- id: complete
|
|
122
|
+
run: echo 'published=true' >> "$GITHUB_OUTPUT"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Retry published evaluator manual
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
replay_tag:
|
|
7
|
+
description: Existing published stable tag at current main, for Pages delivery only
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
jobs:
|
|
13
|
+
version:
|
|
14
|
+
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/workflows/semantic-release-candidate.yml@a150200fe5296e3f2e7fa8ba4eb6628b0858f34b # v9.14.2
|
|
18
|
+
with:
|
|
19
|
+
replay-tag: ${{ inputs.replay_tag }}
|
|
20
|
+
manual:
|
|
21
|
+
needs: version
|
|
22
|
+
if: >-
|
|
23
|
+
github.event_name == 'workflow_dispatch' &&
|
|
24
|
+
github.ref == 'refs/heads/main' &&
|
|
25
|
+
inputs.replay_tag == format('v{0}', needs.version.outputs.semver-version) &&
|
|
26
|
+
needs.version.outputs.commit == github.sha &&
|
|
27
|
+
needs.version.outputs.run-id == github.run_id &&
|
|
28
|
+
needs.version.outputs.run-attempt == github.run_attempt
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
uses: ./.github/workflows/manual.yml
|
|
32
|
+
with:
|
|
33
|
+
version: ${{ needs.version.outputs.semver-version }}
|
|
34
|
+
commit: ${{ needs.version.outputs.commit }}
|
|
35
|
+
run: ${{ needs.version.outputs.run-id }}
|
|
36
|
+
attempt: ${{ needs.version.outputs.run-attempt }}
|
|
37
|
+
deploy-manual:
|
|
38
|
+
needs: [version, manual]
|
|
39
|
+
if: >-
|
|
40
|
+
github.event_name == 'workflow_dispatch' &&
|
|
41
|
+
github.ref == 'refs/heads/main' &&
|
|
42
|
+
inputs.replay_tag == format('v{0}', needs.version.outputs.semver-version) &&
|
|
43
|
+
needs.version.outputs.commit == github.sha &&
|
|
44
|
+
needs.version.outputs.run-id == github.run_id &&
|
|
45
|
+
needs.version.outputs.run-attempt == github.run_attempt &&
|
|
46
|
+
needs.manual.outputs.artifact-id != '' &&
|
|
47
|
+
needs.manual.outputs.digest != ''
|
|
48
|
+
permissions:
|
|
49
|
+
contents: read
|
|
50
|
+
pages: write
|
|
51
|
+
id-token: write
|
|
52
|
+
uses: ./.github/workflows/deploy-manual.yml
|
|
53
|
+
with:
|
|
54
|
+
release_tag: ${{ inputs.replay_tag }}
|
|
55
|
+
version: ${{ needs.version.outputs.semver-version }}
|
|
56
|
+
commit: ${{ needs.version.outputs.commit }}
|
|
57
|
+
run: ${{ needs.version.outputs.run-id }}
|
|
58
|
+
attempt: ${{ needs.version.outputs.run-attempt }}
|
|
59
|
+
artifact_id: ${{ needs.manual.outputs.artifact-id }}
|
|
60
|
+
digest: ${{ needs.manual.outputs.digest }}
|