File tree Expand file tree Collapse file tree 4 files changed +34
-46
lines changed Expand file tree Collapse file tree 4 files changed +34
-46
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -ex
3
+
4
+ if [[ ${TARGET_OS} == ' windows' ]]; then
5
+ source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh
6
+ else
7
+ eval " $( conda shell.bash hook) "
8
+ fi
9
+
10
+ if [[ ${PACKAGE_TYPE} == " libtorch" ]]; then
11
+ curl ${INSTALLATION} -o libtorch.zip
12
+ unzip libtorch.zip
13
+ else
14
+ conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow
15
+ conda activate ${ENV_NAME}
16
+ export CONDA_LIBRARY_PATH=" $( dirname $( which python) ) /../lib"
17
+ export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH :$LD_LIBRARY_PATH
18
+ INSTALLATION=${INSTALLATION/ " conda install" / " conda install -y" }
19
+ eval $INSTALLATION
20
+ python ./test/smoke_test/smoke_test.py
21
+ if [[ ${TARGET_OS} != ' macos' && ${TARGET_OS} != ' windows' ]]; then
22
+ ${PWD} /check_binary.sh
23
+ fi
24
+ fi
Original file line number Diff line number Diff line change 61
61
export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}"
62
62
export PACKAGE_TYPE="${{ matrix.package_type }}"
63
63
export TARGET_OS="linux"
64
- conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow
65
- conda activate ${ENV_NAME}
66
- export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib"
67
- export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH
68
-
69
- if [[ ${{ matrix.package_type }} == "libtorch" ]]; then
70
- curl ${{ matrix.installation }} -o libtorch.zip
71
- unzip libtorch.zip
72
- else
73
- INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"}
74
- eval $INSTALLATION
75
- python ./test/smoke_test/smoke_test.py
76
- ${PWD}/check_binary.sh
77
- fi
64
+ ./.github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change 67
67
export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}"
68
68
export PACKAGE_TYPE="${{ matrix.package_type }}"
69
69
export TARGET_OS="macos"
70
- export LD_LIBRARY_PATH="$(dirname $(which python))/../lib"
71
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib
72
- conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow
73
- conda activate ${ENV_NAME}
74
-
75
-
76
- if [[ ${{ matrix.package_type }} == "libtorch" ]]; then
77
- curl ${{ matrix.installation }} -o libtorch.zip
78
- unzip libtorch.zip
79
- else
80
- eval $INSTALLATION
81
- python ./test/smoke_test/smoke_test.py
82
- ${PWD}/check_binary.sh
83
- fi
70
+ ./.github/scripts/validate_binaries.sh
84
71
85
72
macos-arm64 :
86
73
needs : generate-macos-arm64-matrix
@@ -104,11 +91,5 @@ jobs:
104
91
export DESIRED_PYTHON="${{ matrix.python_version }}"
105
92
export DESIRED_CUDA="${{ matrix.desired_cuda }}"
106
93
export PACKAGE_TYPE="${{ matrix.package_type }}"
107
- export TARGET_OS="macos"
108
- export LD_LIBRARY_PATH="$(dirname $(which python))/../lib"
109
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib
110
- conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow
111
- conda activate ${ENV_NAME}
112
- eval $INSTALLATION
113
- python ./test/smoke_test/smoke_test.py
114
- ${PWD}/check_binary.sh
94
+ export TARGET_OS="macos-arm64"
95
+ ./.github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change 56
56
export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}"
57
57
export INSTALLATION="${{ matrix.installation }}"
58
58
export CUDA_VER="${{ matrix.desired_cuda }}"
59
-
60
- if [[ ${{ matrix.package_type }} == "libtorch" ]]; then
61
- curl ${{ matrix.installation }} -o libtorch.zip
62
- unzip libtorch.zip
63
- else
64
- conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow
65
- conda activate ${ENV_NAME}
66
- eval $INSTALLATION
67
- python ./test/smoke_test/smoke_test.py
68
- fi
59
+ export DESIRED_PYTHON="${{ matrix.python_version }}"
60
+ export DESIRED_CUDA="${{ matrix.desired_cuda }}"
61
+ export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}"
62
+ export PACKAGE_TYPE="${{ matrix.package_type }}"
63
+ export TARGET_OS="windows"
64
+ ./.github/scripts/validate_binaries.sh
You can’t perform that action at this time.
0 commit comments