Skip to content

Commit 06b46fe

Browse files
committed
Switched from Archiconda to Miniforge
Signed-off-by: ossdev07 <[email protected]>
1 parent c39b1f8 commit 06b46fe

File tree

3 files changed

+34
-93
lines changed

3 files changed

+34
-93
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
@@ -33,12 +32,9 @@ matrix:
3332
- env:
3433
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network and not clipboard)"
3534

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

4339
- env:
4440
- 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 +91,6 @@ script:
9591

9692
after_script:
9793
- 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
94+
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
9995
- ci/print_skipped.py
10096
- 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-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,16 @@ 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+
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.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+
CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh";
6343
fi
44+
wget -q $CONDA_URL -O miniconda.sh;
45+
chmod +x miniconda.sh
46+
47+
# Installation path is required for ARM64 platform as miniforge script installs in path $HOME/miniforge3.
48+
./miniconda.sh -b -p $MINICONDA_DIR
6449

6550
export PATH=$MINICONDA_DIR/bin:$PATH
6651

@@ -72,8 +57,8 @@ echo
7257
echo "update conda"
7358
conda config --set ssl_verify false
7459
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
60+
conda install pip conda # create conda to create a historical artifact for pip & setuptools
61+
conda update -n base conda
7762

7863
echo "conda info -a"
7964
conda info -a
@@ -113,18 +98,8 @@ conda list
11398
conda remove --all -q -y -n pandas-dev
11499

115100
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-
126101
echo "conda env create -q --file=${ENV_FILE}"
127-
time $IS_SUDO conda env create -q --file="${ENV_FILE}"
102+
time conda env create -q --file="${ENV_FILE}"
128103

129104

130105
if [[ "$BITS32" == "yes" ]]; then
@@ -138,17 +113,13 @@ source activate pandas-dev
138113
echo
139114
echo "remove any installed pandas package"
140115
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
116+
conda remove pandas -y --force || true
117+
pip uninstall -y pandas || true
147118

148119
echo
149120
echo "remove postgres if has been installed with conda"
150121
echo "we use the one from the CI"
151-
$IS_SUDO conda remove postgresql -y --force || true
122+
conda remove postgresql -y --force || true
152123

153124
echo
154125
echo "remove qt"
@@ -162,10 +133,7 @@ conda list pandas
162133
# Make sure any error below is reported as such
163134

164135
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
136+
python setup.py build_ext -q -i -j2
169137

170138
# XXX: Some of our environments end up with old versions of pip (10.x)
171139
# Adding a new enough version of pip to the requirements explodes the
@@ -174,40 +142,21 @@ python setup.py build_ext -q -i
174142
# - py35_compat
175143
# - py36_32bit
176144
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
145+
python -m pip install --no-deps -U pip wheel setuptools
186146

187147
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
148+
python -m pip install --no-build-isolation -e .
197149

198150
echo
199151
echo "conda list"
200152
conda list
201153

202154
# Install DB for Linux
155+
203156
if [[ -n ${SQL:0} ]]; then
204157
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
210158
mysql -e 'create database pandas_nosetest;'
159+
psql -c 'create database pandas_nosetest;' -U postgres
211160
else
212161
echo "not using dbs on non-linux Travis builds or Azure Pipelines"
213162
fi

0 commit comments

Comments
 (0)