Squashed 'vendor/dumas_h3_continuum/' content from commit d07ed31
git-subtree-dir: vendor/dumas_h3_continuum git-subtree-split: d07ed31b442d283d6a1740f875a843b9feda4c91
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
name: Publish to Comfy Registry
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: publish-comfy-registry-v3.9.10
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Check out v3.9.10 release
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: v3.9.10
|
||||
persist-credentials: false
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Verify release identity and source hashes
|
||||
shell: bash
|
||||
run: |
|
||||
test "$(git describe --tags --exact-match HEAD)" = "v3.9.10"
|
||||
python - <<'PY'
|
||||
import hashlib
|
||||
import pathlib
|
||||
import tomllib
|
||||
root = pathlib.Path(".")
|
||||
metadata = tomllib.loads((root / "pyproject.toml").read_text())
|
||||
assert metadata["project"]["version"] == "3.9.10"
|
||||
assert metadata["tool"]["comfy"]["PublisherId"] == "ukr8b3g-cmyk"
|
||||
for name in ("REGISTRY_MANIFEST.sha256", "MANIFEST.sha256"):
|
||||
rows = (root / name).read_text().splitlines()
|
||||
for row in rows:
|
||||
expected, path = row.split(" ", 1)
|
||||
assert hashlib.sha256((root / path).read_bytes()).hexdigest() == expected, path
|
||||
print(name, len(rows), "matched")
|
||||
print("Release commit:", __import__("subprocess").check_output(["git", "rev-parse", "HEAD"], text=True).strip())
|
||||
PY
|
||||
- name: Install publishing CLI
|
||||
run: python -m pip install comfy-cli==1.22.0
|
||||
- name: Build Registry package
|
||||
shell: bash
|
||||
run: |
|
||||
comfy --skip-prompt --no-enable-telemetry env
|
||||
comfy node pack
|
||||
- name: Verify actual Registry ZIP before publication
|
||||
shell: bash
|
||||
run: |
|
||||
python - <<'PY'
|
||||
import hashlib
|
||||
import pathlib
|
||||
import zipfile
|
||||
rows = pathlib.Path("REGISTRY_MANIFEST.sha256").read_text().splitlines()
|
||||
declared = dict(row.split(" ", 1)[::-1] for row in rows)
|
||||
with zipfile.ZipFile("node.zip") as archive:
|
||||
assert archive.testzip() is None, "ZIP CRC failure"
|
||||
actual = {entry.filename for entry in archive.infolist() if not entry.is_dir()}
|
||||
expected = set(declared) | {"REGISTRY_MANIFEST.sha256"}
|
||||
assert actual == expected, {"missing": sorted(expected - actual), "extra": sorted(actual - expected)}
|
||||
for path, digest in declared.items():
|
||||
assert hashlib.sha256(archive.read(path)).hexdigest() == digest, path
|
||||
assert archive.read("REGISTRY_MANIFEST.sha256") == pathlib.Path("REGISTRY_MANIFEST.sha256").read_bytes()
|
||||
print("Registry ZIP: exact file set and", len(declared), "hashes matched")
|
||||
PY
|
||||
- name: Publish verified package
|
||||
env:
|
||||
REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
shell: bash
|
||||
run: |
|
||||
test -n "$REGISTRY_ACCESS_TOKEN"
|
||||
comfy node publish --token "$REGISTRY_ACCESS_TOKEN"
|
||||
@@ -0,0 +1,154 @@
|
||||
name: Publish verified v3.9.10
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [tests]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: publish-v3.9.10
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
tag:
|
||||
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.head_repository.full_name == github.repository
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
outputs:
|
||||
publish: ${{ steps.tag.outputs.publish }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.workflow_run.head_sha }}
|
||||
- id: tag
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASE_SHA: ${{ github.event.workflow_run.head_sha }}
|
||||
run: |
|
||||
test "$(python -c 'import tomllib;print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')" = 3.9.10
|
||||
test "$(gh api repos/$GITHUB_REPOSITORY/branches/main --jq .commit.sha)" = "$RELEASE_SHA"
|
||||
if gh release view v3.9.10 --json isDraft --jq .isDraft 2>/dev/null | grep -qx false; then
|
||||
echo 'publish=false' >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
if EXISTING=$(gh api repos/$GITHUB_REPOSITORY/git/ref/tags/v3.9.10 --jq .object.sha 2>/dev/null); then
|
||||
echo "Existing tag: $EXISTING"
|
||||
test "$EXISTING" = "$RELEASE_SHA"
|
||||
else
|
||||
echo "Creating v3.9.10 at $RELEASE_SHA"
|
||||
gh api repos/$GITHUB_REPOSITORY/git/refs -f ref=refs/tags/v3.9.10 -f sha="$RELEASE_SHA"
|
||||
fi
|
||||
echo 'publish=true' >> "$GITHUB_OUTPUT"
|
||||
tag-tests:
|
||||
needs: tag
|
||||
if: needs.tag.outputs.publish == 'true'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: v3.9.10
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install CPU test dependencies
|
||||
run: |
|
||||
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
|
||||
python -m pip install -r requirements.txt numpy safetensors pytest psutil opencv-python-headless Pillow aiohttp
|
||||
- name: Compile tag
|
||||
run: python -m compileall -q .
|
||||
- name: Linux full regression on published tag
|
||||
if: runner.os == 'Linux'
|
||||
run: python -m pytest -q -p no:cacheprovider
|
||||
- name: Windows storage regression on published tag
|
||||
if: runner.os == 'Windows'
|
||||
run: python -m pytest -q -p no:cacheprovider tests/test_temporary_storage.py tests/test_storage_api.py tests/test_p20_file_backed_tensor_poc.py tests/test_p22_file_backed_buffer.py tests/decode_cache
|
||||
publish:
|
||||
needs: [tag, tag-tests]
|
||||
if: needs.tag.outputs.publish == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: v3.9.10
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Build GitHub ZIP and verify source manifests
|
||||
run: |
|
||||
python - <<'PY'
|
||||
import hashlib,pathlib,subprocess,zipfile,tomllib
|
||||
root=pathlib.Path('.')
|
||||
assert tomllib.loads((root/'pyproject.toml').read_text())['project']['version']=='3.9.10'
|
||||
for name in ['MANIFEST.sha256','REGISTRY_MANIFEST.sha256']:
|
||||
rows=(root/name).read_text().splitlines()
|
||||
for row in rows:
|
||||
h,p=row.split(' ',1);assert hashlib.sha256((root/p).read_bytes()).hexdigest()==h,p
|
||||
print(name,len(rows),'matched')
|
||||
files=subprocess.check_output(['git','ls-tree','-r','--name-only','HEAD'],text=True).splitlines()
|
||||
target=root/'ComfyUI-H3-Continuum-v3.9.10.zip'
|
||||
with zipfile.ZipFile(target,'w',zipfile.ZIP_DEFLATED,compresslevel=9) as z:
|
||||
for p in files:z.write(root/p,'ComfyUI-H3-Continuum/'+p)
|
||||
with zipfile.ZipFile(target) as z:
|
||||
assert z.testzip() is None
|
||||
assert set(z.namelist())=={'ComfyUI-H3-Continuum/'+p for p in files}
|
||||
assert all(z.read('ComfyUI-H3-Continuum/'+p)==(root/p).read_bytes() for p in files)
|
||||
pathlib.Path('SHA256SUMS.txt').write_text(hashlib.sha256(target.read_bytes()).hexdigest()+' '+target.name+'\n')
|
||||
print('GitHub ZIP exact:',len(files),'files')
|
||||
PY
|
||||
- name: Install pinned Registry CLI
|
||||
run: python -m pip install comfy-cli==1.22.0
|
||||
- name: Build and verify Registry archive
|
||||
run: |
|
||||
comfy --skip-prompt --no-enable-telemetry env
|
||||
comfy node pack
|
||||
python - <<'PY'
|
||||
import hashlib,pathlib,zipfile
|
||||
root=pathlib.Path('.')
|
||||
declared={p:h for h,p in (r.split(' ',1) for r in (root/'REGISTRY_MANIFEST.sha256').read_text().splitlines())}
|
||||
with zipfile.ZipFile('node.zip') as z:
|
||||
assert z.testzip() is None
|
||||
assert {i.filename for i in z.infolist() if not i.is_dir()}==set(declared)|{'REGISTRY_MANIFEST.sha256'}
|
||||
assert all(hashlib.sha256(z.read(p)).hexdigest()==h for p,h in declared.items())
|
||||
assert z.read('REGISTRY_MANIFEST.sha256')==(root/'REGISTRY_MANIFEST.sha256').read_bytes()
|
||||
print('Registry ZIP exact:',len(declared),'payload hashes matched')
|
||||
PY
|
||||
- name: Publish GitHub Release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh release create v3.9.10 ComfyUI-H3-Continuum-v3.9.10.zip SHA256SUMS.txt --verify-tag --title 'v3.9.10 — Spectrum reuse and Reference assignment display' --notes-file docs/RELEASE_NOTES_V3910.md --latest
|
||||
- name: Download and verify public GitHub assets
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release download v3.9.10 --dir public-download --pattern 'ComfyUI-H3-Continuum-v3.9.10.zip' --pattern SHA256SUMS.txt
|
||||
python - <<'PY'
|
||||
import pathlib,hashlib
|
||||
for name in ['ComfyUI-H3-Continuum-v3.9.10.zip','SHA256SUMS.txt']:
|
||||
assert pathlib.Path(name).read_bytes()==(pathlib.Path('public-download')/name).read_bytes(),name
|
||||
print('Public GitHub assets match verified local ZIP and checksum')
|
||||
PY
|
||||
- name: Publish verified Registry package
|
||||
env:
|
||||
REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
run: |
|
||||
test -n "$REGISTRY_ACCESS_TOKEN"
|
||||
comfy node publish --token "$REGISTRY_ACCESS_TOKEN"
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: publication-v3.9.10
|
||||
path: |
|
||||
ComfyUI-H3-Continuum-v3.9.10.zip
|
||||
SHA256SUMS.txt
|
||||
node.zip
|
||||
@@ -0,0 +1,42 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: pip
|
||||
- name: Install test dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
|
||||
python -m pip install -r requirements.txt numpy safetensors pytest psutil opencv-python-headless Pillow aiohttp
|
||||
- name: Compile Python
|
||||
run: python -m compileall -q .
|
||||
- name: Run tests
|
||||
run: python -m pytest -q -p no:cacheprovider
|
||||
|
||||
windows-storage:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: pip
|
||||
- name: Install CPU storage test dependencies
|
||||
run: |
|
||||
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
|
||||
python -m pip install numpy safetensors pytest psutil aiohttp
|
||||
- name: Windows file-backed and temporary storage regressions
|
||||
run: python -m pytest -q -p no:cacheprovider tests/test_temporary_storage.py tests/test_storage_api.py tests/test_p20_file_backed_tensor_poc.py tests/test_p22_file_backed_buffer.py tests/decode_cache
|
||||
Reference in New Issue
Block a user