Skip to content

Commit

Permalink
CI: Adding build for ARM64 (#30641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ossdev07 authored May 12, 2020
1 parent 0286f52 commit f5ea8ca
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ cache:

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

- arch: arm64
env:
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"

- env:
- 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"
services:
Expand All @@ -59,9 +65,12 @@ matrix:
- mysql
- postgresql
allow_failures:
- dist: bionic
python: 3.9-dev
env:
- arch: arm64
env:
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
- dist: bionic
python: 3.9-dev
env:
- JOB="3.9-dev" PATTERN="(not slow and not network)"

before_install:
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ trigger:
pr:
- master

variables:
PYTEST_WORKERS: auto

jobs:
# Mac and Linux use the same template
- template: ci/azure/posix.yml
Expand Down
21 changes: 21 additions & 0 deletions ci/deps/travis-37-arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pandas-dev
channels:
- defaults
- conda-forge
dependencies:
- python=3.7.*

# tools
- cython>=0.29.13
- pytest>=5.0.1
- pytest-xdist>=1.21
- hypothesis>=3.58.0

# pandas dependencies
- botocore>=1.11
- numpy
- python-dateutil
- pytz
- pip
- pip:
- moto
2 changes: 1 addition & 1 deletion ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then
XVFB="xvfb-run "
fi

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

echo $PYTEST_CMD
sh -c "$PYTEST_CMD"
Expand Down
12 changes: 10 additions & 2 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,17 @@ else
exit 1
fi

wget -q "https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh" -O miniconda.sh
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
sudo apt-get -y install xvfb
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh"
else
CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh"
fi
wget -q $CONDA_URL -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b

# Installation path is required for ARM64 platform as miniforge script installs in path $HOME/miniforge3.
./miniconda.sh -b -p $MINICONDA_DIR

export PATH=$MINICONDA_DIR/bin:$PATH

Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/src/ujson/lib/ultrajson.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ typedef uint32_t JSUINT32;

#define FASTCALL_MSVC

#if !defined __x86_64__
#if !defined __x86_64__ && !defined __aarch64__
#define FASTCALL_ATTR __attribute__((fastcall))
#else
#define FASTCALL_ATTR
Expand Down

0 comments on commit f5ea8ca

Please sign in to comment.