Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use MATRIX_* variables instead of redeefining new var each time (#1265)
- Loading branch information
Showing
9 changed files
with
41 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,31 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
if [[ ${TARGET_OS} == 'windows' ]]; then | ||
source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh | ||
else | ||
eval "$(conda shell.bash hook)" | ||
fi | ||
|
||
if [[ ${PACKAGE_TYPE} == "libtorch" ]]; then | ||
curl ${INSTALLATION} -o libtorch.zip | ||
if [[ ${MATRIX_PACKAGE_TYPE} == "libtorch" ]]; then | ||
curl ${MATRIX_INSTALLATION} -o libtorch.zip | ||
unzip libtorch.zip | ||
else | ||
if [ $DESIRED_PYTHON == '3.11' ]; then | ||
if [ $MATRIX_PYTHON_VERSION == '3.11' ]; then | ||
export CPYTHON_VERSIONS=3.11.0 | ||
sudo yum -y install openssl-devel libssl-dev bzip2-devel libffi-devel | ||
sudo yum -y groupinstall "Development Tools" | ||
export PYTHON_PATH="/opt/_internal/cpython-3.11.0/bin" | ||
export PIP_PATH="${PYTHON_PATH}/pip" | ||
export PIP_INSTALLATION="${INSTALLATION/pip3/"$PIP_PATH"}" | ||
export PIP_INSTALLATION="${MATRIX_INSTALLATION/pip3/"$PIP_PATH"}" | ||
export WITH_OPENSSL="/opt/openssl" | ||
./common/install_cpython.sh | ||
eval ${PYTHON_PATH}/python --version | ||
eval ${PIP_INSTALLATION} | ||
eval ${PYTHON_PATH}/python ./test/smoke_test/smoke_test.py --package torchonly | ||
else | ||
conda create -y -n ${ENV_NAME} python=${DESIRED_PYTHON} numpy pillow | ||
conda create -y -n ${ENV_NAME} python=${MATRIX_PYTHON_VERSION} numpy pillow | ||
conda activate ${ENV_NAME} | ||
export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" | ||
export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH | ||
INSTALLATION=${INSTALLATION/"conda install"/"conda install -y"} | ||
INSTALLATION=${MATRIX_INSTALLATION/"conda install"/"conda install -y"} | ||
eval $INSTALLATION | ||
python ./test/smoke_test/smoke_test.py | ||
if [[ ${TARGET_OS} != 'macos' && ${TARGET_OS} != 'windows' ]]; then | ||
|
||
if [[ ${TARGET_OS} == 'linux' ]]; then | ||
export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" | ||
export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH | ||
${PWD}/check_binary.sh | ||
fi | ||
|
||
python ./test/smoke_test/smoke_test.py | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters