8000 CI Use macos-10.13 compatible libomp when building the wheels (#19064) · scikit-learn/scikit-learn@fe52d1e · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit fe52d1e

Browse files
ogriseljeremiedbb
andauthored
CI Use macos-10.13 compatible libomp when building the wheels (#19064)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
1 parent 34de1b9 commit fe52d1e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
OPENBLAS_NUM_THREADS=2
8787
SKLEARN_SKIP_NETWORK_TESTS=1
8888
SKLEARN_BUILD_PARALLEL=3
89+
MACOSX_DEPLOYMENT_TARGET=10.13
8990
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
9091
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }}
9192
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }}

build_tools/github/build_wheels.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ set -x
55

66
# OpenMP is not present on macOS by default
77
if [[ "$RUNNER_OS" == "macOS" ]]; then
8-
brew install libomp
8+
# Make sure to use a libomp version binary compatible with the oldest
9+
# supported version of the macos SDK as libomp will be vendored into the
10+
# scikit-learn wheels for macos. The list of bottles can be found at:
11+
# https://formulae.brew.sh/api/formula/libomp.json. Currently, the oldest
12+
# supported macos version is: High Sierra / 10.13. When upgrading this, be
13+
# sure to update the MACOSX_DEPLOYMENT_TARGET environment variable in
14+
# wheels.yml accordingly.
15+
wget https://homebrew.bintray.com/bottles/libomp-11.0.0.high_sierra.bottle.tar.gz
16+
brew install libomp-11.0.0.high_sierra.bottle.tar.gz
917
export CC=/usr/bin/clang
1018
export CXX=/usr/bin/clang++
1119
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"

0 commit comments

Comments
 (0)
0