Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
13d596c9
"git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "2e42ef793f6be12627e820cf9878bd2da1602c80"
Unverified
Commit
13d596c9
authored
Oct 13, 2025
by
Simo Lin
Committed by
GitHub
Oct 13, 2025
Browse files
[router][ci] Add Nightly Release Workflow for SGLang Router (#11527)
parent
c7867b67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
146 additions
and
0 deletions
+146
-0
.github/workflows/nightly-release-router.yml
.github/workflows/nightly-release-router.yml
+146
-0
No files found.
.github/workflows/nightly-release-router.yml
0 → 100644
View file @
13d596c9
# Nightly release workflow for SGLang Router
name
:
Nightly Release SGLang Router to PyPI
on
:
schedule
:
# Run at 2 AM UTC every day
-
cron
:
'
0
2
*
*
*'
workflow_dispatch
:
# Allow manual trigger
jobs
:
build
:
name
:
Build on ${{ matrix.os }} (${{ matrix.target }})
runs-on
:
${{ matrix.os }}-latest
strategy
:
fail-fast
:
false
matrix
:
include
:
-
os
:
ubuntu
target
:
x86_64
steps
:
-
uses
:
actions/checkout@v4
with
:
path
:
sglang-repo
-
name
:
Move sgl-router folder to root and delete sglang-repo
run
:
|
mv sglang-repo/sgl-router/* .
rm -rf sglang-repo
ls -alt
-
name
:
Set up Python
uses
:
actions/setup-python@v5
with
:
python-version
:
"
3.11"
-
name
:
Modify version for nightly release
run
:
|
# Get current version from pyproject.toml
CURRENT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])" 2>/dev/null || python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])")
# Create nightly version with date: e.g., 0.1.9.dev20250112
NIGHTLY_VERSION="${CURRENT_VERSION}.dev$(date +%Y%m%d)"
echo "Nightly version: $NIGHTLY_VERSION"
# Update pyproject.toml with nightly version (temporary, not committed)
sed -i "s/version = \"${CURRENT_VERSION}\"/version = \"${NIGHTLY_VERSION}\"/" pyproject.toml
# Verify the change
cat pyproject.toml | grep "^version"
-
name
:
Install build dependencies
run
:
|
python -m pip install -U pip
python -m pip install build twine auditwheel tomli
-
name
:
Build package
uses
:
pypa/cibuildwheel@v2.21.3
env
:
CIBW_BUILD
:
"
cp38-manylinux_x86_64
cp39-manylinux_x86_64
cp310-manylinux_x86_64
cp311-manylinux_x86_64
cp312-manylinux_x86_64"
CIBW_BEFORE_ALL
:
|
yum update -y && yum install -y openssl-devel wget unzip && \
# Install latest protoc (v32.0) that supports proto3
cd /tmp && \
wget https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-x86_64.zip && \
unzip protoc-32.0-linux-x86_64.zip -d /usr/local && \
rm protoc-32.0-linux-x86_64.zip && \
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
CIBW_ENVIRONMENT
:
"
PATH=$HOME/.cargo/bin:$PATH"
-
name
:
List built packages
run
:
ls -lh wheelhouse/
-
name
:
Check packages
run
:
twine check --strict wheelhouse/*
-
uses
:
actions/upload-artifact@v4
with
:
name
:
packages-${{ matrix.os }}-${{ matrix.target }}
path
:
wheelhouse/
build-sdist
:
name
:
Build SDist
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v4
with
:
path
:
sglang-repo
-
name
:
Move sgl-router folder to root, copy the license file, and delete sglang-repo
run
:
|
mv sglang-repo/sgl-router/* .
mv sglang-repo/LICENSE .
rm -rf sglang-repo
ls -alt
-
name
:
Set up Python
uses
:
actions/setup-python@v5
with
:
python-version
:
"
3.11"
-
name
:
Modify version for nightly release
run
:
|
# Get current version from pyproject.toml
CURRENT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])" 2>/dev/null || python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])")
# Create nightly version with date: e.g., 0.1.9.dev20250112
NIGHTLY_VERSION="${CURRENT_VERSION}.dev$(date +%Y%m%d)"
echo "Nightly version: $NIGHTLY_VERSION"
# Update pyproject.toml with nightly version (temporary, not committed)
sed -i "s/version = \"${CURRENT_VERSION}\"/version = \"${CURRENT_VERSION}\"/g" pyproject.toml
sed -i "0,/version = \"${CURRENT_VERSION}\"/s//version = \"${NIGHTLY_VERSION}\"/" pyproject.toml
# Verify the change
cat pyproject.toml | grep "^version"
-
name
:
Build SDist
run
:
|
pip install build
python -m pip install -U packaging tomli
python -m build --sdist
-
uses
:
actions/upload-artifact@v4
with
:
name
:
sdist
path
:
dist/*.tar.gz
upload
:
name
:
Upload to TestPyPI
if
:
github.repository == 'sgl-project/sglang'
# Ensure this job only runs for the sgl-project/sglang repository
needs
:
[
build
,
build-sdist
]
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/download-artifact@v4
with
:
path
:
dist
merge-multiple
:
true
-
name
:
Upload to TestPyPI
env
:
TWINE_USERNAME
:
__token__
TWINE_PASSWORD
:
${{ secrets.TEST_PYPI_TOKEN_ROUTER }}
run
:
|
pip install twine
twine upload --repository testpypi dist/* --verbose
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment