File tree 5 files changed +17
-7
lines changed 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,14 @@ jobs:
25
25
run : |
26
26
. ~/miniconda3/etc/profile.d/conda.sh
27
27
set -ex
28
- export BUILD_VERSION=0.14.0.dev$(date "+%Y%m%d")
28
+ . packaging/pkg_helpers.bash
29
+ setup_build_version
29
30
WHL_NAME=torchvision-${BUILD_VERSION}-cp${PY_VERS/.}-cp${PY_VERS/.}-macosx_11_0_arm64.whl
30
31
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng openjpeg wheel pkg-config
31
- conda run -p ${ENV_NAME} python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly
32
+ conda run -p ${ENV_NAME} python3 -mpip install torch --pre -- extra-index-url=https://download.pytorch.org/whl/nightly
32
33
conda run -p ${ENV_NAME} python3 -mpip install delocate
33
34
conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
35
+ export PYTORCH_VERSION="$(conda run -p ${ENV_NAME} python3 -mpip show torch | grep ^Version: | sed 's/Version: *//')"
34
36
conda run -p ${ENV_NAME} DYLD_FALLBACK_LIBRARY_PATH="${ENV_NAME}/lib" delocate-wheel -v --ignore-missing-dependencies dist/${WHL_NAME}
35
37
conda env remove -p ${ENV_NAME}
36
38
- name : Test wheel
42
44
. ~/miniconda3/etc/profile.d/conda.sh
43
45
set -ex
44
46
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy
45
- conda run -p ${ENV_NAME} python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/nightly
47
+ conda run -p ${ENV_NAME} python3 -mpip install torch --pre -- extra-index-url=https://download.pytorch.org/whl/nightly
46
48
conda run -p ${ENV_NAME} python3 -mpip install dist/*.whl
47
49
# Test torch is importable, by changing cwd and running import commands
48
50
conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torchvision;print('torchvision version is ', torchvision.__version__)"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
15
15
. " $script_dir /pkg_helpers.bash"
16
16
17
17
export BUILD_TYPE=conda
18
- setup_env 0.13.0
18
+ setup_env
19
19
export SOURCE_ROOT_DIR=" $PWD "
20
20
setup_conda_pytorch_constraint
21
21
setup_conda_cudatoolkit_plain_constraint
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
5
5
. " $script_dir /pkg_helpers.bash"
6
6
7
7
export BUILD_TYPE=conda
8
- setup_env 0.13.0
8
+ setup_env
9
9
export SOURCE_ROOT_DIR=" $PWD "
10
10
setup_conda_pytorch_constraint
11
11
setup_conda_cudatoolkit_constraint
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
5
5
. " $script_dir /pkg_helpers.bash"
6
6
7
7
export BUILD_TYPE=wheel
8
- setup_env 0.13.0
8
+ setup_env
9
9
setup_wheel_python
10
10
pip_install numpy pyyaml future ninja
11
11
pip_install --upgrade setuptools
Original file line number Diff line number Diff line change @@ -100,7 +100,15 @@ setup_cuda() {
100
100
# Usage: setup_build_version 0.2.0
101
101
setup_build_version () {
102
102
if [[ -z " $BUILD_VERSION " ]]; then
103
- export BUILD_VERSION=" $1 .dev$( date " +%Y%m%d" ) $VERSION_SUFFIX "
103
+ if [[ -z " $1 " ]]; then
104
+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
105
+ # version.txt for some reason has `a` character after major.minor.rev
106
+ # command below yields 0.10.0 from version.txt containing 0.10.0a0
107
+ _VERSION_BASE=$( cut -f 1 -d a " $SCRIPT_DIR /../version.txt" )
108
+ else
109
+ _VERSION_BASE=" $1 "
110
+ fi
111
+ export BUILD_VERSION=" $_VERSION_BASE .dev$( date " +%Y%m%d" ) $VERSION_SUFFIX "
104
112
else
105
113
export BUILD_VERSION=" $BUILD_VERSION$VERSION_SUFFIX "
106
114
fi
You can’t perform that action at this time.
0 commit comments