[CI] Use native arm64 worker in GHAction to build M1 wheel (#10225)
* [CI] Use native arm64 worker in GHAction to build M1 wheel * Set up Conda * Use mamba * debug * fix * fix * fix * fix * fix * Temporarily disable other tests * Fix prefix * Use micromamba * Use conda-incubator/setup-miniconda * Use mambaforge * Fix * Fix prefix * Don't use deprecated set-output * Add verbose output from build * verbose * Specify arch * Bump setup-miniconda to v3 * Use Python 3.9 * Restore deleted files * WAR. --------- Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
committed by
GitHub
parent
a81b78e56b
commit
edb945d59b
@@ -25,16 +25,16 @@ if [[ "$platform_id" == macosx_* ]]; then
|
||||
# arm64 builds must cross compile because CI is on x64
|
||||
# cibuildwheel will take care of cross-compilation.
|
||||
wheel_tag=macosx_12_0_arm64
|
||||
cpython_ver=38
|
||||
setup_env_var='CIBW_TARGET_OSX_ARM64=1' # extra flag to be passed to xgboost.packager backend
|
||||
export PYTHON_CROSSENV=1
|
||||
cpython_ver=39
|
||||
cibw_archs=arm64
|
||||
export MACOSX_DEPLOYMENT_TARGET=12.0
|
||||
#OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-arm64/llvm-openmp-11.1.0-hf3c4609_1.tar.bz2"
|
||||
OPENMP_URL="https://xgboost-ci-jenkins-artifacts.s3.us-west-2.amazonaws.com/llvm-openmp-11.1.0-hf3c4609_1-osx-arm64.tar.bz2"
|
||||
elif [[ "$platform_id" == macosx_x86_64 ]]; then
|
||||
# MacOS, Intel
|
||||
wheel_tag=macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64
|
||||
cpython_ver=38
|
||||
cpython_ver=39
|
||||
cibw_archs=x86_64
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
#OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-64/llvm-openmp-11.1.0-hda6cdc1_1.tar.bz2"
|
||||
OPENMP_URL="https://xgboost-ci-jenkins-artifacts.s3.us-west-2.amazonaws.com/llvm-openmp-11.1.0-hda6cdc1_1-osx-64.tar.bz2"
|
||||
@@ -44,13 +44,13 @@ if [[ "$platform_id" == macosx_* ]]; then
|
||||
fi
|
||||
# Set up environment variables to configure cibuildwheel
|
||||
export CIBW_BUILD=cp${cpython_ver}-${platform_id}
|
||||
export CIBW_ARCHS=all
|
||||
export CIBW_ARCHS=${cibw_archs}
|
||||
export CIBW_ENVIRONMENT=${setup_env_var}
|
||||
export CIBW_TEST_SKIP='*-macosx_arm64'
|
||||
export CIBW_BUILD_VERBOSITY=3
|
||||
|
||||
sudo conda create -n build $OPENMP_URL
|
||||
PREFIX="/usr/local/miniconda/envs/build"
|
||||
mamba create -n build $OPENMP_URL
|
||||
PREFIX="$HOME/miniconda3/envs/build"
|
||||
|
||||
# Set up build flags for cibuildwheel
|
||||
# This is needed to bundle libomp lib we downloaded earlier
|
||||
|
||||
Reference in New Issue
Block a user