File tree 5 files changed +95
-2
lines changed
5 files changed +95
-2
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__
26
26
* .so
27
27
** /* .stderr
28
28
.pyre
29
+ dist /
29
30
30
31
# Torch
31
32
cifar /
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " torchft"
3
- version = " 0.1.0 "
3
+ version = " 0.1.1 "
4
4
edition = " 2021"
5
5
6
6
[dependencies ]
Original file line number Diff line number Diff line change 7
7
fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
8
8
tonic_build:: configure ( )
9
9
. protoc_arg ( "--experimental_allow_proto3_optional" )
10
- . compile_protos ( & [ "proto/torchft.proto" ] , & [ "proto" ] ) ?;
10
+ . compile ( & [ "proto/torchft.proto" ] , & [ "proto" ] ) ?;
11
11
Ok ( ( ) )
12
12
}
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 )
27
+
28
+ with open (PYPROJECT_FILE , "w" ) as f :
29
+ toml .dump (pyproject , f )
You can’t perform that action at this time.
0 commit comments