Skip to content

Commit f45b619

Browse files
authored
Update CI (#78)
* Update CI * fix ci * skip cp 39 * add build dep * fix building sdist
1 parent 0812c18 commit f45b619

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

.github/workflows/build-wheels.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,64 @@ name: Build Wheels
22

33
# Only run on new tags starting with `v`
44
on:
5+
pull_request:
56
push:
67
tags:
7-
- 'v*'
8+
- "v*"
89

910
jobs:
1011
build_wheels:
1112
name: Build wheel on ${{ matrix.os }}
1213
runs-on: ${{ matrix.os }}
1314
strategy:
1415
matrix:
15-
os: [ubuntu-latest, windows-latest, macos-latest]
16+
# macos-13 is an intel runner, macos-14 is apple silicon
17+
os:
18+
[ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
1619

1720
steps:
18-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
1922

20-
- name: Build wheels
21-
uses: pypa/cibuildwheel@v2.11.2
22-
env:
23-
# From rio-color here:
24-
# https://github.com/mapbox/rio-color/blob/0ab59ad8e2db99ad1d0c8bd8c2e4cf8d0c3114cf/appveyor.yml#L3
25-
CIBW_SKIP: "cp2* cp35* pp* *-win32 *-manylinux_i686"
26-
CIBW_ARCHS_MACOS: x86_64 arm64
23+
- name: Build wheels
24+
uses: pypa/cibuildwheel@v3.0.0
2725

28-
- uses: actions/upload-artifact@v2
29-
with:
30-
path: ./wheelhouse/*.whl
26+
- uses: actions/upload-artifact@v4
27+
with:
28+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
29+
path: ./wheelhouse/*.whl
3130

3231
build_sdist:
3332
name: Build source distribution
3433
runs-on: ubuntu-latest
3534
steps:
36-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v4
3736

3837
- uses: actions/setup-python@v2
3938
name: Install Python
4039
with:
41-
python-version: '3.8'
40+
python-version: "3.12"
4241

4342
- name: Install dependencies
4443
run: |
45-
python -m pip install numpy Cython
44+
python -m pip install numpy Cython build
4645
4746
- name: Build sdist
48-
run: python setup.py sdist
47+
run: python -m build --sdist
4948

50-
- uses: actions/upload-artifact@v2
49+
- uses: actions/upload-artifact@v4
5150
with:
51+
name: sdist
5252
path: dist/*.tar.gz
5353

5454
upload_pypi:
5555
needs: [build_wheels, build_sdist]
5656
runs-on: ubuntu-latest
57+
if: startsWith(github.ref, 'refs/tags/')
5758
steps:
58-
- uses: actions/download-artifact@v2
59+
- uses: actions/download-artifact@v4
5960
with:
60-
name: artifact
6161
path: dist
62+
merge-multiple: true
6263

6364
- uses: pypa/gh-action-pypi-publish@master
6465
with:

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ name: CI
44
on:
55
push:
66
branches:
7-
- master
7+
- master
88
tags:
9-
- '*'
9+
- "*"
1010
pull_request:
1111

1212
jobs:
1313
tests:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: [3.6, 3.7, 3.8, 3.9]
17+
python-version: [3.9]
1818

1919
steps:
2020
- uses: actions/checkout@v2

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "cython>=0.29.29", "oldest-supported-numpy"]
2+
requires = ["setuptools", "wheel", "cython>=0.29.29", "numpy>=2", "build"]
3+
4+
[tool.cibuildwheel]
5+
skip = "cp38*"

0 commit comments

Comments
 (0)