Skip to content
Open
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
23 changes: 5 additions & 18 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@ jobs:
python -m pip install --upgrade pip
pip install numpy cython build setuptools wheel

- name: Build package ${{ matrix.os }} ${{ matrix.python-version }}
run: python -m build

- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
name: package-wheel-${{ matrix.os }}-py${{ matrix.python-version }}
path: dist/*.whl
retention-days: 1

- name: Install test dependencies
run: |
# Build and test requirements
Expand Down Expand Up @@ -141,28 +131,25 @@ jobs:
needs: [build-test-wheels, build-sdist]
runs-on: ubuntu-22.04
steps:
- name: Download all wheels
- name: Download sdist
uses: actions/download-artifact@v4
with:
pattern: package-*
name: package-sdist
path: all-artifacts
merge-multiple: true

- name: List downloaded artifacts
run: ls -R all-artifacts/

- name: Upload combined artifacts
- name: Upload sdist artifact
uses: actions/upload-artifact@v4
with:
name: all-artifacts
name: sdist-artifact
path: |
all-artifacts/*.whl
all-artifacts/*.tar.gz
retention-days: 7

- name: Delete intermediate artifacts
- name: Delete intermediate artifact
uses: geekyeggo/delete-artifact@v5
with:
name: |
package-wheel-*
package-sdist
38 changes: 38 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build wheels

on:
push:
branches: [ main, gh-action-improved ]
pull_request:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install cibuildwheel
run: python -m pip install --upgrade pip cibuildwheel

- name: Build wheels
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: auto64
run: python -m cibuildwheel --output-dir wheelhouse

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
20 changes: 19 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,22 @@ version = {attr = "statmoments._version.__version__"}
# cuda = [
# "cupy-cuda12x",
# "nvmath-python"
# ]
# ]

[tool.cibuildwheel]
# CPython only; skip musllinux for now
build = "cp38-* cp39-* cp310-* cp311-* cp312-*"
skip = "pp* *-musllinux_*"
before-build = [
"python -m pip install -U pip setuptools wheel",
"python -m pip install cython numpy",
]
test-requires = [
"pytest",
"pytest-xdist",
"pytest-cov",
"numpy",
"scipy",
"h5py",
]
test-command = "pytest -q {project}/statmoments/tests"
Loading