-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from lgray/patch-1
fix: numpy 2.0 compatibility
- Loading branch information
Showing
5 changed files
with
75 additions
and
74 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,107 +2,97 @@ name: Build | |
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U -r requirements_dev.txt | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox | ||
- name: Test with tox numpy>=2 | ||
run: tox -e latestnpy | ||
- name: Test with tox numpy<2 | ||
run: tox -e oldestnpy | ||
|
||
build_wheels: | ||
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }} | ||
name: Build wheel for ${{ matrix.os }}-cp${{ matrix.python }}-${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
# Ensure that a wheel builder finishes even if another fails | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
python: [36, 37, 38, 39] | ||
bitness: [32, 64] | ||
manylinux_image: [manylinux1, manylinux2010] | ||
include: | ||
# Run 32 and 64 bit version in parallel for Linux and Windows | ||
- os: windows-latest | ||
bitness: 64 | ||
platform_id: win_amd64 | ||
- os: windows-latest | ||
bitness: 32 | ||
platform_id: win32 | ||
- os: ubuntu-latest | ||
bitness: 64 | ||
platform_id: manylinux_x86_64 | ||
python: [38, 39, 310, 311, 312] | ||
arch: [auto64, auto32, universal2] | ||
build: ["cp"] | ||
exclude: | ||
- os: ubuntu-latest | ||
bitness: 32 | ||
platform_id: manylinux_i686 | ||
- os: macos-latest | ||
bitness: 64 | ||
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 | ||
arch: universal2 | ||
- os: windows-latest | ||
manylinux_image: manylinux1 | ||
arch: universal2 | ||
- os: macos-latest | ||
manylinux_image: manylinux1 | ||
arch: auto32 | ||
steps: | ||
- name: Checkout mt2 | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
# Used to host cibuildwheel | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==1.9.0 | ||
|
||
- name: Build wheels | ||
- uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | ||
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} | ||
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
CIBW_BUILD: "${{ matrix.build }}${{ matrix.python }}*" | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: "3.8" | ||
python-version: "3.12" | ||
|
||
- name: Install numpy (imported by setup.py) | ||
run: python -m pip install numpy | ||
- name: Install numpy and setuptools | ||
run: python -m pip install numpy setuptools | ||
|
||
- name: Build sdist | ||
run: python setup.py sdist | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
pass: | ||
needs: [test, build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "All jobs passed" | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist, test] | ||
runs-on: ubuntu-latest | ||
|
@@ -111,7 +101,7 @@ jobs: | |
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
pip==19.2.3 | ||
numpy==1.19.2 | ||
bump2version==0.5.11 | ||
wheel==0.33.6 | ||
watchdog==0.9.0 | ||
flake8==3.7.8 | ||
tox==3.14.0 | ||
coverage==4.5.4 | ||
twine==1.14.0 | ||
pip | ||
numpy>=1.19.3 | ||
bump2version | ||
wheel | ||
watchdog | ||
flake8 | ||
tox | ||
coverage | ||
twine | ||
|
||
pytest==4.6.5 | ||
pytest-runner==5.1 | ||
pytest | ||
pytest-runner |
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
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