Skip to content

Commit e258988

Browse files
committed
Switched from Archiconda to Miniforge
Signed-off-by: ossdev07 <[email protected]>
1 parent 7e83e38 commit e258988

File tree

4 files changed

+56
-93
lines changed

4 files changed

+56
-93
lines changed

.travis.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ cache:
1111
directories:
1212
- $HOME/.cache # cython cache
1313
- $HOME/.ccache # compiler cache
14-
14+
addons:
15+
apt:
16+
packages:
17+
- xvfb
1518
env:
1619
global:
1720
# create a github personal access token
@@ -33,12 +36,9 @@ matrix:
3336
- env:
3437
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network and not clipboard)"
3538

36-
- dist: trusty
37-
os: linux
38-
sudo: true
39-
arch: arm64
39+
- arch: arm64
4040
env:
41-
- JOB="3.7" ENV_FILE="ci/deps/travis-37-aarch64.yaml" PATTERN="(not slow and not network)"
41+
- JOB="3.7" ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
4242

4343
- env:
4444
- JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
@@ -95,6 +95,6 @@ script:
9595

9696
after_script:
9797
- echo "after_script start"
98-
- source activate pandas-dev && pushd /tmp && if [ `uname -m` = 'aarch64' ];then VAR="python3.7" ; else VAR="python";fi && $VAR -c "import pandas; pandas.show_versions();" && popd
98+
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
9999
- ci/print_skipped.py
100100
- echo "after_script done"

ci/deps/travis-37-arm64.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pandas-dev
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- python=3.7.*
7+
8+
# tools
9+
- cython>=0.29.13
10+
- pytest>=5.0.1
11+
- pytest-xdist>=1.21
12+
- hypothesis>=3.58.0
13+
14+
# pandas dependencies
15+
- botocore>=1.11
16+
- numpy
17+
- python-dateutil
18+
- pytz
19+
- pip
20+
- pip:
21+
- moto

ci/run_tests.sh

+11-15
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,23 @@ if [ "$COVERAGE" ]; then
1414
COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME"
1515
fi
1616

17-
# Travis does not have have an X server
18-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
19-
DISPLAY=DISPLAY=:99.0
20-
if [ `uname -m` = 'aarch64' ]; then
21-
PYTEST_CMD="xvfb-run -e /dev/stdout pytest -m \"$PATTERN\" -s --strict --durations=10 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
22-
else
23-
PYTEST_CMD="xvfb-run -e /dev/stdout $PYTEST_CMD"
24-
fi
17+
# If no X server is found, we use xvfb to emulate it
18+
if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
19+
export DISPLAY=":0"
20+
XVFB="xvfb-run "
2521
fi
2622

27-
PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n auto --dist=loadfile -s --strict --durations=10 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
28-
29-
echo $PYTEST_CMD
30-
if [ `uname -m` = 'aarch64' ]; then
31-
sudo sh -c "$PYTEST_CMD"
23+
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
24+
PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" --durations=10 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas";
3225
else
33-
sh -c "$PYTEST_CMD"
26+
PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n auto --dist=loadfile -s --strict --durations=10 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
3427
fi
3528

29+
echo $PYTEST_CMD
30+
sh -c "$PYTEST_CMD"
31+
3632
if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then
3733
echo "uploading coverage"
38-
echo "bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME"
34+
echo "bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME"
3935
bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME
4036
fi

ci/setup_env.sh

+17-71
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash -e
22

3-
IS_SUDO=""
4-
ARCHICONDA_PYTHON="python3.7"
53
# edit the locale file if needed
64
if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
75
echo "Adding locale to the first line of pandas/__init__.py"
@@ -14,13 +12,8 @@ if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
1412
echo
1513
fi
1614

15+
MINICONDA_DIR="$HOME/miniconda3"
1716

18-
if [ `uname -m` = 'aarch64' ]; then
19-
MINICONDA_DIR="$HOME/archiconda3"
20-
IS_SUDO="sudo"
21-
else
22-
MINICONDA_DIR="$HOME/miniconda3"
23-
fi
2417

2518
if [ -d "$MINICONDA_DIR" ]; then
2619
echo
@@ -43,24 +36,13 @@ else
4336
exit 1
4437
fi
4538

46-
if [ `uname -m` = 'aarch64' ]; then
47-
wget -q "https://github.com/Archiconda/build-tools/releases/download/0.2.3/Archiconda3-0.2.3-Linux-aarch64.sh" -O archiconda.sh
48-
chmod +x archiconda.sh
49-
$IS_SUDO apt-get install python-dev
50-
$IS_SUDO apt-get install python3-pip
51-
$IS_SUDO apt-get install lib$ARCHICONDA_PYTHON-dev
52-
$IS_SUDO apt-get install xvfb
53-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/local/lib:/usr/local/bin/python
54-
./archiconda.sh -b
55-
echo "chmod MINICONDA_DIR"
56-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
57-
$IS_SUDO cp $MINICONDA_DIR/bin/* /usr/bin/
58-
$IS_SUDO rm /usr/bin/lsb_release
39+
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
40+
wget -q "https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh" -O miniconda.sh;
5941
else
60-
wget -q "https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh" -O miniconda.sh
61-
chmod +x miniconda.sh
62-
./miniconda.sh -b
42+
wget -q "https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh" -O miniconda.sh;
6343
fi
44+
chmod +x miniconda.sh
45+
./miniconda.sh -b -p $MINICONDA_DIR
6446

6547
export PATH=$MINICONDA_DIR/bin:$PATH
6648

@@ -72,8 +54,8 @@ echo
7254
echo "update conda"
7355
conda config --set ssl_verify false
7456
conda config --set quiet true --set always_yes true --set changeps1 false
75-
$IS_SUDO conda install pip # create conda to create a historical artifact for pip & setuptools
76-
$IS_SUDO conda update -n base conda
57+
conda install pip conda # create conda to create a historical artifact for pip & setuptools
58+
conda update -n base conda
7759

7860
echo "conda info -a"
7961
conda info -a
@@ -113,18 +95,8 @@ conda list
11395
conda remove --all -q -y -n pandas-dev
11496

11597
echo
116-
if [ `uname -m` = 'aarch64' ]; then
117-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
118-
$IS_SUDO conda install botocore
119-
$IS_SUDO conda install numpy
120-
$IS_SUDO conda install python-dateutil=2.8.0
121-
$IS_SUDO conda install hypothesis
122-
$IS_SUDO conda install pytz
123-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
124-
fi
125-
12698
echo "conda env create -q --file=${ENV_FILE}"
127-
time $IS_SUDO conda env create -q --file="${ENV_FILE}"
99+
time conda env create -q --file="${ENV_FILE}"
128100

129101

130102
if [[ "$BITS32" == "yes" ]]; then
@@ -138,17 +110,13 @@ source activate pandas-dev
138110
echo
139111
echo "remove any installed pandas package"
140112
echo "w/o removing anything else"
141-
$IS_SUDO conda remove pandas -y --force || true
142-
if [ `uname -m` = 'aarch64' ]; then
143-
$IS_SUDO $ARCHICONDA_PYTHON -m pip uninstall -y pandas || true
144-
else
145-
pip uninstall -y pandas || true
146-
fi
113+
conda remove pandas -y --force || true
114+
pip uninstall -y pandas || true
147115

148116
echo
149117
echo "remove postgres if has been installed with conda"
150118
echo "we use the one from the CI"
151-
$IS_SUDO conda remove postgresql -y --force || true
119+
conda remove postgresql -y --force || true
152120

153121
echo
154122
echo "remove qt"
@@ -162,10 +130,7 @@ conda list pandas
162130
# Make sure any error below is reported as such
163131

164132
echo "[Build extensions]"
165-
if [ `uname -m` = 'aarch64' ]; then
166-
sudo chmod -R 777 /home/travis/.ccache
167-
fi
168-
python setup.py build_ext -q -i
133+
python setup.py build_ext -q -i -j2
169134

170135
# XXX: Some of our environments end up with old versions of pip (10.x)
171136
# Adding a new enough version of pip to the requirements explodes the
@@ -174,40 +139,21 @@ python setup.py build_ext -q -i
174139
# - py35_compat
175140
# - py36_32bit
176141
echo "[Updating pip]"
177-
if [ `uname -m` = 'aarch64' ]; then
178-
sudo chmod -R 777 /home/travis/archiconda3/envs/pandas-dev/lib/$ARCHICONDA_PYTHON/site-packages
179-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-forked
180-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-xdist
181-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-deps -U pip wheel setuptools
182-
sudo chmod -R 777 $MINICONDA_DIR
183-
else
184-
python -m pip install --no-deps -U pip wheel setuptools
185-
fi
142+
python -m pip install --no-deps -U pip wheel setuptools
186143

187144
echo "[Install pandas]"
188-
if [ `uname -m` = 'aarch64' ]; then
189-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
190-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install numpy
191-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install hypothesis
192-
$IS_SUDO chmod -R 777 /home/travis/.cache/
193-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-build-isolation -e .
194-
else
195-
python -m pip install --no-build-isolation -e .
196-
fi
145+
python -m pip install --no-build-isolation -e .
197146

198147
echo
199148
echo "conda list"
200149
conda list
201150

202151
# Install DB for Linux
152+
203153
if [[ -n ${SQL:0} ]]; then
204154
echo "installing dbs"
205-
if [ `uname -m` = 'aarch64' ]; then
206-
sudo systemctl start mysql
207-
else
208-
psql -c 'create database pandas_nosetest;' -U postgres
209-
fi
210155
mysql -e 'create database pandas_nosetest;'
156+
psql -c 'create database pandas_nosetest;' -U postgres
211157
else
212158
echo "not using dbs on non-linux Travis builds or Azure Pipelines"
213159
fi

0 commit comments

Comments
 (0)