diff --git a/.ci/setup.sh b/.ci/setup.sh index bc72b9ff84a4..fd6bda6fb746 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -95,7 +95,12 @@ else # Linux cmake fi if [[ $SETUP_CONDA != "false" ]]; then - curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + ARCH=$(uname -m) + if [[ $ARCH == "x86_64" ]]; then + curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + else + curl -sL -o conda.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-${ARCH}.sh + fi fi fi diff --git a/.ci/test.sh b/.ci/test.sh index 80b2bea93f70..3a404a1b0f0a 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -126,9 +126,15 @@ elif [[ $TASK == "bdist" ]]; then cp dist/lightgbm-$LGB_VER-py3-none-macosx*.whl $BUILD_ARTIFACTSTAGINGDIRECTORY fi else - cd $BUILD_DIRECTORY/python-package && python setup.py bdist_wheel --plat-name=manylinux1_x86_64 --python-tag py3 || exit -1 + ARCH=$(uname -m) + if [[ $ARCH == "x86_64" ]]; then + PLATFORM="manylinux1_x86_64" + else + PLATFORM="manylinux2014_$ARCH" + fi + cd $BUILD_DIRECTORY/python-package && python setup.py bdist_wheel --plat-name=$PLATFORM --python-tag py3 || exit -1 if [[ $PRODUCES_ARTIFACTS == "true" ]]; then - cp dist/lightgbm-$LGB_VER-py3-none-manylinux1_x86_64.whl $BUILD_ARTIFACTSTAGINGDIRECTORY + cp dist/lightgbm-$LGB_VER-py3-none-$PLATFORM.whl $BUILD_ARTIFACTSTAGINGDIRECTORY fi fi pip install --user $BUILD_DIRECTORY/python-package/dist/*.whl || exit -1 diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 188e7af422b7..3169d2a50280 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -138,6 +138,68 @@ jobs: - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test ########################################### +- job: QEMU_multiarch +########################################### + variables: + COMPILER: gcc + OS_NAME: 'linux' + PRODUCES_ARTIFACTS: 'true' + pool: + vmImage: ubuntu-latest + timeoutInMinutes: 120 + strategy: + matrix: + bdist: + TASK: bdist + ARCH: aarch64 + steps: + - script: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y \ + binfmt-support \ + qemu \ + qemu-user \ + qemu-user-static + displayName: 'Install QEMU' + - script: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + displayName: 'Enable Docker multi-architecture support' + - script: | + export ROOT_DOCKER_FOLDER=/LightGBM + cat > docker.env < docker-script.sh <