mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
travis: don't override before_install (#2239)
This commit is contained in:
@@ -15,7 +15,7 @@ if %errorlevel% neq 0 (echo Error: pip not found && goto :error)
|
||||
if not exist "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" (echo Error: Couldn't find Inno Setup compiler. Please go to jrsoftware.org/isinfo.php and install Inno Setup 5 && goto :error)
|
||||
|
||||
echo ====== Installing requirements... ======
|
||||
call pip install -e .[all] || goto :error
|
||||
call pip install .[all] || goto :error
|
||||
call pip install pyinstaller || goto :error
|
||||
|
||||
echo ====== Building dvc binary... ======
|
||||
|
||||
@@ -17,9 +17,13 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
pyenv install --skip-existing --keep --verbose $osx_python_ver &> pyenv.log || tail -n 50 pyenv.log
|
||||
pyenv shell $osx_python_ver
|
||||
python --version
|
||||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
choco install python
|
||||
# NOTE: used to install and run our style checking tools
|
||||
PATH=/c/Python37:/c/Python37/Scripts:$PATH
|
||||
fi
|
||||
|
||||
pip install -e .[tests]
|
||||
pip install .[tests]
|
||||
|
||||
# stop the build if there are any readme formatting errors
|
||||
python setup.py checkdocs
|
||||
@@ -28,26 +32,28 @@ python setup.py checkdocs
|
||||
black ./ --check
|
||||
flake8 ./
|
||||
|
||||
#NOTE: ssh keys for ssh test to be able to ssh to the localhost
|
||||
ls -la ~/.ssh/
|
||||
|
||||
ssh-keygen -t rsa -N "" -f mykey
|
||||
mkdir -p ~/.ssh
|
||||
cp mykey ~/.ssh/id_rsa
|
||||
cp mykey.pub ~/.ssh/id_rsa.pub
|
||||
cat mykey.pub >> ~/.ssh/authorized_keys
|
||||
ssh-keyscan localhost >> ~/.ssh/known_hosts
|
||||
ssh-keyscan 127.0.0.1 >> ~/.ssh/known_hosts
|
||||
ssh-keyscan 0.0.0.0 >> ~/.ssh/known_hosts
|
||||
ssh 0.0.0.0 ls &> /dev/null
|
||||
ssh 127.0.0.1 ls &> /dev/null
|
||||
ssh localhost ls &> /dev/null
|
||||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
|
||||
#NOTE: ssh keys for ssh test to be able to ssh to the localhost
|
||||
ssh-keygen -t rsa -N "" -f mykey
|
||||
mkdir -p ~/.ssh
|
||||
cp mykey ~/.ssh/id_rsa
|
||||
cp mykey.pub ~/.ssh/id_rsa.pub
|
||||
cat mykey.pub >> ~/.ssh/authorized_keys
|
||||
ssh-keyscan localhost >> ~/.ssh/known_hosts
|
||||
ssh localhost ls &> /dev/null
|
||||
ssh-keyscan 127.0.0.1 >> ~/.ssh/known_hosts
|
||||
ssh 127.0.0.1 ls &> /dev/null
|
||||
ssh-keyscan 0.0.0.0 >> ~/.ssh/known_hosts
|
||||
ssh 0.0.0.0 ls &> /dev/null
|
||||
fi
|
||||
|
||||
scriptdir="$(dirname $0)"
|
||||
|
||||
echo > env.sh
|
||||
if [ -n "$TRAVIS_OS_NAME" ] && [ "$TRAVIS_OS_NAME" != "osx" ] \
|
||||
&& [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
echo 'set -e' >> env.sh
|
||||
echo 'set -x' >> env.sh
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]
|
||||
then
|
||||
bash "$scriptdir/install_azurite.sh"
|
||||
bash "$scriptdir/install_oss.sh"
|
||||
bash "$scriptdir/install_hadoop.sh"
|
||||
@@ -59,8 +65,17 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
fi
|
||||
|
||||
if [[ -n "$PYTHON_VER" ]]; then
|
||||
eval "$(pyenv init -)"
|
||||
pyenv install --skip-existing --keep --verbose "$PYTHON_VER" &> pyenv.log || tail -n 50 pyenv.log
|
||||
echo 'eval "$(pyenv init -)"' >> env.sh
|
||||
echo "pyenv shell $PYTHON_VER" >> env.sh
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
if [[ "$PYTHON_VER" == "2.7" ]]; then
|
||||
choco install python2
|
||||
echo 'PATH="/c/Python27:/c/Python27/Scripts:$PATH"' >> env.sh
|
||||
else
|
||||
echo 'PATH="/c/Python37:/c/Python37/Scripts:$PATH"' >> env.sh
|
||||
fi
|
||||
else
|
||||
eval "$(pyenv init -)"
|
||||
echo 'eval "$(pyenv init -)"' >> env.sh
|
||||
pyenv install --skip-existing "$PYTHON_VER"
|
||||
echo "pyenv global $PYTHON_VER" >> env.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
where python
|
||||
where pip
|
||||
else
|
||||
which python
|
||||
which pip
|
||||
fi
|
||||
|
||||
if [[ -z "$PYTHON_VER" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
if [[ "$(python -c 'import sys; print(sys.version[:3])')" != "$PYTHON_VER" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [[ "$(python --version 2>&1)" != "Python $PYTHON_VER" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -15,8 +15,7 @@ function retry {
|
||||
# networking issues. Thus, let's retry a few times to see if it will eventially
|
||||
# work or not.
|
||||
retry pip install --upgrade pip setuptools wheel
|
||||
retry pip install -e .[all]
|
||||
retry pip install -e .[tests]
|
||||
retry pip install .[all,tests]
|
||||
|
||||
git config --global user.email "[email protected]"
|
||||
git config --global user.name "DVC Tester"
|
||||
|
||||
Reference in New Issue
Block a user