Skip to content

Commit 59f5c5e

Browse files
ossdev07odidev
authored andcommitted
Switched from Archiconda to Miniforge
Signed-off-by: ossdev07 <[email protected]>
1 parent 443e411 commit 59f5c5e

File tree

3 files changed

+34
-91
lines changed

3 files changed

+34
-91
lines changed

.travis.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ cache:
1111
directories:
1212
- $HOME/.cache # cython cache
1313
- $HOME/.ccache # compiler cache
14-
1514
env:
1615
global:
1716
# create a github personal access token
@@ -38,12 +37,9 @@ matrix:
3837
- env:
3938
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network and not clipboard)"
4039

41-
- dist: trusty
42-
os: linux
43-
sudo: true
44-
arch: arm64
40+
- arch: arm64
4541
env:
46-
- JOB="3.7" ENV_FILE="ci/deps/travis-37-aarch64.yaml" PATTERN="(not slow and not network)"
42+
- JOB="3.7" ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
4743

4844
- env:
4945
- 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"
@@ -105,6 +101,6 @@ script:
105101

106102
after_script:
107103
- echo "after_script start"
108-
- 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
104+
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
109105
- ci/print_skipped.py
110106
- echo "after_script done"

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="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

+20-69
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
1717
echo
1818
fi
1919

20+
MINICONDA_DIR="$HOME/miniconda3"
2021

21-
if [ `uname -m` = 'aarch64' ]; then
22-
MINICONDA_DIR="$HOME/archiconda3"
23-
IS_SUDO="sudo"
24-
else
25-
MINICONDA_DIR="$HOME/miniconda3"
26-
fi
2722

2823
if [ -d "$MINICONDA_DIR" ]; then
2924
echo
@@ -46,24 +41,16 @@ else
4641
exit 1
4742
fi
4843

49-
if [ `uname -m` = 'aarch64' ]; then
50-
wget -q "https://github.com/Archiconda/build-tools/releases/download/0.2.3/Archiconda3-0.2.3-Linux-aarch64.sh" -O archiconda.sh
51-
chmod +x archiconda.sh
52-
$IS_SUDO apt-get install python-dev
53-
$IS_SUDO apt-get install python3-pip
54-
$IS_SUDO apt-get install lib$ARCHICONDA_PYTHON-dev
55-
$IS_SUDO apt-get install xvfb
56-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/local/lib:/usr/local/bin/python
57-
./archiconda.sh -b
58-
echo "chmod MINICONDA_DIR"
59-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
60-
$IS_SUDO cp $MINICONDA_DIR/bin/* /usr/bin/
61-
$IS_SUDO rm /usr/bin/lsb_release
44+
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
45+
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh";
6246
else
63-
wget -q "https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh" -O miniconda.sh
64-
chmod +x miniconda.sh
65-
./miniconda.sh -b
47+
CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh";
6648
fi
49+
wget -q $CONDA_URL -O miniconda.sh;
50+
chmod +x miniconda.sh
51+
52+
# Installation path is required for ARM64 platform as miniforge script installs in path $HOME/miniforge3.
53+
./miniconda.sh -b -p $MINICONDA_DIR
6754

6855
export PATH=$MINICONDA_DIR/bin:$PATH
6956

@@ -75,8 +62,8 @@ echo
7562
echo "update conda"
7663
conda config --set ssl_verify false
7764
conda config --set quiet true --set always_yes true --set changeps1 false
78-
$IS_SUDO conda install pip # create conda to create a historical artifact for pip & setuptools
79-
$IS_SUDO conda update -n base conda
65+
conda install pip conda # create conda to create a historical artifact for pip & setuptools
66+
conda update -n base conda
8067

8168
echo "conda info -a"
8269
conda info -a
@@ -116,18 +103,8 @@ conda list
116103
conda remove --all -q -y -n pandas-dev
117104

118105
echo
119-
if [ `uname -m` = 'aarch64' ]; then
120-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
121-
$IS_SUDO conda install botocore
122-
$IS_SUDO conda install numpy
123-
$IS_SUDO conda install python-dateutil=2.8.0
124-
$IS_SUDO conda install hypothesis
125-
$IS_SUDO conda install pytz
126-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
127-
fi
128-
129106
echo "conda env create -q --file=${ENV_FILE}"
130-
time $IS_SUDO conda env create -q --file="${ENV_FILE}"
107+
time conda env create -q --file="${ENV_FILE}"
131108

132109

133110
if [[ "$BITS32" == "yes" ]]; then
@@ -141,17 +118,13 @@ source activate pandas-dev
141118
echo
142119
echo "remove any installed pandas package"
143120
echo "w/o removing anything else"
144-
$IS_SUDO conda remove pandas -y --force || true
145-
if [ `uname -m` = 'aarch64' ]; then
146-
$IS_SUDO $ARCHICONDA_PYTHON -m pip uninstall -y pandas || true
147-
else
148-
pip uninstall -y pandas || true
149-
fi
121+
conda remove pandas -y --force || true
122+
pip uninstall -y pandas || true
150123

151124
echo
152125
echo "remove postgres if has been installed with conda"
153126
echo "we use the one from the CI"
154-
$IS_SUDO conda remove postgresql -y --force || true
127+
conda remove postgresql -y --force || true
155128

156129
echo
157130
echo "remove qt"
@@ -165,10 +138,7 @@ conda list pandas
165138
# Make sure any error below is reported as such
166139

167140
echo "[Build extensions]"
168-
if [ `uname -m` = 'aarch64' ]; then
169-
sudo chmod -R 777 /home/travis/.ccache
170-
fi
171-
python setup.py build_ext -q -i
141+
python setup.py build_ext -q -i -j2
172142

173143
# TODO: Some of our environments end up with old versions of pip (10.x)
174144
# Adding a new enough version of pip to the requirements explodes the
@@ -177,40 +147,21 @@ python setup.py build_ext -q -i
177147
# - py35_compat
178148
# - py36_32bit
179149
echo "[Updating pip]"
180-
if [ `uname -m` = 'aarch64' ]; then
181-
sudo chmod -R 777 /home/travis/archiconda3/envs/pandas-dev/lib/$ARCHICONDA_PYTHON/site-packages
182-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-forked
183-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-xdist
184-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-deps -U pip wheel setuptools
185-
sudo chmod -R 777 $MINICONDA_DIR
186-
else
187-
python -m pip install --no-deps -U pip wheel setuptools
188-
fi
150+
python -m pip install --no-deps -U pip wheel setuptools
189151

190152
echo "[Install pandas]"
191-
if [ `uname -m` = 'aarch64' ]; then
192-
$IS_SUDO chmod -R 777 $MINICONDA_DIR
193-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install numpy
194-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install hypothesis
195-
$IS_SUDO chmod -R 777 /home/travis/.cache/
196-
$IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-build-isolation -e .
197-
else
198-
python -m pip install --no-build-isolation -e .
199-
fi
153+
python -m pip install --no-build-isolation -e .
200154

201155
echo
202156
echo "conda list"
203157
conda list
204158

205159
# Install DB for Linux
160+
206161
if [[ -n ${SQL:0} ]]; then
207162
echo "installing dbs"
208-
if [ `uname -m` = 'aarch64' ]; then
209-
sudo systemctl start mysql
210-
else
211-
psql -c 'create database pandas_nosetest;' -U postgres
212-
fi
213163
mysql -e 'create database pandas_nosetest;'
164+
psql -c 'create database pandas_nosetest;' -U postgres
214165
else
215166
echo "not using dbs on non-linux Travis builds or Azure Pipelines"
216167
fi

0 commit comments

Comments
 (0)