File tree 5 files changed +94
-2
lines changed
5 files changed +94
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Nightly Push
2
+
3
+ on :
4
+ # run every day at 11:15am
5
+ schedule :
6
+ - cron : ' 15 11 * * *'
7
+
8
+ jobs :
9
+ nightly :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Setup Python
13
+ uses : actions/setup-python@v5
14
+ with :
15
+ python-version : " 3.10"
16
+ architecture : x64
17
+ - name : Checkout
18
+ uses : actions/checkout@v4
19
+ - name : Install Dependencies
20
+ run : |
21
+ set -eux
22
+
23
+ pip install -U twine toml
24
+ - name : Build Docker
25
+ run : |
26
+ set -eux
27
+
28
+ docker build --progress=plain -t torchft-maturin .
29
+
30
+ - name : Set Nightly Version
31
+ run : |
32
+ set -eux
33
+
34
+ python scripts/patch_nightly_version.py
35
+
36
+ cat Cargo.toml
37
+ cat pyproject.toml
38
+
39
+ - name : Build Wheels
40
+ run : |
41
+ set -eux
42
+
43
+ VERSIONS=(
44
+ "3.9"
45
+ "3.10"
46
+ "3.11"
47
+ "3.12"
48
+ "3.13"
49
+ )
50
+
51
+ for version in "${VERSIONS[@]}"; do
52
+ docker run --rm -v $(pwd):/io -t torchft-maturin build --release --out dist --interpreter "$version"
53
+ done
54
+
55
+ - name : Twine Check
56
+ run : twine check --strict dist/*
57
+
58
+ - name : Upload to Pypi
59
+ run : twine upload --skip-existing dist/*
60
+ env :
61
+ TWINE_USERNAME : __token__
62
+ 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