Skip to content

Commit f5ea8ca

Browse files
authored
CI: Adding build for ARM64 (#30641)
1 parent 0286f52 commit f5ea8ca

File tree

6 files changed

+48
-7
lines changed

6 files changed

+48
-7
lines changed

.travis.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ cache:
1414

1515
env:
1616
global:
17+
# Variable for test workers
18+
- PYTEST_WORKERS="auto"
1719
# create a github personal access token
1820
# cd pandas-dev/pandas
1921
# travis encrypt 'PANDAS_GH_TOKEN=personal_access_token' -r pandas-dev/pandas
@@ -38,6 +40,10 @@ matrix:
3840
- env:
3941
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network and not clipboard)"
4042

43+
- arch: arm64
44+
env:
45+
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
46+
4147
- env:
4248
- 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"
4349
services:
@@ -59,9 +65,12 @@ matrix:
5965
- mysql
6066
- postgresql
6167
allow_failures:
62-
- dist: bionic
63-
python: 3.9-dev
64-
env:
68+
- arch: arm64
69+
env:
70+
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
71+
- dist: bionic
72+
python: 3.9-dev
73+
env:
6574
- JOB="3.9-dev" PATTERN="(not slow and not network)"
6675

6776
before_install:

azure-pipelines.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ trigger:
55
pr:
66
- master
77

8+
variables:
9+
PYTEST_WORKERS: auto
10+
811
jobs:
912
# Mac and Linux use the same template
1013
- template: ci/azure/posix.yml

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
2020
XVFB="xvfb-run "
2121
fi
2222

23-
PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n auto --dist=loadfile -s --strict --durations=30 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
23+
PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile -s --strict --durations=30 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
2424

2525
echo $PYTEST_CMD
2626
sh -c "$PYTEST_CMD"

ci/setup_env.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,17 @@ else
4141
exit 1
4242
fi
4343

44-
wget -q "https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh" -O miniconda.sh
44+
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
45+
sudo apt-get -y install xvfb
46+
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh"
47+
else
48+
CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh"
49+
fi
50+
wget -q $CONDA_URL -O miniconda.sh
4551
chmod +x miniconda.sh
46-
./miniconda.sh -b
52+
53+
# Installation path is required for ARM64 platform as miniforge script installs in path $HOME/miniforge3.
54+
./miniconda.sh -b -p $MINICONDA_DIR
4755

4856
export PATH=$MINICONDA_DIR/bin:$PATH
4957

pandas/_libs/src/ujson/lib/ultrajson.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ typedef uint32_t JSUINT32;
108108

109109
#define FASTCALL_MSVC
110110

111-
#if !defined __x86_64__
111+
#if !defined __x86_64__ && !defined __aarch64__
112112
#define FASTCALL_ATTR __attribute__((fastcall))
113113
#else
114114
#define FASTCALL_ATTR

0 commit comments

Comments
 (0)