ci: retain only Python release wheels
This commit is contained in:
@@ -8,16 +8,10 @@ name: Build single-exe
|
||||
# the dsh-jsonrpc-agent-pkg closure manifest with @yao-pkg/pkg into
|
||||
# dist-exe/.
|
||||
#
|
||||
# Each build leg uploads two artifacts (both tar.gz — tar keeps file modes,
|
||||
# so the exe's executable bit survives; upload-artifact's zip transport
|
||||
# does not preserve them):
|
||||
# - dsh-jsonrpc-agent-pkg-<target> — the bare single-file exe, for
|
||||
# consumers that want just the binary.
|
||||
# - deepseek-harness-python-<target> — the whole python/ directory with
|
||||
# that exe already embedded (the build script syncs it into the Python
|
||||
# runtime package): unpack and both packages pip install as-is, the
|
||||
# checked-in default runtime/cordis.yml is editable in place, and the
|
||||
# embedded exe also runs directly.
|
||||
# The run retains exactly the four wheels that make up one Python release:
|
||||
# one platform-independent SDK wheel plus one native runtime wheel for each
|
||||
# supported platform. The matrix still exercises the bare executable and
|
||||
# source tree, but they are intermediate test inputs rather than artifacts.
|
||||
#
|
||||
# Two explicit triggers, deliberately no per-commit CI: the exe is a
|
||||
# release-style deliverable, and the build (full pnpm build + pnpm deploy +
|
||||
@@ -103,8 +97,36 @@ jobs:
|
||||
echo "Matrix: $matrix"
|
||||
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build:
|
||||
sdk-wheel:
|
||||
needs: plan
|
||||
name: deepseek_harness-0.0.0-py3-none-any.whl
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Python build tooling
|
||||
run: python -m pip install uv==0.11.23
|
||||
|
||||
- name: Build release-shaped SDK wheel
|
||||
run: >-
|
||||
python scripts/build-python-release.py
|
||||
--package sdk
|
||||
--tag python-v0.0.0
|
||||
--output-dir dist-python
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: deepseek_harness-0.0.0-py3-none-any.whl
|
||||
path: dist-python/deepseek_harness-0.0.0-py3-none-any.whl
|
||||
if-no-files-found: error
|
||||
|
||||
build:
|
||||
needs: [plan, sdk-wheel]
|
||||
name: ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 45
|
||||
@@ -163,7 +185,7 @@ jobs:
|
||||
- name: Build single-exe
|
||||
run: pnpm exec tsx scripts/build-exe-for-python-sdk.ts --targets=${{ matrix.target }}
|
||||
|
||||
- name: Resolve platform artifact names
|
||||
- name: Resolve platform outputs
|
||||
id: runtime
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
@@ -172,8 +194,15 @@ jobs:
|
||||
platform="${TARGET#node24-}"
|
||||
exe="$PWD/dist-exe/dsh-jsonrpc-agent-pkg-$platform"
|
||||
[ -x "$exe" ] || { echo "::error::$exe missing or not executable"; exit 1; }
|
||||
case "$platform" in
|
||||
linux-x64) wheel=deepseek_harness_runtime_bin-0.0.0-py3-none-manylinux_2_28_x86_64.whl ;;
|
||||
linux-arm64) wheel=deepseek_harness_runtime_bin-0.0.0-py3-none-manylinux_2_28_aarch64.whl ;;
|
||||
macos-arm64) wheel=deepseek_harness_runtime_bin-0.0.0-py3-none-macosx_11_0_arm64.whl ;;
|
||||
*) echo "::error::Unsupported runtime platform $platform"; exit 1 ;;
|
||||
esac
|
||||
echo "platform=$platform" >> "$GITHUB_OUTPUT"
|
||||
echo "exe=$exe" >> "$GITHUB_OUTPUT"
|
||||
echo "wheel=$wheel" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Full-turn SDK, custom cordis, and direct-binary smoke
|
||||
run: >-
|
||||
@@ -182,19 +211,19 @@ jobs:
|
||||
--scenario all
|
||||
--exe "${{ steps.runtime.outputs.exe }}"
|
||||
|
||||
- name: Build release-shaped SDK and runtime wheels
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python scripts/build-python-release.py \
|
||||
--package sdk \
|
||||
--tag python-v0.0.0 \
|
||||
--output-dir dist-python
|
||||
python scripts/build-python-release.py \
|
||||
--package runtime \
|
||||
--tag python-v0.0.0 \
|
||||
--platform "${{ steps.runtime.outputs.platform }}" \
|
||||
--runtime-exe "${{ steps.runtime.outputs.exe }}" \
|
||||
--output-dir dist-python
|
||||
- name: Build release-shaped runtime wheel
|
||||
run: >-
|
||||
python scripts/build-python-release.py
|
||||
--package runtime
|
||||
--tag python-v0.0.0
|
||||
--platform "${{ steps.runtime.outputs.platform }}"
|
||||
--runtime-exe "${{ steps.runtime.outputs.exe }}"
|
||||
--output-dir dist-python
|
||||
|
||||
- uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: deepseek_harness-0.0.0-py3-none-any.whl
|
||||
path: dist-python
|
||||
|
||||
- name: Install only the SDK into a clean venv and run zero-config
|
||||
run: |
|
||||
@@ -235,76 +264,8 @@ jobs:
|
||||
/tmp/dsh-sdk/bin/python /work/scripts/smoke-python-runtime.py --scenario sdk-default
|
||||
'
|
||||
|
||||
# The bare exe ships inside a tar.gz (the mode-preservation note in
|
||||
# the header): uploading dist-exe/ bare would hand consumers a 0644
|
||||
# file that subprocess.Popen refuses to run.
|
||||
- name: Pack bare exe
|
||||
id: pack-exe
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
exe_tar="dsh-jsonrpc-agent-pkg-${TARGET}.tar.gz"
|
||||
tar -czf "$exe_tar" -C dist-exe .
|
||||
ls -lh "$exe_tar"
|
||||
echo "tar=$exe_tar" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: dsh-jsonrpc-agent-pkg-${{ matrix.target }}
|
||||
path: ${{ steps.pack-exe.outputs.tar }}
|
||||
if-no-files-found: error
|
||||
|
||||
# After the build step, python/ is already in its complete
|
||||
# distributable shape — the script synced this leg's exe into
|
||||
# python/sdk-runtime/src/deepseek_harness_runtime/runtime/ next to the
|
||||
# checked-in default cordis.yml — so packing is all that is left.
|
||||
# Everything goes under one top-level deepseek-harness-python/
|
||||
# directory so unpacking never scatters files.
|
||||
#
|
||||
# Excluded: runtime/node/ (dev-only node-mode carrier, ~140MB) plus
|
||||
# __pycache__ / .pytest_cache / .venv / node_modules anywhere (install
|
||||
# or test leftovers); uv.lock stays in.
|
||||
#
|
||||
# Portability: GNU tar (ubuntu) and bsdtar (macos) both accept
|
||||
# `tar -czf out.tar.gz --exclude=… -C <parent> <dir>` and both treat
|
||||
# an excluded directory as pruned (no descent). The top-level rename
|
||||
# is done by copying into a temp dir first — GNU --transform / BSD -s
|
||||
# are single-implementation flags.
|
||||
- name: Pack Python SDK bundle
|
||||
id: pack
|
||||
env:
|
||||
TARGET: ${{ matrix.target }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
platform_arch="${TARGET#*-}" # node24-macos-arm64 -> macos-arm64
|
||||
exe="python/sdk-runtime/src/deepseek_harness_runtime/runtime/dsh-jsonrpc-agent-pkg-${platform_arch}"
|
||||
if [ ! -x "$exe" ]; then
|
||||
echo "::error::$exe missing or not executable — the build step did not sync this leg's exe into the Python runtime package; refusing to pack a half-empty bundle."
|
||||
exit 1
|
||||
fi
|
||||
staging="$(mktemp -d)"
|
||||
cp -R python "$staging/deepseek-harness-python"
|
||||
bundle="deepseek-harness-python-${platform_arch}.tar.gz"
|
||||
tar -czf "$bundle" \
|
||||
--exclude='deepseek-harness-python/sdk-runtime/src/deepseek_harness_runtime/runtime/node' \
|
||||
--exclude='__pycache__' \
|
||||
--exclude='.pytest_cache' \
|
||||
--exclude='.venv' \
|
||||
--exclude='node_modules' \
|
||||
-C "$staging" deepseek-harness-python
|
||||
rm -rf "$staging"
|
||||
ls -lh "$bundle"
|
||||
echo "bundle=$bundle" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: deepseek-harness-python-${{ matrix.target }}
|
||||
path: ${{ steps.pack.outputs.bundle }}
|
||||
if-no-files-found: error
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: deepseek-harness-wheels-${{ matrix.target }}
|
||||
path: dist-python/*.whl
|
||||
name: ${{ steps.runtime.outputs.wheel }}
|
||||
path: dist-python/${{ steps.runtime.outputs.wheel }}
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user