Skip to content
Merged
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
104 changes: 92 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,116 @@ jobs:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python: [37, 38, 39]
bitness: [32, 64]
manylinux_image: [manylinux1, manylinux2010]
include:
# Run 32 and 64 bit version in parallel for Linux and Windows
# Window 64 bit
- os: windows-latest
python: 37
bitness: 64
platform_id: win_amd64
- os: windows-latest
python: 38
bitness: 64
platform_id: win_amd64
- os: windows-latest
python: 39
bitness: 64
platform_id: win_amd64

# Window 32 bit
- os: windows-latest
python: 37
bitness: 32
platform_id: win32
- os: windows-latest
python: 38
bitness: 32
platform_id: win32
- os: windows-latest
python: 39
bitness: 32
platform_id: win32

# Linux 64 bit manylinux1
- os: ubuntu-latest
python: 37
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux1
- os: ubuntu-latest
python: 38
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux1
- os: ubuntu-latest
python: 39
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux1

# Linux 64 bit manylinux2010
- os: ubuntu-latest
python: 37
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2010
- os: ubuntu-latest
python: 38
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2010
- os: ubuntu-latest
python: 39
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2010

# Linux 32 bit manylinux1
- os: ubuntu-latest
python: 37
bitness: 32
platform_id: manylinux_i686
manylinux_image: manylinux1
- os: ubuntu-latest
python: 38
bitness: 32
platform_id: manylinux_i686
manylinux_image: manylinux1
- os: ubuntu-latest
python: 39
bitness: 32
platform_id: manylinux_i686
manylinux_image: manylinux1

# Linux 32 bit manylinux2010
- os: ubuntu-latest
python: 37
bitness: 32
platform_id: manylinux_i686
manylinux_image: manylinux2010
- os: ubuntu-latest
python: 38
bitness: 32
platform_id: manylinux_i686
manylinux_image: manylinux2010
- os: ubuntu-latest
python: 39
bitness: 32
platform_id: manylinux_i686
manylinux_image: manylinux2010

# MacOS x86_64
- os: macos-latest
bitness: 64
python: 37
platform_id: macosx_x86_64
exclude:
- os: macos-latest
bitness: 32
# Remove manylinux1 from the windows and osx build matrix since
# manylinux_image is not used for these platforms
- os: windows-latest
manylinux_image: manylinux1
bitness: 64
python: 38
platform_id: macosx_x86_64
- os: macos-latest
manylinux_image: manylinux1
bitness: 64
python: 39
platform_id: macosx_x86_64

steps:
- name: Checkout scikit-learn
Expand Down
5 changes: 3 additions & 2 deletions build_tools/github/check_build_trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ set -x

COMMIT_MSG=$(git log --no-merges -1 --oneline)

# The commit marker "[cd build]" will trigger the build when required
# The commit marker "[cd build]" or "[cd build gh]" will trigger the build when required
if [[ "$GITHUB_EVENT_NAME" == schedule ||
"$COMMIT_MSG" =~ \[cd\ build\] ]]; then
"$COMMIT_MSG" =~ \[cd\ build\] ||
"$COMMIT_MSG" =~ \[cd\ build\ gh\] ]]; then
echo "::set-output name=build::true"
fi
10 changes: 2 additions & 8 deletions build_tools/github/check_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
with gh_wheel_path.open("r") as f:
wheel_config = yaml.safe_load(f)

build_matrix = wheel_config["jobs"]["build_wheels"]["strategy"]["matrix"]
n_python_versions = len(build_matrix["python"])

# For each python version we have: 7 wheels
# 1 osx wheel (x86_64)
# 4 linux wheel (i686 + x86_64) * (manylinux1 + manylinux2010)
# 2 windows wheel (win32 + wind_amd64)
n_wheels = 7 * n_python_versions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are at it, could you please improve the error message when n_dist_files != n_wheels to print the observed list of dist_files below?

build_matrix = wheel_config["jobs"]["build_wheels"]["strategy"]["matrix"]["include"]
n_wheels = len(build_matrix)

# plus one more for the sdist
n_wheels += 1
Expand Down
1 change: 1 addition & 0 deletions doc/developers/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ message, the following actions are taken.
---------------------- -------------------
[ci skip] CI is skipped completely
[cd build] CD is run (wheels and source distribution are built)
[cd build gh] CD is run only for GitHub Actions
[lint skip] Azure pipeline skips linting
[scipy-dev] Build & test with our dependencies (numpy, scipy, etc ...) development builds
[icc-build] Build & test with the Intel C compiler (ICC)
Expand Down