FIX, ENH Possible fix for segfault and oversubscription of RAM in oblique splitters #1138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wheels | |
on: | |
pull_request: | |
paths: | |
- "**.py" | |
- "**.pxd" | |
- "**.pyx" | |
- "**" | |
push: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
create_artifacts_folder: | |
name: Create Artifacts Folder | |
runs-on: ubuntu-latest | |
outputs: | |
artifacts_folder: ${{ steps.set_folder.outputs.folder_name }} | |
steps: | |
- name: Set Artifacts Folder | |
id: set_folder | |
run: echo "folder_name=artifacts/${{ github.run_id }}" >> $GITHUB_ENV | |
build_wheels: | |
name: Build wheels on ${{ matrix.os[1] }} - ${{ matrix.os[2] }} with Python ${{ matrix.python[0] }} | |
runs-on: ${{ matrix.os[0] }} | |
strategy: | |
# Ensure that a wheel builder finishes even if another fails | |
fail-fast: false | |
matrix: | |
os: # see scipy wheels.yml GH actions | |
- [ubuntu-22.04, manylinux, x86_64] | |
- [macos-11, macosx, x86_64] | |
# - [macos-12, macosx_*, arm64] | |
- [windows-2019, win, AMD64] | |
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]] | |
# python[0] is used to specify the python versions made by cibuildwheel | |
env: | |
IS_32_BIT: ${{ matrix.os[2] == 'x86' }} | |
steps: | |
- name: Checkout scikit-tree | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Setup submodule | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install spin | |
python -m spin setup-submodule | |
python -m pip install .[build] | |
- name: win_amd64 - install rtools | |
run: | | |
choco install rtools -y --no-progress --force --version=4.0.0.20220206 | |
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH | |
if: ${{ runner.os == 'Windows' && env.IS_32_BIT == 'false' }} | |
- name: Build wheels | |
uses: pypa/[email protected] | |
# Build all wheels here, apart from macosx_arm64, linux_aarch64 | |
# cibuildwheel is currently unable to pass configuration flags to | |
# CIBW_BUILD_FRONTEND https://github.com/pypa/cibuildwheel/issues/1227 | |
# (pip/build). Cross compilation with meson requires an initial | |
# configuration step to create a build directory. The subsequent wheel | |
# build then needs to use that directory. This can be done with pip | |
# using a command like: | |
# pip wheel --config-settings builddir=build . | |
# if: >- | |
# ( ! contains(matrix.os[2], 'arm64' ) ) | |
env: | |
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.os[1] }}* | |
CIBW_ARCHS: ${{ matrix.os[2] }} | |
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/ | |
name: ${{ matrix.python[0] }}-${{ matrix.os[1] }} | |
build-wheels-m1: | |
name: Build wheels on Arm M1 with Python ${{ matrix.python[0] }} | |
runs-on: macos-latest | |
strategy: | |
# Ensure that a wheel builder finishes even if another fails | |
fail-fast: false | |
matrix: | |
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]] | |
# python[0] is used to specify the python versions made by cibuildwheel | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" # Replace with the desired Python version | |
- name: Install cibuildwheel dependencies | |
run: | | |
pip install cibuildwheel | |
pip install spin | |
spin setup-submodule | |
pip install .[build] | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: ${{ matrix.python[0] }}-macosx_arm64 | |
CIBW_ARCHS_MACOS: arm64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse | |
name: ${{ matrix.python[0] }}-arm | |
# Build the source distribution under Linux | |
build_sdist: | |
name: Source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout scikit-tree | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" # update once build dependencies are available | |
- name: Build source distribution | |
run: | | |
pip install spin build | |
spin setup-submodule | |
pip install .[build] | |
python -m build | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist | |
name: ${{ matrix.python[0] }}-${{ matrix.os[1] }} |