File tree Expand file tree Collapse file tree 4 files changed +91
-1
lines changed Expand file tree Collapse file tree 4 files changed +91
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Nightly Push
2+
3+ on :
4+ pull_request :
5+ # run every day at 11:15am
6+ schedule :
7+ - cron : ' 15 11 * * *'
8+
9+ jobs :
10+ nightly :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Setup Python
14+ uses : actions/setup-python@v5
15+ with :
16+ python-version : " 3.10"
17+ architecture : x64
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+ - name : Install Dependencies
21+ run : |
22+ set -eux
23+
24+ pip install -U twine toml
25+ - name : Build Docker
26+ run : |
27+ set -eux
28+
29+ docker build --progress=plain -t torchft-maturin .
30+
31+ - name : Set Nightly Version
32+ run : |
33+ set -eux
34+
35+ python scripts/patch_nightly_version.py
36+
37+ cat Cargo.toml
38+ cat pyproject.toml
39+
40+ - name : Build Wheels
41+ run : |
42+ set -eux
43+
44+ VERSIONS=(
45+ "3.9"
46+ "3.10"
47+ "3.11"
48+ "3.12"
49+ "3.13"
50+ )
51+
52+ for version in "${VERSIONS[@]}"; do
53+ docker run --rm -v $(pwd):/io -t torchft-maturin build --release --out dist --interpreter "$version"
54+ done
55+
56+ - name : Twine Check
57+ run : twine check --strict dist/*
58+
59+ - name : Upload to Pypi
60+ run : twine upload dist/*
61+ env :
62+ TWINE_USERNAME : __token__
63+ TWINE_PASSWORD : ${{ secrets.NIGHTLY_PYPI_TOKEN }}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ __pycache__
2626* .so
2727** /* .stderr
2828.pyre
29+ dist /
2930
3031# Torch
3132cifar /
Original file line number Diff line number Diff line change 77fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
88 tonic_build:: configure ( )
99 . protoc_arg ( "--experimental_allow_proto3_optional" )
10- . compile_protos ( & [ "proto/torchft.proto" ] , & [ "proto" ] ) ?;
10+ . compile ( & [ "proto/torchft.proto" ] , & [ "proto" ] ) ?;
1111 Ok ( ( ) )
1212}
Original file line number Diff line number Diff line change 1+ from datetime import date
2+
3+ import toml
4+
5+
6+ def get_nightly_version ():
7+ today = date .today ()
8+ return f"{ today .year } .{ today .month } .{ today .day } "
9+
10+
11+ CARGO_FILE = "Cargo.toml"
12+ PYPROJECT_FILE = "pyproject.toml"
13+
14+
15+ cargo = toml .load (CARGO_FILE )
16+ cargo ["package" ]["version" ] = get_nightly_version ()
17+
18+ print (cargo )
19+
20+ with open (CARGO_FILE , "w" ) as f :
21+ toml .dump (cargo , f )
22+
23+ pyproject = toml .load (PYPROJECT_FILE )
24+ pyproject ["project" ]["name" ] = "torchft-nightly"
25+
26+ print (pyproject )
You can’t perform that action at this time.
0 commit comments