File tree Expand file tree Collapse file tree 6 files changed +111
-6
lines changed Expand file tree Collapse file tree 6 files changed +111
-6
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ tags :
4
+ - ' v*'
5
+
6
+ name : Release
7
+
8
+ jobs :
9
+ build :
10
+ name : Github Release
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
15
+ - name : Wrap the examples
16
+ run : |
17
+ bash scripts/wrap_examples.sh
18
+ - name : Create Release
19
+ id : create_release
20
+ uses : actions/create-release@v1
21
+ env :
22
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23
+ with :
24
+ tag_name : ${{ github.ref }}
25
+ release_name : ${{ github.ref }}
26
+ draft : false
27
+ prerelease : false
28
+ - name : Upload Release Asset
29
+ id : upload-release-asset
30
+ uses : actions/upload-release-asset@v1
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ with :
34
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
35
+ asset_path : ./examples.tar.gz
36
+ asset_name : examples.tar.gz
37
+ asset_content_type : application/tar+gzip
38
+ deploy :
39
+ name : PyPI Release
40
+ runs-on : ubuntu-latest
41
+ needs : build
42
+ steps :
43
+ - name : Checkout code
44
+ uses : actions/checkout@v2
45
+ with :
46
+ submodules : recursive
47
+ - name : Set up Python
48
+ uses : actions/setup-python@v2
49
+ with :
50
+ python-version : 3.7
51
+ - name : Install dependencies
52
+ run : |
53
+ python -m pip install --upgrade pip
54
+ pip install setuptools wheel twine
55
+ - name : Build and publish
56
+ env :
57
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
58
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
59
+ run : |
60
+ python setup.py sdist
61
+ twine upload dist/*
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ include README.rst LICENSE requirements.txt
4
4
prune .eggs
5
5
6
6
graft third_party/boost
7
+ graft third_party/flatbuffers
Original file line number Diff line number Diff line change @@ -68,8 +68,9 @@ RUN pip install bluefog
68
68
69
69
RUN mkdir /bluefog
70
70
RUN cd /bluefog && \
71
- wget https://github.com/Bluefog-Lib/bluefog/releases/download/v0.2.2/examples_v0.2.2.tar.gz && \
72
- tar -zxv -f examples_v0.2.2.tar.gz && \
73
- rm examples_v0.2.2.tar.gz
71
+ VERSION=`python -c "import bluefog; print(bluefog.__version__)"` && \
72
+ wget https://github.com/Bluefog-Lib/bluefog/releases/download/v$VERSION/examples.tar.gz && \
73
+ tar -zxv -f examples.tar.gz && \
74
+ rm examples.tar.gz
74
75
75
76
WORKDIR "bluefog"
Original file line number Diff line number Diff line change @@ -78,8 +78,9 @@ RUN pip install bluefog
78
78
79
79
RUN mkdir /bluefog
80
80
RUN cd /bluefog && \
81
- wget https://github.com/Bluefog-Lib/bluefog/releases/download/v0.2.2/examples_v0.2.2.tar.gz && \
82
- tar -zxv -f examples_v0.2.2.tar.gz && \
83
- rm examples_v0.2.2.tar.gz
81
+ VERSION=`python -c "import bluefog; print(bluefog.__version__)"` && \
82
+ wget https://github.com/Bluefog-Lib/bluefog/releases/download/v$VERSION/examples.tar.gz && \
83
+ tar -zxv -f examples.tar.gz && \
84
+ rm examples.tar.gz
84
85
85
86
WORKDIR "bluefog"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Assume running under the root directory of Bluefog with `test` folder
3
+ NUM_PROC=4
4
+ MPIRUN=" mpirun -np $NUM_PROC --allow-run-as-root"
5
+ PYTEST=" pytest -s -vv"
6
+
7
+ $PYTEST ./test/torch_basics_test.py
8
+ $MPIRUN $PYTEST ./test/torch_basics_test.py
9
+ $MPIRUN $PYTEST ./test/torch_ops_test.py
10
+ $MPIRUN $PYTEST ./test/torch_win_ops_test.py
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Assume running under the root directory of Bluefog
3
+ set -e
4
+ set -x
5
+
6
+ RAND_ID=$( git log -1 --format=' %H' | fold -w 16 | head -n 1)
7
+ TMP_DIR=/tmp/bluefog_${RAND_ID}
8
+ TMP_EXAMPLE_DIR=${TMP_DIR} /examples
9
+ TMP_TEST_DIR=${TMP_DIR} /test
10
+
11
+ mkdir ${TMP_DIR}
12
+ mkdir ${TMP_EXAMPLE_DIR}
13
+ mkdir ${TMP_TEST_DIR}
14
+
15
+ cp scripts/run_unittest.sh ${TMP_DIR}
16
+
17
+ cp examples/* .py ${TMP_EXAMPLE_DIR}
18
+ cp examples/* .ipynb ${TMP_EXAMPLE_DIR}
19
+
20
+ cp test/pytest.ini ${TMP_TEST_DIR}
21
+ cp test/common.py ${TMP_TEST_DIR}
22
+ cp test/torch_basics_test.py ${TMP_TEST_DIR}
23
+ cp test/torch_ops_test.py ${TMP_TEST_DIR}
24
+ cp test/torch_win_ops_test.py ${TMP_TEST_DIR}
25
+
26
+ cd ${TMP_DIR}
27
+ tar -czf examples.tar.gz *
28
+ cd -
29
+ cp ${TMP_DIR} /examples.tar.gz .
30
+
31
+ rm -r ${TMP_DIR}
You can’t perform that action at this time.
0 commit comments