Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
04b9abb
CI: unify environment creation
saurav-chakravorty Jan 5, 2019
4ae7b16
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Jan 5, 2019
2b2b565
Change permissions
saurav-chakravorty Jan 5, 2019
e9a8442
removed pip cmd
saurav-chakravorty Jan 5, 2019
a8d22f3
removed wrong exit 0
saurav-chakravorty Jan 5, 2019
730ab53
remove hash-bang
saurav-chakravorty Jan 5, 2019
c5d357f
Merge branch 'master' into CI
saurav-chakravorty Jan 5, 2019
abaf652
further cleanup
saurav-chakravorty Jan 6, 2019
14d164a
removed space aroung var
saurav-chakravorty Jan 6, 2019
6d469db
minor typo
saurav-chakravorty Jan 6, 2019
8d34048
Changing build files for Azure
saurav-chakravorty Jan 6, 2019
6b22414
corrected file name
saurav-chakravorty Jan 6, 2019
625ddce
upper case variables and some cleanup.
saurav-chakravorty Jan 7, 2019
e68b1e2
add export path
saurav-chakravorty Jan 7, 2019
39e3365
remove debugging echo
saurav-chakravorty Jan 7, 2019
595815a
bug in install DB
saurav-chakravorty Jan 7, 2019
ae538e5
Correct spelling of Linux
saurav-chakravorty Jan 7, 2019
784244a
Only Travis has DBs
saurav-chakravorty Jan 7, 2019
6d333ab
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Jan 7, 2019
7016f52
more cleanups
saurav-chakravorty Jan 7, 2019
583b42d
fixing typo
saurav-chakravorty Jan 8, 2019
d3e9530
make dbs travis-linux only
saurav-chakravorty Jan 8, 2019
f6ea4c2
error on xvfb
saurav-chakravorty Jan 8, 2019
4cbc587
more cleanups
saurav-chakravorty Jan 8, 2019
54cca4d
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Feb 17, 2019
e66a69c
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Feb 17, 2019
b9cedb1
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Feb 18, 2019
549a297
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Mar 1, 2019
e400387
Merge remote-tracking branch 'upstream/master' into CI
saurav-chakravorty Mar 31, 2019
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ before_install:
install:
- echo "install start"
- ci/prep_cython_cache.sh
- ci/install_travis.sh
- ci/setup_env.sh
- ci/submit_cython_cache.sh
- echo "install done"

before_script:
- ci/install_db_travis.sh
- export DISPLAY=":99.0"
- ci/before_script_travis.sh

Expand Down
10 changes: 1 addition & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
sudo apt-get install -y libc6-dev-i386
ci/incremental/install_miniconda.sh
ci/incremental/setup_conda_environment.sh
ci/setup_env.sh
displayName: 'Set up environment'
condition: true

Expand All @@ -60,13 +59,6 @@ jobs:
displayName: 'Dependencies consistency'
condition: true

- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/incremental/build.sh
displayName: 'Build'
condition: true

# Require pandas
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
Expand Down
152 changes: 152 additions & 0 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
#!/bin/bash


set -v -e
# edit the locale file if needed
function edit_init()
{
if [ -n "$LOCALE_OVERRIDE" ]; then
echo "[Adding locale to the first line of pandas/__init__.py]"
rm -f pandas/__init__.pyc
sedc="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LOCALE_OVERRIDE')\n"
sed -i "$sedc" pandas/__init__.py
echo "[head -4 pandas/__init__.py]"
head -4 pandas/__init__.py
echo
fi
}

edit_init

home_dir=$(pwd)
echo
echo "[home_dir]: $home_dir"

# install miniconda
MINICONDA_DIR="$HOME/miniconda3"

echo
echo "[Using clean Miniconda install]"

if [ -d "$MINICONDA_DIR" ]; then
rm -rf "$MINICONDA_DIR"
fi


# Install Miniconda
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
if [[ "$BITS32" == "yes" ]]; then
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86.sh -O miniconda.sh
else
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
elif [[ "$unamestr" == 'Darwin' ]]; then
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
else
echo Error
fi
chmod +x miniconda.sh
./miniconda.sh -b


echo
echo "[show conda]"
which conda

echo
echo "[update conda]"
conda config --set ssl_verify false || exit 1
conda config --set quiet true --set always_yes true --set changeps1 false || exit 1
conda update -q conda

# Useful for debugging any issues with conda
conda info -a || exit 1

# set the compiler cache to work
echo
if [ -z "$NOCACHE" ] && [ "${TRAVIS_OS_NAME}" == "linux" ]; then
echo "[Using ccache]"
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
gcc=$(which gcc)
echo "[gcc]: $gcc"
ccache=$(which ccache)
echo "[ccache]: $ccache"
export CC='ccache gcc'
elif [ -z "$NOCACHE" ] && [ "${TRAVIS_OS_NAME}" == "osx" ]; then
echo "[Install ccache]"
brew install ccache > /dev/null 2>&1
echo "[Using ccache]"
export PATH=/usr/local/opt/ccache/libexec:$PATH
gcc=$(which gcc)
echo "[gcc]: $gcc"
ccache=$(which ccache)
echo "[ccache]: $ccache"
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datapythonista I think nowadays this caching might be counter-productive, though needs some testing, if you want to make an issue to remove it (but don't touch here)

echo "[Not using ccache]"
fi

# Deactivate any environment
source deactivate
# Display root environment (for debugging)
conda list
# Clean up any left-over from a previous build
# (note workaround for https://github.com/conda/conda/issues/2679:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also maybe can removed in the future (not here) @datapythonista

# `conda env remove` issue)
conda remove --all -q -y -n pandas-dev

echo
echo "[create env]"

# create our environment
time conda env create -q --file="${ENV_FILE}" || exit 1

set +v
source activate pandas-dev
set -v
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the set +v and set -v just echo the command, so better use an echo as we've been doing everywhere else:

echo "source activate pandas-dev" 

# remove any installed pandas package
# w/o removing anything else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this info to the echo saying the same

echo
echo "[removing installed pandas]"
conda remove pandas -y --force || true
pip uninstall -y pandas || true

echo
echo "[no installed pandas]"
conda list pandas


if [ -n "$LOCALE_OVERRIDE" ]; then
sudo locale-gen "$LOCALE_OVERRIDE"
fi

#!/bin/bash

# Make sure any error below is reported as such
set -v -e

echo "[building extensions]"
python setup.py build_ext -q --inplace
python -m pip install -e .

echo
echo "[show environment]"
conda list

echo
echo "[done]"

#!/bin/bash

if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
echo "not using dbs on non-linux"
exit 0
fi

echo "installing dbs"
mysql -e 'create database pandas_nosetest;'
psql -c 'create database pandas_nosetest;' -U postgres

echo "done"
exit 0