-
Notifications
You must be signed in to change notification settings - Fork 6
ci: add release preparation and wheel verification #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
2b0379e
e832880
051532c
2567181
1928823
d52cd44
2099f17
4b1239a
c9ba540
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,8 @@ __pycache__/ | |
| .venv/ | ||
|
|
||
| # Build artifacts | ||
| dist/ | ||
| dist/* | ||
| !dist/*.whl | ||
| htmlcov/ | ||
| coverage.json | ||
| coverage.xml | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| #MISE description="Prepare the next release tag from local Git tags without creating, deleting, or pushing tags." | ||
|
|
||
| set -euo pipefail | ||
| source "${MISE_CONFIG_ROOT}/.mise/tasks/_lib.sh" | ||
|
|
||
| tool_root="${MISE_CONFIG_ROOT:-$(git rev-parse --show-toplevel)}" | ||
| python_version="$(resolve_python_version)" | ||
|
|
||
| uv --no-config run --no-project --python "${python_version}" \ | ||
| "${tool_root}/tools/release_version.py" "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| #MISE description="Verify a built wheel with clean end-user CPU installation and CUDA dependency resolution." | ||
|
|
||
| set -euo pipefail | ||
| source "${MISE_CONFIG_ROOT}/.mise/tasks/_lib.sh" | ||
|
|
||
| tool_root="${MISE_CONFIG_ROOT:-$(git rev-parse --show-toplevel)}" | ||
| container_cmd="$(resolve_container_cmd)" | ||
|
|
||
| shopt -s nullglob | ||
| wheels=("${tool_root}"/dist/*.whl) | ||
| if (( ${#wheels[@]} != 1 )); then | ||
| echo "Error: expected exactly one wheel under ${tool_root}/dist, found ${#wheels[@]}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| "${container_cmd}" build \ | ||
| --platform "${CONTAINER_TEST_PLATFORM:-linux/amd64}" \ | ||
| --progress=plain \ | ||
| --file "${CONTAINER_TEST_FILE:-containers/Dockerfile.test_ci}" \ | ||
| --target wheel-install \ | ||
| --tag "${CONTAINER_WHEEL_INSTALL_IMAGE:-nss-wheel-install:latest}" \ | ||
| "${tool_root}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,41 @@ RUN MISE_GPG_KEY=24853EC9F655CE80B48E6C3A8B81C9D17413A06D \ | |
| MISE_YES=1 mise trust && \ | ||
| PYTHON_VERSION="${PYTHON_VERSION}" MISE_YES=1 mise run setup | ||
|
|
||
| FROM setup AS wheel-install | ||
|
|
||
| ENV UV_LINK_MODE=copy | ||
|
|
||
| COPY dist/*.whl /tmp/dist/ | ||
|
|
||
| RUN --mount=type=cache,target=/root/.cache/uv \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wish Dockerfiles in github had syntax highlighting for these my nit would be to put this section into a script since it's a bit rough to read here
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in |
||
| wheel_count="$(find /tmp/dist -maxdepth 1 -type f -name '*.whl' | wc -l)" && \ | ||
| test "${wheel_count}" -eq 1 && \ | ||
| wheel="$(find /tmp/dist -maxdepth 1 -type f -name '*.whl')" && \ | ||
| uv --no-config venv --clear --python /usr/local/bin/python /opt/wheel-cpu && \ | ||
| uv --no-config pip install \ | ||
| --python /opt/wheel-cpu/bin/python \ | ||
| --no-sources \ | ||
| --default-index https://pypi.org/simple \ | ||
| --index https://download.pytorch.org/whl/cpu \ | ||
| --index-strategy unsafe-best-match \ | ||
| "nemo-safe-synthesizer[cpu,engine] @ file://${wheel}" && \ | ||
| uv --no-config pip check --python /opt/wheel-cpu/bin/python && \ | ||
| /opt/wheel-cpu/bin/python -c \ | ||
| "from importlib.metadata import version; from nemo_safe_synthesizer.package_info import __version__; assert __version__ == version('nemo-safe-synthesizer')" && \ | ||
| /opt/wheel-cpu/bin/safe-synthesizer --help >/dev/null && \ | ||
| uv --no-config venv --clear --python /usr/local/bin/python /opt/wheel-cu129 && \ | ||
| uv --no-config pip install \ | ||
| --python /opt/wheel-cu129/bin/python \ | ||
| --no-sources \ | ||
| --dry-run \ | ||
| --default-index https://pypi.org/simple \ | ||
| --index https://flashinfer.ai/whl/cu129 \ | ||
| --index https://download.pytorch.org/whl/cu129 \ | ||
| --index https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129 \ | ||
| --index-strategy unsafe-best-match \ | ||
| "nemo-safe-synthesizer[cu129,engine] @ file://${wheel}" && \ | ||
| rm -rf /opt/wheel-cpu /opt/wheel-cu129 | ||
|
|
||
| FROM setup AS install-deps | ||
| # Install Python dependencies (cached until pyproject.toml, uv.lock, or src/ or tests/ change) | ||
| COPY pyproject.toml . | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.