Skip to content

[CI] Add nightly build/release and test workflow#2950

Open
stmatengss wants to merge 1 commit into
kvcache-ai:mainfrom
stmatengss:feature/nightly-workflow
Open

[CI] Add nightly build/release and test workflow#2950
stmatengss wants to merge 1 commit into
kvcache-ai:mainfrom
stmatengss:feature/nightly-workflow

Conversation

@stmatengss

Copy link
Copy Markdown
Collaborator

Description

Add a scheduled GitHub Actions workflow (.github/workflows/nightly.yml) that provides daily automated builds, releases, and comprehensive testing.

Module(s) affected

  • CI/CD (.github/workflows)

Type of change

  • New feature (non-breaking)

Schedule

  • Runs every night at 00:00 Beijing Time (16:00 UTC)
  • Manual trigger supported via workflow_dispatch

Workflow Jobs

Build (Nightly Wheels)

Variant Runner Python Versions
CUDA 12.8 x86_64 (with EP) ubuntu-22.04 + manylinux2_28 3.10, 3.12
CUDA 12.8 arm64 (SBSA) ubuntu-22.04-arm 3.10, 3.12
CUDA 13 x86_64 (with EP) ubuntu-22.04 + manylinux2_28 3.10, 3.12

Publish

  • Publishes all built wheels to TestPyPI
  • Skippable via skip_publish workflow input
  • Validates wheels with twine check before upload

Nightly Test (Full Suite)

  • Builds from source in Release mode (no ASAN, no coverage overhead)
  • CTest unit tests
  • Rust smoke tests and benchmarks (mooncake-store/rust)
  • Go binding integration tests (mooncake-store/go)
  • Full Python integration tests via scripts/run_tests.sh
  • Optional tests enabled: SSD offload eviction, promotion-on-hit

Failure Notification

  • On failure, automatically creates a GitHub issue with label nightly-failure

Required Secrets

  • TESTPYPI_API_TOKEN: API token for TestPyPI publishing (must be configured in repo settings)

Checklist

  • Workflow YAML is valid
  • Reuses existing _build-wheel.yaml for consistent builds
  • Tests run in Release mode for production-representative results
  • Manual trigger supported for ad-hoc nightly runs
  • Concurrency control prevents duplicate runs

Add a scheduled GitHub Actions workflow that runs every night at 00:00
Beijing Time (16:00 UTC) with the following capabilities:

- Nightly wheel builds for 3 variants:
  - CUDA 12.8 x86_64 (with EP support)
  - CUDA 12.8 arm64 (SBSA)
  - CUDA 13 x86_64 (with EP support)
- Publishes dev wheels to TestPyPI
- Comprehensive nightly test suite:
  - CTest unit tests (Release mode)
  - Rust smoke tests and benchmarks
  - Go binding integration tests
  - Full Python integration tests with optional tests enabled
- Failure notification via GitHub issue creation
- Manual trigger support with skip_publish option

Requires TESTPYPI_API_TOKEN secret to be configured for publishing.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@stmatengss
stmatengss requested a review from Copilot July 16, 2026 08:00
@stmatengss

Copy link
Copy Markdown
Collaborator Author

@qoder Review it

@qoderai

qoderai Bot commented Jul 16, 2026

Copy link
Copy Markdown

On it — I’ll review this PR and follow up here with findings.


🤖 Generated by QoderView workflow run

@qoderai qoderai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed .github/workflows/nightly.yml for CI/YAML correctness and alignment with existing build/test patterns.

Summary:

  • The workflow is structurally valid and matches the described nightly build + test behavior, including CUDA variants, TestPyPI publishing, and full integration suites.
  • Permissions, concurrency, and failure notification are sensibly configured.
  • Left a few minor, non-blocking suggestions around guarding github.event.inputs, clarifying use of nightly_version, and considering CI resource usage trade-offs.

From a CI design perspective I don’t see blockers to merging; my comments are mostly about robustness and maintainability over time. ✅


🤖 Generated by QoderView workflow run

Comment on lines +88 to +90
publish-testpypi:
needs: [version-stamp, build-cuda128-x86, build-cuda128-arm64, build-cuda13-x86]
if: ${{ github.event.inputs.skip_publish != 'true' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR — this looks well-structured and aligned with the existing CI patterns.

A few minor suggestions:

  1. publish-testpypi conditional:

    • Consider guarding against the schedule event (where github.event.inputs is undefined) to avoid surprises if the workflow is ever triggered in other ways. For example, using a boolean input like do_publish with a default, or checking for the presence of github.event_name == 'workflow_dispatch' when accessing inputs.
  2. Artifacts and versioning:

    • You compute nightly_version in version-stamp but currently only log it; if you intend to embed this into wheel metadata or artifact names, a brief inline comment or follow-up usage would help future maintainers. If logging only is intentional, no change needed.
  3. Resource usage on nightly-test:

    • The Free up disk space and CUDA install steps are quite heavy (which is probably necessary), but if you hit CI limits in practice, consider a separate lighter-weight workflow for smoke tests vs. full nightly to keep overall runtime predictable.

Overall, functionally this looks solid and I don’t see blockers from a CI/YAML correctness perspective. ✅


🤖 Generated by QoderFix in Qoder

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new scheduled GitHub Actions workflow to run nightly builds, publish wheels to TestPyPI, execute a broad Release-mode test suite (CTest + Rust/Go/Python integration), and create an issue on failure.

Changes:

  • Introduces .github/workflows/nightly.yml with a daily schedule (16:00 UTC / 00:00 Beijing) and workflow_dispatch support.
  • Reuses the existing reusable wheel build workflow to build multiple CUDA wheel variants and publishes artifacts to TestPyPI.
  • Runs a full nightly integration pipeline (etcd + metadata server + CTest + Rust/Go/Python tests) and files an issue when the nightly gate fails.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +36
version-stamp:
runs-on: ubuntu-22.04
outputs:
nightly_version: ${{ steps.version.outputs.nightly_version }}
steps:
- uses: actions/checkout@v4
- name: Compute nightly version
id: version
run: |
BASE_VERSION=$(grep -Po '(?<=^version = ")[^"]+' mooncake-wheel/pyproject.toml)
NIGHTLY_VERSION="${BASE_VERSION}.dev$(date -u +%Y%m%d)"
echo "nightly_version=$NIGHTLY_VERSION" >> "$GITHUB_OUTPUT"
Comment on lines +146 to +148
etcd --advertise-client-urls http://127.0.0.1:2379 --listen-client-urls http://127.0.0.1:2379 &
sleep 3
etcdctl --endpoints=http://127.0.0.1:2379 endpoint health
Comment on lines +212 to +214
MC_METADATA_SERVER=http://127.0.0.1:8080/metadata \
DEFAULT_KV_LEASE_TTL=500 \
ctest -j --output-on-failure
Comment on lines +110 to +114
- name: Install twine
run: pip install twine

- name: Validate wheels
run: twine check dist-publish/*.whl
Comment on lines +93 to +96
permissions:
contents: read
id-token: write
steps:
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Aionw Aionw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two additional issues in the failure-reporting path:


nightly-gate:
if: always()
needs: [publish-testpypi, nightly-test]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build failures can bypass this gate. Because publish-testpypi depends on all three wheel-build jobs, a failure in any build makes the publish job skipped. This gate does not depend on the build jobs directly and only rejects a publish result of failure, so it can report success and notify-failure will not run. Please include the build jobs in needs and validate their results, while distinguishing an intentional skip_publish from a dependency-induced skip.

repo: context.repo.repo,
title,
body,
labels: ['nightly-failure'],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository does not currently have a nightly-failure label. Passing a nonexistent label to the create-issue API can cause the notification step itself to fail with a validation error. Please create the label before enabling this workflow, use an existing label, or add a fallback that creates the issue without the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants