Skip to content

Commit ea9f5c2

Browse files
committed
test
1 parent 8f808b4 commit ea9f5c2

File tree

2 files changed

+82
-12
lines changed

2 files changed

+82
-12
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish nightly pypi distributions
2+
3+
# based on https://github.com/pytorch/rl/blob/main/.github/workflows/nightly_build.yml
4+
5+
on:
6+
push:
7+
branches:
8+
- nightly-builds
9+
10+
jobs:
11+
build-nightly:
12+
# Don't run on forked repos.
13+
if: github.repository_owner == 'haosulab'
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.11"
22+
- name: Install pypa/build
23+
run: >-
24+
python3 -m
25+
pip install
26+
build
27+
--user
28+
- name: Build a binary wheel and a source tarball
29+
run: >-
30+
python3 -m
31+
build
32+
--sdist
33+
--wheel
34+
--outdir dist/
35+
.
36+
upload-nightly-wheel:
37+
if: github.repository_owner == 'haosulab'
38+
needs: build-nightly
39+
runs-on: ubuntu-22.04
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
- name: Upload nightly wheel
44+
uses: pypa/gh-action-pypi-publish@release/v1
45+
with:
46+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
import argparse
12
import sys
3+
from datetime import date
24
from pathlib import Path
35

46
from setuptools import find_packages, setup
57

8+
# update this version when a new official pypi release is made
69
__version__ = "3.0.0b20"
710

8-
long_description = """ManiSkill is a powerful unified framework for robot simulation and training powered by [SAPIEN](https://sapien.ucsd.edu/), with a strong focus on manipulation skills. The entire tech stack is as open-source as possible and ManiSkill v3 is in beta release now. Among its features include:
9-
- GPU parallelized visual data collection system. On the high end you can collect RGBD + Segmentation data at 30,000+ FPS with a 4090 GPU!
10-
- GPU parallelized simulation, enabling high throughput state-based synthetic data collection in simulation
11-
- GPU parallelized heteogeneous simuluation, where every parallel environment has a completely different scene/set of objects
12-
- Example tasks cover a wide range of different robot embodiments (humanoids, mobile manipulators, single-arm robots) as well as a wide range of different tasks (table-top, drawing/cleaning, dextrous manipulation)
13-
- Flexible and simple task building API that abstracts away much of the complex GPU memory management code via an object oriented design
14-
- Real2sim environments for scalably evaluating real-world policies 60-100x faster via GPU simulation.
1511

16-
Please refer our [documentation](https://maniskill.readthedocs.io/en/latest) to learn more information."""
12+
def get_package_version():
13+
return __version__
14+
15+
16+
def get_nightly_version():
17+
today = date.today()
18+
return f"{today.year}.{today.month}.{today.day}.test"
1719

1820

1921
def get_python_version():
@@ -45,6 +47,7 @@ def get_dependencies():
4547
]
4648
if sys.platform == "darwin":
4749
python_version = get_python_version()
50+
# TODO (stao): update this URL when the official pypi release is made that has mac os supported wheels
4851
install_requires.append(
4952
f"sapien @ https://github.com/haosulab/SAPIEN/releases/download/nightly/sapien-3.0.0.dev20250303+291f6a77-{python_version}-{python_version}-macosx_12_0_universal2.whl"
5053
)
@@ -54,13 +57,34 @@ def get_dependencies():
5457
return install_requires
5558

5659

57-
def main():
60+
def parse_args(argv):
61+
parser = argparse.ArgumentParser(description="ManiSkill setup.py configuration")
62+
parser.add_argument(
63+
"--package_name",
64+
type=str,
65+
default="mani_skill",
66+
choices=["mani_skill", "mani_skill_nightly"],
67+
help="the name of this output wheel. Should be either 'mani_skill' or 'mani_skill_nightly'",
68+
)
69+
return parser.parse_known_args(argv)
70+
71+
72+
def main(argv):
73+
args, unknown = parse_args(argv)
74+
name = args.package_name
75+
is_nightly = name == "mani_skill_nightly"
76+
5877
this_directory = Path(__file__).parent
5978
long_description = (this_directory / "README.md").read_text(encoding="utf8")
6079

80+
if is_nightly:
81+
version = get_nightly_version()
82+
else:
83+
version = get_package_version()
84+
6185
setup(
62-
name="mani_skill",
63-
version=__version__,
86+
name=name,
87+
version=version,
6488
description="ManiSkill3: A Unified Benchmark for Generalizable Manipulation Skills",
6589
long_description=long_description,
6690
long_description_content_type="text/markdown",
@@ -111,4 +135,4 @@ def main():
111135

112136

113137
if __name__ == "__main__":
114-
main()
138+
main(sys.argv[1:])

0 commit comments

Comments
 (0)