Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arm64 wheel to travis-ci #3421

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ if [[ $OS_NAME == "macos" ]]; then
fi
wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else # Linux
if [[ $(uname -m) == "aarch64" ]]; then
sudo rm -f $(which cmake) # remove x86 cmake
sudo apt-get update
sudo apt-get install -y cmake
fi
if [[ $TASK == "mpi" ]]; then
sudo apt-get update
sudo apt-get install --no-install-recommends -y libopenmpi-dev openmpi-bin
Expand All @@ -37,7 +42,11 @@ else # Linux
echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd
fi
if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]]; then
wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
CONDA_SCRIPT=https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
if [[ $(uname -m) == "aarch64" ]]; then
CONDA_SCRIPT=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
fi
wget -q -O conda.sh $CONDA_SCRIPT
fi
fi

Expand Down
11 changes: 9 additions & 2 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,16 @@ elif [[ $TASK == "bdist" ]]; then
cp dist/lightgbm-$LGB_VER-py2.py3-none-macosx*.whl $BUILD_ARTIFACTSTAGINGDIRECTORY
fi
else
cd $BUILD_DIRECTORY/python-package && python setup.py bdist_wheel --plat-name=manylinux1_x86_64 --universal || exit -1
cd $BUILD_DIRECTORY/python-package
if [[ $(uname -m) == "aarch64" ]]; then
python setup.py bdist_wheel --plat-name=manylinux2014_aarch64 || exit -1
WHEEL=dist/lightgbm-$LGB_VER-py3-none-manylinux2014_aarch64.whl
else
python setup.py bdist_wheel --plat-name=manylinux1_x86_64 --universal || exit -1
WHEEL=dist/lightgbm-$LGB_VER-py2.py3-none-manylinux1_x86_64.whl
fi
if [[ $AZURE == "true" ]]; then
cp dist/lightgbm-$LGB_VER-py2.py3-none-manylinux1_x86_64.whl $BUILD_ARTIFACTSTAGINGDIRECTORY
cp $WHEEL $BUILD_ARTIFACTSTAGINGDIRECTORY
fi
fi
pip install --user $BUILD_DIRECTORY/python-package/dist/*.whl || exit -1
Expand Down
29 changes: 28 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ git:
submodules: true
depth: 5


arch:
- amd64
- arm64-graviton2
os:
- linux
- osx
dist: focal
osx_image: xcode12
virt: vm
group: edge

env:
global: # default values
Expand All @@ -37,6 +43,20 @@ matrix:
env: TASK=lint
- os: osx
env: TASK=check-docs
- arch: arm64-graviton2
env: TASK=sdist PYTHON_VERSION=2.7
- arch: arm64-graviton2
env: TASK=gpu METHOD=source
- arch: arm64-graviton2
env: TASK=gpu METHOD=pip PYTHON_VERSION=3.6
- arch: arm64-graviton2
env: TASK=lint
- arch: arm64-graviton2
env: TASK=check-docs
include:
- arch: arm64-graviton2
os: linux
env: TASK=sdist PYTHON_VERSION=3.6

before_install:
- test -n $CC && unset CC
Expand All @@ -45,11 +65,18 @@ before_install:
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
export OS_NAME="macos";
export COMPILER="gcc";
elif [[ $(uname -m) == "aarch64" ]]; then
export OS_NAME="linux";
export COMPILER="gcc";
else
export OS_NAME="linux";
export COMPILER="clang";
fi
- export CONDA="$HOME/miniconda"
- if [[ $(uname -m) == "aarch64" ]]; then
export CONDA="$HOME/miniforge3";
else
export CONDA="$HOME/miniconda";
fi
- export PATH="$CONDA/bin:$PATH"
- export CONDA_ENV="test-env"
- export LGB_VER=$(head -n 1 VERSION.txt)
Expand Down