livingproof-unitree-go1 2.4.0__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_unitree_go1-2.4.0/.git_archival.txt +3 -0
- livingproof_unitree_go1-2.4.0/.gitattributes +3 -0
- livingproof_unitree_go1-2.4.0/.github/workflows/dispatch-pypi.yml +59 -0
- livingproof_unitree_go1-2.4.0/.github/workflows/docs.yml +201 -0
- livingproof_unitree_go1-2.4.0/.github/workflows/publish-pypi.yml +112 -0
- livingproof_unitree_go1-2.4.0/.github/workflows/release.yml +162 -0
- livingproof_unitree_go1-2.4.0/.github/workflows/test.yml +47 -0
- livingproof_unitree_go1-2.4.0/.gitignore +10 -0
- livingproof_unitree_go1-2.4.0/LICENSE +201 -0
- livingproof_unitree_go1-2.4.0/PKG-INFO +92 -0
- livingproof_unitree_go1-2.4.0/README.md +76 -0
- livingproof_unitree_go1-2.4.0/Taskfile.yml +12 -0
- livingproof_unitree_go1-2.4.0/configurations/playground.json +225 -0
- livingproof_unitree_go1-2.4.0/docs/contribute.md +21 -0
- livingproof_unitree_go1-2.4.0/docs/index.md +18 -0
- livingproof_unitree_go1-2.4.0/docs/verification.md +53 -0
- livingproof_unitree_go1-2.4.0/docs-brand.lock.json +7 -0
- livingproof_unitree_go1-2.4.0/manifest.json +203 -0
- livingproof_unitree_go1-2.4.0/pins.json +114 -0
- livingproof_unitree_go1-2.4.0/pyproject.toml +58 -0
- livingproof_unitree_go1-2.4.0/renovate.json +24 -0
- livingproof_unitree_go1-2.4.0/robot.json +51 -0
- livingproof_unitree_go1-2.4.0/runner.json +13 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/__init__.py +20 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/adapter.py +112 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/measure.py +22 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/playground_reference.py +208 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/prepare.py +100 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/profiles.py +174 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/route.py +94 -0
- livingproof_unitree_go1-2.4.0/src/lpl_go1/scene.py +57 -0
- livingproof_unitree_go1-2.4.0/tests/conftest.py +12 -0
- livingproof_unitree_go1-2.4.0/tests/data/playground-reference-100.npz +0 -0
- livingproof_unitree_go1-2.4.0/tests/data/reuse/left.json +229 -0
- livingproof_unitree_go1-2.4.0/tests/data/reuse/release.json +15 -0
- livingproof_unitree_go1-2.4.0/tests/data/reuse/right.json +229 -0
- livingproof_unitree_go1-2.4.0/tests/data/reuse/sources.json +30 -0
- livingproof_unitree_go1-2.4.0/tests/data/reuse/world.json +270 -0
- livingproof_unitree_go1-2.4.0/tests/declared_sources.py +34 -0
- livingproof_unitree_go1-2.4.0/tests/test_chain.py +82 -0
- livingproof_unitree_go1-2.4.0/tests/test_deploy_freshness_auth.py +538 -0
- livingproof_unitree_go1-2.4.0/tests/test_docs_brand_lock.py +146 -0
- livingproof_unitree_go1-2.4.0/tests/test_driven_scenario_review.py +115 -0
- livingproof_unitree_go1-2.4.0/tests/test_guidelines_pins.py +397 -0
- livingproof_unitree_go1-2.4.0/tests/test_installed_package_data.py +201 -0
- livingproof_unitree_go1-2.4.0/tests/test_merge_queue_gate.py +40 -0
- livingproof_unitree_go1-2.4.0/tests/test_missing_start_place_review.py +65 -0
- livingproof_unitree_go1-2.4.0/tests/test_numpy_python_pins.py +220 -0
- livingproof_unitree_go1-2.4.0/tests/test_package.py +290 -0
- livingproof_unitree_go1-2.4.0/tests/test_playground_exact.py +53 -0
- livingproof_unitree_go1-2.4.0/tests/test_reference_pose_platform.py +61 -0
- livingproof_unitree_go1-2.4.0/tests/test_release_archive_and_start_place.py +130 -0
- livingproof_unitree_go1-2.4.0/tests/test_release_gate.py +394 -0
- livingproof_unitree_go1-2.4.0/tests/test_release_gate_race.py +1342 -0
- livingproof_unitree_go1-2.4.0/tests/test_release_version_build_review.py +79 -0
- livingproof_unitree_go1-2.4.0/tests/test_route_drive.py +162 -0
- livingproof_unitree_go1-2.4.0/tests/test_scenario_neutral.py +134 -0
- livingproof_unitree_go1-2.4.0/tests/test_scenario_neutral_variants.py +130 -0
- livingproof_unitree_go1-2.4.0/tests/test_scene_contract.py +57 -0
- livingproof_unitree_go1-2.4.0/tests/test_shared_traversals.py +192 -0
- livingproof_unitree_go1-2.4.0/tests/test_sim_mujoco_v3_pin.py +56 -0
- livingproof_unitree_go1-2.4.0/tests/test_sim_v3.py +74 -0
- livingproof_unitree_go1-2.4.0/tests/test_supported_scenarios.py +128 -0
- livingproof_unitree_go1-2.4.0/tests/test_task_references.py +30 -0
- livingproof_unitree_go1-2.4.0/tests/test_workflow_least_privilege.py +61 -0
- livingproof_unitree_go1-2.4.0/tools/check_python_distributions.sh +63 -0
- livingproof_unitree_go1-2.4.0/tools/docs/build.py +186 -0
- livingproof_unitree_go1-2.4.0/tools/docs/check.py +175 -0
- livingproof_unitree_go1-2.4.0/tools/docs/mkdocs.yml +35 -0
- livingproof_unitree_go1-2.4.0/tools/docs/release_identity.py +145 -0
- livingproof_unitree_go1-2.4.0/tools/docs/requirements.in +1 -0
- livingproof_unitree_go1-2.4.0/tools/docs/requirements.lock +340 -0
- livingproof_unitree_go1-2.4.0/tools/docs/test_identity.py +42 -0
- livingproof_unitree_go1-2.4.0/tools/docs/test_pages_delivery.py +319 -0
- livingproof_unitree_go1-2.4.0/tools/docs/test_release_asset_set.py +75 -0
- livingproof_unitree_go1-2.4.0/tools/docs/test_release_identity.py +192 -0
- livingproof_unitree_go1-2.4.0/uv.lock +1149 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Queue Go1 PyPI publication
|
|
3
|
+
run-name: >-
|
|
4
|
+
PyPI relay ${{ github.event.workflow_run.head_sha }}
|
|
5
|
+
(Release ${{ github.event.workflow_run.id }}:${{ github.event.workflow_run.run_attempt }})
|
|
6
|
+
on:
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: [Release]
|
|
9
|
+
types: [completed]
|
|
10
|
+
branches: [main]
|
|
11
|
+
permissions: {}
|
|
12
|
+
jobs:
|
|
13
|
+
identify:
|
|
14
|
+
if: >-
|
|
15
|
+
github.repository == 'Living-Proof-Labs/livingproof-unitree-go1' &&
|
|
16
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
17
|
+
github.event.action == 'completed' &&
|
|
18
|
+
github.event.workflow_run.path == '.github/workflows/release.yml' &&
|
|
19
|
+
github.event.workflow_run.event == 'workflow_run' &&
|
|
20
|
+
github.event.workflow_run.head_branch == 'main' &&
|
|
21
|
+
github.event.workflow_run.head_repository.full_name == github.repository &&
|
|
22
|
+
github.event.workflow_run.head_repository.id == github.event.repository.id &&
|
|
23
|
+
contains(fromJSON('["success","failure"]'), github.event.workflow_run.conclusion)
|
|
24
|
+
runs-on: ubuntu-24.04
|
|
25
|
+
timeout-minutes: 5
|
|
26
|
+
permissions:
|
|
27
|
+
actions: read
|
|
28
|
+
contents: read
|
|
29
|
+
outputs:
|
|
30
|
+
tag: ${{ steps.proof.outputs.tag }}
|
|
31
|
+
source-sha: ${{ steps.proof.outputs.source-sha }}
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
- name: Authenticate the original Test and Release attempts
|
|
38
|
+
id: proof
|
|
39
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/split-pypi-proof@66bdb686e0103c3357a579f2e002b17853cf8a87 # v9.18.0
|
|
40
|
+
with:
|
|
41
|
+
mode: discover
|
|
42
|
+
distribution: livingproof-unitree-go1
|
|
43
|
+
queue:
|
|
44
|
+
needs: identify
|
|
45
|
+
if: needs.identify.outputs.tag != '' && needs.identify.outputs.source-sha == github.event.workflow_run.head_sha
|
|
46
|
+
runs-on: ubuntu-24.04
|
|
47
|
+
timeout-minutes: 5
|
|
48
|
+
permissions:
|
|
49
|
+
actions: write
|
|
50
|
+
contents: read
|
|
51
|
+
concurrency:
|
|
52
|
+
group: go1-queue-pypi-${{ needs.identify.outputs.tag }}
|
|
53
|
+
cancel-in-progress: false
|
|
54
|
+
steps:
|
|
55
|
+
- uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/dispatch-pypi@8fcc5d80015e27a71d4ee29740a8efc5fcddb09b # v9.17.0
|
|
56
|
+
with:
|
|
57
|
+
source-event: split-release
|
|
58
|
+
source-sha: ${{ needs.identify.outputs.source-sha }}
|
|
59
|
+
tag: ${{ needs.identify.outputs.tag }}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Documentation
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_call:
|
|
6
|
+
inputs:
|
|
7
|
+
release_tag:
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
release_version:
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
inputs:
|
|
15
|
+
release_tag:
|
|
16
|
+
description: Existing release tag (vX.Y.Z) to build and deploy
|
|
17
|
+
required: false
|
|
18
|
+
type: string
|
|
19
|
+
default: ''
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
outputs:
|
|
25
|
+
run_attempt: ${{ steps.identity.outputs.run_attempt }}
|
|
26
|
+
pages-id: ${{ steps.pages-artifact.outputs.artifact-id }}
|
|
27
|
+
pages-digest: ${{ steps.pages-package.outputs.tar-sha256 }}
|
|
28
|
+
runs-on: ubuntu-24.04
|
|
29
|
+
env:
|
|
30
|
+
RELEASE_TAG: ${{ inputs.release_tag }}
|
|
31
|
+
RELEASE_VERSION: ${{ inputs.release_version }}
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
34
|
+
with:
|
|
35
|
+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
fetch-tags: true
|
|
38
|
+
persist-credentials: false
|
|
39
|
+
- name: Verify published release and exact source identity
|
|
40
|
+
id: identity
|
|
41
|
+
env:
|
|
42
|
+
RELEASE_METADATA: ${{ runner.temp }}/unitree-release.json
|
|
43
|
+
GH_TOKEN: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && inputs.release_tag != '' && github.token || '' }}
|
|
44
|
+
run: python tools/docs/release_identity.py identity Living-Proof-Labs/livingproof-unitree-go1
|
|
45
|
+
- uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e
|
|
46
|
+
with:
|
|
47
|
+
version: '3.54.0'
|
|
48
|
+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
|
49
|
+
with:
|
|
50
|
+
python-version: '3.12.16'
|
|
51
|
+
- run: python -m pip install --require-hashes -r tools/docs/requirements.lock
|
|
52
|
+
- run: python -m unittest discover -s tools/docs -p "test_*.py"
|
|
53
|
+
- run: python tools/docs/build.py
|
|
54
|
+
env:
|
|
55
|
+
RELEASE_METADATA: ${{ runner.temp }}/unitree-release.json
|
|
56
|
+
- name: Verify tested served bytes and attempt
|
|
57
|
+
run: python tools/docs/release_identity.py verify artifacts/docs/html
|
|
58
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
59
|
+
with:
|
|
60
|
+
name: documentation-${{ steps.identity.outputs.artifact_identity }}
|
|
61
|
+
path: artifacts/docs/html
|
|
62
|
+
retention-days: 14
|
|
63
|
+
if-no-files-found: error
|
|
64
|
+
- name: Package only the tested sealed HTML
|
|
65
|
+
id: pages-package
|
|
66
|
+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && inputs.release_tag != ''
|
|
67
|
+
shell: bash
|
|
68
|
+
run: |
|
|
69
|
+
set -euo pipefail
|
|
70
|
+
python tools/docs/release_identity.py verify artifacts/docs/html
|
|
71
|
+
cd artifacts/docs/html
|
|
72
|
+
test -f index.html
|
|
73
|
+
test -z "$(find . ! -type f ! -type d -print -quit)"
|
|
74
|
+
tar --dereference --hard-dereference -cf "$RUNNER_TEMP/artifact.tar" .
|
|
75
|
+
digest=$(sha256sum "$RUNNER_TEMP/artifact.tar")
|
|
76
|
+
echo "tar-sha256=${digest%% *}" >> "$GITHUB_OUTPUT"
|
|
77
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
78
|
+
id: pages-artifact
|
|
79
|
+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && inputs.release_tag != ''
|
|
80
|
+
with:
|
|
81
|
+
name: github-pages-${{ github.run_attempt }}
|
|
82
|
+
path: ${{ runner.temp }}/artifact.tar
|
|
83
|
+
retention-days: 1
|
|
84
|
+
if-no-files-found: error
|
|
85
|
+
deploy:
|
|
86
|
+
needs: build
|
|
87
|
+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && inputs.release_tag != ''
|
|
88
|
+
runs-on: ubuntu-24.04
|
|
89
|
+
permissions:
|
|
90
|
+
contents: read
|
|
91
|
+
pages: write
|
|
92
|
+
id-token: write
|
|
93
|
+
concurrency:
|
|
94
|
+
group: go1-pages
|
|
95
|
+
cancel-in-progress: false
|
|
96
|
+
environment:
|
|
97
|
+
name: github-pages
|
|
98
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
99
|
+
steps:
|
|
100
|
+
- name: Reject retained build from an earlier attempt
|
|
101
|
+
env:
|
|
102
|
+
BUILD_ATTEMPT: ${{ needs.build.outputs.run_attempt }}
|
|
103
|
+
run: test "$BUILD_ATTEMPT" = "$GITHUB_RUN_ATTEMPT"
|
|
104
|
+
# Use the same-run Actions artifact client (like deploy-pages), not the REST index.
|
|
105
|
+
# An exact ID and name must both resolve to the sealed Pages tar before deploying.
|
|
106
|
+
- name: Require a valid Pages artifact ID
|
|
107
|
+
shell: bash
|
|
108
|
+
env:
|
|
109
|
+
UPLOADED_ID: ${{ needs.build.outputs.pages-id }}
|
|
110
|
+
run: |
|
|
111
|
+
[[ "$UPLOADED_ID" =~ ^[1-9][0-9]*$ ]]
|
|
112
|
+
- name: Read exact Pages artifact by ID
|
|
113
|
+
id: pages-id-first
|
|
114
|
+
continue-on-error: true
|
|
115
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
|
116
|
+
with:
|
|
117
|
+
artifact-ids: ${{ needs.build.outputs.pages-id }}
|
|
118
|
+
path: ${{ runner.temp }}/go1-pages-id-first
|
|
119
|
+
- name: Allow the ID lookup to settle
|
|
120
|
+
if: steps.pages-id-first.outcome == 'failure'
|
|
121
|
+
run: sleep 4
|
|
122
|
+
- name: Retry read by ID once
|
|
123
|
+
id: pages-id-retry
|
|
124
|
+
if: steps.pages-id-first.outcome == 'failure'
|
|
125
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
|
126
|
+
with:
|
|
127
|
+
artifact-ids: ${{ needs.build.outputs.pages-id }}
|
|
128
|
+
path: ${{ runner.temp }}/go1-pages-id-retry
|
|
129
|
+
- name: Read exact Pages artifact by name
|
|
130
|
+
id: pages-name-first
|
|
131
|
+
continue-on-error: true
|
|
132
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
|
133
|
+
with:
|
|
134
|
+
name: github-pages-${{ github.run_attempt }}
|
|
135
|
+
path: ${{ runner.temp }}/go1-pages-name-first
|
|
136
|
+
- name: Allow the name lookup to settle
|
|
137
|
+
if: steps.pages-name-first.outcome == 'failure'
|
|
138
|
+
run: sleep 4
|
|
139
|
+
- name: Retry read by name once
|
|
140
|
+
id: pages-name-retry
|
|
141
|
+
if: steps.pages-name-first.outcome == 'failure'
|
|
142
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
|
143
|
+
with:
|
|
144
|
+
name: github-pages-${{ github.run_attempt }}
|
|
145
|
+
path: ${{ runner.temp }}/go1-pages-name-retry
|
|
146
|
+
- name: Require matching ID and name readback of the exact tar
|
|
147
|
+
shell: bash
|
|
148
|
+
env:
|
|
149
|
+
EXPECTED_TAR: ${{ needs.build.outputs.pages-digest }}
|
|
150
|
+
EXPECTED_NAME: github-pages-${{ github.run_attempt }}
|
|
151
|
+
ID_READBACK: ${{ steps.pages-id-first.outcome == 'success' && steps.pages-id-first.outputs.download-path || steps.pages-id-retry.outputs.download-path }}
|
|
152
|
+
NAME_READBACK: ${{ steps.pages-name-first.outcome == 'success' && steps.pages-name-first.outputs.download-path || steps.pages-name-retry.outputs.download-path }}
|
|
153
|
+
run: |
|
|
154
|
+
set -euo pipefail
|
|
155
|
+
[[ "$EXPECTED_TAR" =~ ^[0-9a-f]{64}$ ]]
|
|
156
|
+
test -n "$ID_READBACK"
|
|
157
|
+
test -n "$NAME_READBACK"
|
|
158
|
+
for path in "$ID_READBACK/$EXPECTED_NAME" "$NAME_READBACK"; do
|
|
159
|
+
test -f "$path/artifact.tar"
|
|
160
|
+
digest=$(sha256sum "$path/artifact.tar")
|
|
161
|
+
test "${digest%% *}" = "$EXPECTED_TAR"
|
|
162
|
+
done
|
|
163
|
+
- name: Recheck immutable published release inside deployment lock
|
|
164
|
+
env:
|
|
165
|
+
GH_TOKEN: ${{ github.token }}
|
|
166
|
+
RELEASE_TAG: ${{ inputs.release_tag }}
|
|
167
|
+
RELEASE_VERSION: ${{ inputs.release_version }}
|
|
168
|
+
shell: bash
|
|
169
|
+
run: |
|
|
170
|
+
set -euo pipefail
|
|
171
|
+
[[ "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
|
|
172
|
+
if test "$GITHUB_EVENT_NAME" = workflow_dispatch && test -z "$RELEASE_VERSION"; then
|
|
173
|
+
RELEASE_VERSION=${RELEASE_TAG#v}
|
|
174
|
+
fi
|
|
175
|
+
test "$RELEASE_TAG" = "v$RELEASE_VERSION"
|
|
176
|
+
gh api "repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" |
|
|
177
|
+
jq -e --arg tag "$RELEASE_TAG" '.tag_name == $tag and .draft == false and
|
|
178
|
+
.prerelease == false and .immutable == true and
|
|
179
|
+
(.published_at | type == "string" and length > 0)' >/dev/null
|
|
180
|
+
object=$(gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$RELEASE_TAG" --jq '.object | [.type,.sha] | @tsv')
|
|
181
|
+
for depth in 1 2 3 4; do
|
|
182
|
+
read -r kind sha <<< "$object"
|
|
183
|
+
[[ "$sha" =~ ^[0-9a-f]{40}$ ]]
|
|
184
|
+
if test "$kind" = commit; then break; fi
|
|
185
|
+
test "$kind" = tag
|
|
186
|
+
object=$(gh api "repos/$GITHUB_REPOSITORY/git/tags/$sha" --jq '.object | [.type,.sha] | @tsv')
|
|
187
|
+
done
|
|
188
|
+
test "$kind" = commit
|
|
189
|
+
test "$sha" = "$GITHUB_SHA"
|
|
190
|
+
- name: Require current main inside deployment lock
|
|
191
|
+
env:
|
|
192
|
+
GH_TOKEN: ${{ github.token }}
|
|
193
|
+
CANDIDATE: ${{ github.sha }}
|
|
194
|
+
run: |
|
|
195
|
+
current=$(gh api repos/Living-Proof-Labs/livingproof-unitree-go1/git/ref/heads/main --jq .object.sha)
|
|
196
|
+
test "$current" = "$CANDIDATE"
|
|
197
|
+
- name: Deploy verified manual
|
|
198
|
+
id: deployment
|
|
199
|
+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
|
|
200
|
+
with:
|
|
201
|
+
artifact_name: github-pages-${{ github.run_attempt }}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Publish verified Go1 distributions to PyPI
|
|
3
|
+
run-name: PyPI ${{ inputs.release_tag }} @ ${{ inputs.source_sha }}
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
release_tag:
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
source_sha:
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
release_run_id:
|
|
14
|
+
description: Canonical same-repository relay run
|
|
15
|
+
required: true
|
|
16
|
+
type: string
|
|
17
|
+
permissions: {}
|
|
18
|
+
jobs:
|
|
19
|
+
prepare:
|
|
20
|
+
if: >-
|
|
21
|
+
github.repository == 'Living-Proof-Labs/livingproof-unitree-go1' &&
|
|
22
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
23
|
+
github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]'
|
|
24
|
+
runs-on: ubuntu-24.04
|
|
25
|
+
timeout-minutes: 20
|
|
26
|
+
permissions:
|
|
27
|
+
actions: read
|
|
28
|
+
contents: read
|
|
29
|
+
outputs:
|
|
30
|
+
checksums: ${{ steps.seal.outputs.checksums }}
|
|
31
|
+
artifact-id: ${{ steps.retain.outputs.artifact-id }}
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
34
|
+
with:
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
- name: Stage only the authenticated original release bytes
|
|
38
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/split-pypi-proof@66bdb686e0103c3357a579f2e002b17853cf8a87 # v9.18.0
|
|
39
|
+
with:
|
|
40
|
+
mode: stage
|
|
41
|
+
distribution: livingproof-unitree-go1
|
|
42
|
+
tag: ${{ inputs.release_tag }}
|
|
43
|
+
source-sha: ${{ inputs.source_sha }}
|
|
44
|
+
relay-run-id: ${{ inputs.release_run_id }}
|
|
45
|
+
- name: Seal the authenticated bytes before any package execution
|
|
46
|
+
id: seal
|
|
47
|
+
working-directory: pypi-dist
|
|
48
|
+
run: |
|
|
49
|
+
{
|
|
50
|
+
echo 'checksums<<CHECKSUMS'
|
|
51
|
+
sha256sum -- *.whl *.tar.gz
|
|
52
|
+
echo CHECKSUMS
|
|
53
|
+
} >> "$GITHUB_OUTPUT"
|
|
54
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
55
|
+
with:
|
|
56
|
+
ref: ${{ inputs.source_sha }}
|
|
57
|
+
path: source
|
|
58
|
+
persist-credentials: false
|
|
59
|
+
fetch-depth: 0
|
|
60
|
+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
|
61
|
+
with:
|
|
62
|
+
python-version: '3.12.16'
|
|
63
|
+
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libosmesa6
|
|
64
|
+
- run: python -m pip install uv==0.13.6
|
|
65
|
+
- uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/check-pypi-metadata@8fcc5d80015e27a71d4ee29740a8efc5fcddb09b # v9.17.0
|
|
66
|
+
with:
|
|
67
|
+
packages-dir: pypi-dist/
|
|
68
|
+
- name: Clean-install both original distributions on the tagged lock
|
|
69
|
+
env:
|
|
70
|
+
RELEASE_TAG: ${{ inputs.release_tag }}
|
|
71
|
+
SOURCE_SHA: ${{ inputs.source_sha }}
|
|
72
|
+
EXPECTED_CHECKSUMS: ${{ steps.seal.outputs.checksums }}
|
|
73
|
+
run: |
|
|
74
|
+
set -euo pipefail
|
|
75
|
+
test "$(git -C source rev-parse HEAD)" = "$SOURCE_SHA"
|
|
76
|
+
bash tools/check_python_distributions.sh source pypi-dist "${RELEASE_TAG#v}"
|
|
77
|
+
cd pypi-dist
|
|
78
|
+
printf '%s\n' "$EXPECTED_CHECKSUMS" | sha256sum --check --strict
|
|
79
|
+
- id: retain
|
|
80
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
81
|
+
with:
|
|
82
|
+
name: go1-pypi-distributions-${{ github.run_attempt }}
|
|
83
|
+
path: pypi-dist/
|
|
84
|
+
if-no-files-found: error
|
|
85
|
+
publish:
|
|
86
|
+
needs: prepare
|
|
87
|
+
if: >-
|
|
88
|
+
github.repository == 'Living-Proof-Labs/livingproof-unitree-go1' &&
|
|
89
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
90
|
+
github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]'
|
|
91
|
+
runs-on: ubuntu-24.04
|
|
92
|
+
timeout-minutes: 10
|
|
93
|
+
concurrency:
|
|
94
|
+
group: go1-pypi-${{ inputs.source_sha }}
|
|
95
|
+
cancel-in-progress: false
|
|
96
|
+
environment:
|
|
97
|
+
name: pypi
|
|
98
|
+
url: https://pypi.org/project/livingproof-unitree-go1/
|
|
99
|
+
permissions:
|
|
100
|
+
id-token: write
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
103
|
+
with:
|
|
104
|
+
artifact-ids: ${{ needs.prepare.outputs.artifact-id }}
|
|
105
|
+
path: pypi-dist/
|
|
106
|
+
merge-multiple: true
|
|
107
|
+
- uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/verify-pypi@8fcc5d80015e27a71d4ee29740a8efc5fcddb09b # v9.17.0
|
|
108
|
+
with:
|
|
109
|
+
checksums: ${{ needs.prepare.outputs.checksums }}
|
|
110
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
111
|
+
with:
|
|
112
|
+
packages-dir: pypi-dist/
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Release
|
|
3
|
+
run-name: >-
|
|
4
|
+
PyPI release ${{ github.event.workflow_run.head_sha }}
|
|
5
|
+
(Test ${{ github.event.workflow_run.id }}:${{ github.event.workflow_run.run_attempt }})
|
|
6
|
+
on:
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: [Test]
|
|
9
|
+
types: [completed]
|
|
10
|
+
branches: [main]
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
jobs:
|
|
14
|
+
release:
|
|
15
|
+
# The shared writer creates only the exact tested tag and its draft.
|
|
16
|
+
if: >-
|
|
17
|
+
github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
18
|
+
github.event_name == 'workflow_run' && github.event.action == 'completed' &&
|
|
19
|
+
github.event.workflow_run.path == '.github/workflows/test.yml' &&
|
|
20
|
+
github.event.workflow_run.event == 'push' &&
|
|
21
|
+
github.event.workflow_run.head_branch == 'main' &&
|
|
22
|
+
github.event.workflow_run.head_repository.full_name == github.repository &&
|
|
23
|
+
github.event.workflow_run.head_repository.id == github.event.repository.id &&
|
|
24
|
+
github.event.workflow_run.conclusion == 'success' &&
|
|
25
|
+
github.event.workflow_run.head_sha == github.sha
|
|
26
|
+
permissions:
|
|
27
|
+
contents: write
|
|
28
|
+
uses: Living-Proof-Labs/collaboration-guidelines/.github/workflows/semantic-release.yml@v9.17.0
|
|
29
|
+
with:
|
|
30
|
+
draft-release: true
|
|
31
|
+
package:
|
|
32
|
+
needs: release
|
|
33
|
+
if: >-
|
|
34
|
+
!cancelled() && github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
35
|
+
github.event_name == 'workflow_run' && needs.release.result == 'success' &&
|
|
36
|
+
needs.release.outputs.draft-created == 'true' && needs.release.outputs.commit == github.sha &&
|
|
37
|
+
needs.release.outputs.version != '' &&
|
|
38
|
+
needs.release.outputs.git-tag == format('v{0}', needs.release.outputs.version)
|
|
39
|
+
runs-on: ubuntu-24.04
|
|
40
|
+
timeout-minutes: 20
|
|
41
|
+
permissions:
|
|
42
|
+
contents: read
|
|
43
|
+
outputs:
|
|
44
|
+
artifact-id: ${{ steps.retain.outputs.artifact-id }}
|
|
45
|
+
checksums: ${{ steps.seal.outputs.checksums }}
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
48
|
+
with:
|
|
49
|
+
ref: ${{ needs.release.outputs.git-tag }}
|
|
50
|
+
fetch-depth: 0
|
|
51
|
+
persist-credentials: false
|
|
52
|
+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
|
53
|
+
with:
|
|
54
|
+
python-version: '3.12.16'
|
|
55
|
+
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libosmesa6
|
|
56
|
+
- run: python -m pip install uv==0.13.6
|
|
57
|
+
- name: Build and seal both originals from the exact tagged source
|
|
58
|
+
id: seal
|
|
59
|
+
env:
|
|
60
|
+
TAG: ${{ needs.release.outputs.git-tag }}
|
|
61
|
+
VERSION: ${{ needs.release.outputs.version }}
|
|
62
|
+
run: |
|
|
63
|
+
set -euo pipefail
|
|
64
|
+
test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
|
|
65
|
+
test "$(git rev-parse "refs/tags/$TAG^{commit}")" = "$GITHUB_SHA"
|
|
66
|
+
uv --no-config build --no-sources --no-create-gitignore --out-dir dist
|
|
67
|
+
{
|
|
68
|
+
echo 'checksums<<CHECKSUMS'
|
|
69
|
+
cd dist
|
|
70
|
+
sha256sum -- "livingproof_unitree_go1-${VERSION}-py3-none-any.whl" "livingproof_unitree_go1-${VERSION}.tar.gz"
|
|
71
|
+
echo CHECKSUMS
|
|
72
|
+
} >> "$GITHUB_OUTPUT"
|
|
73
|
+
- name: Smoke test the sealed originals
|
|
74
|
+
env:
|
|
75
|
+
VERSION: ${{ needs.release.outputs.version }}
|
|
76
|
+
run: bash tools/check_python_distributions.sh . dist "$VERSION"
|
|
77
|
+
- name: Verify exact sealed release set before transfer
|
|
78
|
+
working-directory: dist
|
|
79
|
+
env:
|
|
80
|
+
VERSION: ${{ needs.release.outputs.version }}
|
|
81
|
+
EXPECTED_CHECKSUMS: ${{ steps.seal.outputs.checksums }}
|
|
82
|
+
CREATE_MANIFEST: 'true'
|
|
83
|
+
run: &verify_go1_release_assets |
|
|
84
|
+
python3 - <<'PY'
|
|
85
|
+
import hashlib
|
|
86
|
+
import os
|
|
87
|
+
from pathlib import Path
|
|
88
|
+
|
|
89
|
+
stem = "livingproof_unitree_go1-" + os.environ["VERSION"]
|
|
90
|
+
pair = (Path(stem + "-py3-none-any.whl"), Path(stem + ".tar.gz"))
|
|
91
|
+
manifest = Path("SHA256SUMS")
|
|
92
|
+
create_manifest = os.environ.get("CREATE_MANIFEST") == "true"
|
|
93
|
+
required = set(pair) if create_manifest else {*pair, manifest}
|
|
94
|
+
if set(Path(".").iterdir()) != required or not all(
|
|
95
|
+
path.is_file() and not path.is_symlink() for path in required
|
|
96
|
+
):
|
|
97
|
+
raise SystemExit("Unexpected Go1 release asset set")
|
|
98
|
+
receipt = "\n".join(
|
|
99
|
+
f"{hashlib.sha256(path.read_bytes()).hexdigest()} {path.name}" for path in pair
|
|
100
|
+
)
|
|
101
|
+
if receipt != os.environ["EXPECTED_CHECKSUMS"]:
|
|
102
|
+
raise SystemExit("Go1 release assets differ from the pre-smoke seal")
|
|
103
|
+
sealed = (receipt + "\n").encode("ascii")
|
|
104
|
+
if create_manifest:
|
|
105
|
+
with manifest.open("xb") as output:
|
|
106
|
+
output.write(sealed)
|
|
107
|
+
elif manifest.read_bytes() != sealed:
|
|
108
|
+
raise SystemExit("Go1 release assets differ from the pre-smoke seal")
|
|
109
|
+
PY
|
|
110
|
+
- id: retain
|
|
111
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
112
|
+
with:
|
|
113
|
+
name: go1-release-distributions-${{ github.run_attempt }}
|
|
114
|
+
path: |
|
|
115
|
+
dist/livingproof_unitree_go1-${{ needs.release.outputs.version }}-py3-none-any.whl
|
|
116
|
+
dist/livingproof_unitree_go1-${{ needs.release.outputs.version }}.tar.gz
|
|
117
|
+
dist/SHA256SUMS
|
|
118
|
+
if-no-files-found: error
|
|
119
|
+
assemble:
|
|
120
|
+
needs: [release, package]
|
|
121
|
+
if: >-
|
|
122
|
+
!cancelled() && github.ref == 'refs/heads/main' && github.ref_protected &&
|
|
123
|
+
github.event_name == 'workflow_run' && needs.release.result == 'success' &&
|
|
124
|
+
needs.package.result == 'success' && needs.release.outputs.draft-created == 'true' &&
|
|
125
|
+
needs.release.outputs.commit == github.sha && needs.release.outputs.version != '' &&
|
|
126
|
+
needs.release.outputs.git-tag == format('v{0}', needs.release.outputs.version) &&
|
|
127
|
+
needs.package.outputs.artifact-id != ''
|
|
128
|
+
runs-on: ubuntu-24.04
|
|
129
|
+
timeout-minutes: 10
|
|
130
|
+
permissions:
|
|
131
|
+
contents: write
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
134
|
+
with:
|
|
135
|
+
artifact-ids: ${{ needs.package.outputs.artifact-id }}
|
|
136
|
+
path: dist/
|
|
137
|
+
merge-multiple: true
|
|
138
|
+
- name: Verify exact sealed release set before immutable publication
|
|
139
|
+
working-directory: dist
|
|
140
|
+
env:
|
|
141
|
+
VERSION: ${{ needs.release.outputs.version }}
|
|
142
|
+
EXPECTED_CHECKSUMS: ${{ needs.package.outputs.checksums }}
|
|
143
|
+
run: *verify_go1_release_assets
|
|
144
|
+
- uses: Living-Proof-Labs/collaboration-guidelines/.github/actions/publish-draft-release@8fcc5d80015e27a71d4ee29740a8efc5fcddb09b # v9.17.0
|
|
145
|
+
with:
|
|
146
|
+
tag: ${{ needs.release.outputs.git-tag }}
|
|
147
|
+
asset-policy: strict
|
|
148
|
+
assets: |
|
|
149
|
+
dist/livingproof_unitree_go1-${{ needs.release.outputs.version }}-py3-none-any.whl
|
|
150
|
+
dist/livingproof_unitree_go1-${{ needs.release.outputs.version }}.tar.gz
|
|
151
|
+
dist/SHA256SUMS
|
|
152
|
+
deploy-manual:
|
|
153
|
+
needs: [release, assemble]
|
|
154
|
+
if: ${{ !cancelled() && needs.assemble.result == 'success' }}
|
|
155
|
+
permissions:
|
|
156
|
+
contents: read
|
|
157
|
+
pages: write
|
|
158
|
+
id-token: write
|
|
159
|
+
uses: ./.github/workflows/docs.yml
|
|
160
|
+
with:
|
|
161
|
+
release_tag: ${{ needs.release.outputs.git-tag }}
|
|
162
|
+
release_version: ${{ needs.release.outputs.version }}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Test
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
merge_group:
|
|
6
|
+
types: [checks_requested]
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-24.04, ubuntu-24.04-arm]
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
env:
|
|
19
|
+
MUJOCO_GL: osmesa
|
|
20
|
+
PYOPENGL_PLATFORM: osmesa
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
fetch-depth: 0 # release tags, for the package version
|
|
26
|
+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.12.16'
|
|
29
|
+
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libosmesa6
|
|
30
|
+
- name: Install uv
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --user uv==0.13.6
|
|
33
|
+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
34
|
+
- run: uv sync --locked
|
|
35
|
+
- run: uv run --no-sync ruff check .
|
|
36
|
+
- run: uv run --no-sync ruff format --check .
|
|
37
|
+
- run: uv run --no-sync pytest tests
|
|
38
|
+
verification-gate:
|
|
39
|
+
name: Robot verification gate
|
|
40
|
+
if: always()
|
|
41
|
+
needs: [test]
|
|
42
|
+
runs-on: ubuntu-24.04
|
|
43
|
+
steps:
|
|
44
|
+
- name: Require the complete test matrix to pass
|
|
45
|
+
env:
|
|
46
|
+
TEST_RESULT: ${{ needs.test.result }}
|
|
47
|
+
run: test "$TEST_RESULT" = success
|