Skip to content

Commit f25660d

Browse files
committed
General CI refresh
1 parent 15e21a5 commit f25660d

5 files changed

Lines changed: 63 additions & 80 deletions

File tree

.github/workflows/cibuildwheel.yml

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,48 @@ name: Build
22

33
on:
44
push:
5-
tags:
6-
# ytf did they invent their own syntax that's almost regex?
7-
# ** matches 'zero or more of any character'
8-
- 'release-v[0-9]+.[0-9]+.[0-9]+**'
9-
- 'prerelease-v[0-9]+.[0-9]+.[0-9]+**'
5+
branches: [main]
6+
pull_request:
7+
branches: ["*"]
8+
workflow_dispatch: # allows you to trigger manually
9+
10+
# When this workflow is queued, automatically cancel any previous running
11+
# or pending jobs from the same branch
12+
concurrency:
13+
group: cidbuildwheel-${{ github.ref }}
14+
cancel-in-progress: true
15+
1016
jobs:
1117
build_wheels:
1218
name: Build wheels on ${{ matrix.os }}
1319
runs-on: ${{ matrix.os }}
1420
strategy:
21+
fail-fast: false
1522
matrix:
16-
# macos-13 is an intel runner, macos-14 is apple silicon
17-
os: [ubuntu-latest, macos-13, macos-14, ubuntu-24.04-arm, windows-latest]
23+
os:
24+
- ubuntu-latest # x64
25+
- ubuntu-24.04-arm # ARM
26+
- macos-15-intel # x64
27+
- macos-latest # ARM
28+
- windows-latest # x64
1829

1930
steps:
2031
# See https://cibuildwheel.pypa.io/en/1.x/cpp_standards/
2132
- uses: ilammy/msvc-dev-cmd@v1
22-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
2334

2435
# Install LLVM 18 on Windows
2536
- name: Install LLVM 18 on Windows
2637
if: runner.os == 'Windows'
2738
run: |
2839
choco install llvm --version=18.1.8 -y --force
2940
echo "C:\Program Files\LLVM\bin" >> $env:GITHUB_PATH
30-
# This is crazy slow. We'll need to wait for arm Linux
31-
# runners.
32-
# aarch64 (arm) is built via qemu emulation on Linux
33-
#- name: Set up QEMU
34-
# if: runner.os == 'Linux'
35-
# uses: docker/setup-qemu-action@v3
36-
# with:
37-
# platforms: all
41+
3842
- name: Debug env
3943
run: env
44+
4045
- name: Build wheels
41-
uses: pypa/cibuildwheel@v3.2.1
46+
uses: pypa/cibuildwheel@v3.3.0
4247
env:
4348
CIBW_ARCHS_LINUX: auto
4449
DISTUTILS_USE_SDK: 1
@@ -52,7 +57,8 @@ jobs:
5257
package-dir: .
5358
output-dir: wheelhouse
5459
config-file: "{package}/pyproject.toml"
55-
- uses: actions/upload-artifact@v4
60+
61+
- uses: actions/upload-artifact@v5
5662
with:
5763
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
5864
path: ./wheelhouse/*.whl
@@ -61,14 +67,16 @@ jobs:
6167
name: Build source distribution
6268
runs-on: ubuntu-latest
6369
steps:
64-
- uses: actions/checkout@v4
70+
- uses: actions/checkout@v6
6571

6672
- name: Build sdist
6773
run: pipx run build --sdist
68-
- uses: actions/upload-artifact@v4
74+
75+
- uses: actions/upload-artifact@v5
6976
with:
7077
name: cibw-sdist
7178
path: dist/*.tar.gz
79+
7280
create_release:
7381
needs: [build_wheels, build_sdist]
7482
runs-on: ubuntu-latest
@@ -93,22 +101,24 @@ jobs:
93101
TAG_NAME=${FULL_TAG#prerelease-}
94102
IS_PRERELEASE=true
95103
else
96-
echo "Tag does not match expected patterns" >&2
97-
exit 1
104+
TAG_NAME=$FULL_TAG
105+
IS_PRERELEASE=false
98106
fi
99107
echo "FULL_TAG=$TAG_NAME" >> $GITHUB_ENV
100108
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
101109
echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV
102-
- uses: actions/download-artifact@v4
110+
111+
- uses: actions/download-artifact@v5
103112
with:
104113
# unpacks all CIBW artifacts into dist/
105114
pattern: cibw-*
106115
path: dist
107116
merge-multiple: true
117+
108118
- name: Create Draft Release
109119
id: create_release
110120
uses: softprops/action-gh-release@v2
111-
if: startsWith(github.ref, 'refs/tags/')
121+
if: startsWith(github.ref, 'refs/tags/release-') || startsWith(github.ref, 'refs/tags/prerelease-')
112122
env:
113123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114124
with:

.github/workflows/generate_jsonl.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727

2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
3030
with:
3131
submodules: 'recursive'
3232

3333
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@v6
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737
architecture: arm64
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
./bin/generate-make-jsonl linux cortexa57 --export
4646
- name: Upload artifacts
47-
uses: actions/upload-artifact@v4
47+
uses: actions/upload-artifact@v5
4848
with:
4949
name: jsonl-${{ runner.os }}
5050
path: artifacts/
@@ -53,7 +53,7 @@ jobs:
5353
# Optional: Automatically commit artifacts
5454
#- name: Download all artifacts
5555
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
56-
# uses: actions/download-artifact@v4
56+
# uses: actions/download-artifact@v5
5757
# with:
5858
# path: downloaded-artifacts
5959
#- name: Commit artifacts

.github/workflows/publish_pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# The cibuildwheel action triggers on creation of a release, this
2-
# triggers on publication.
1+
# The cibuildwheel action triggers on all pushes and PRs;
2+
# this action triggers on release publication.
33
# The expected workflow is to create a draft release and let the wheels
44
# upload, and then hit 'publish', which uploads to PyPi.
55

.github/workflows/tests.yml

Lines changed: 21 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ name: tests
22

33
on:
44
push:
5-
#tags-ignore:
6-
# - '**'
7-
paths-ignore:
8-
- "*.md"
5+
branches: [main]
96
pull_request:
10-
types: [opened, synchronize, reopened, edited]
11-
paths-ignore:
12-
- "*.md"
7+
branches: ["*"]
8+
workflow_dispatch: # allows you to trigger manually
9+
10+
# When this workflow is queued, automatically cancel any previous running
11+
# or pending jobs from the same branch
12+
concurrency:
13+
group: tests-${{ github.ref }}
14+
cancel-in-progress: true
1315

1416
env:
1517
MODULE_NAME: 'blis'
@@ -20,21 +22,25 @@ jobs:
2022
name: Test
2123
if: github.repository_owner == 'explosion'
2224
strategy:
23-
fail-fast: true
25+
fail-fast: false
2426
matrix:
25-
os: [ubuntu-latest, windows-2022]
26-
python_version: ["3.9", "3.10", "3.11", "3.12"]
27+
os:
28+
- ubuntu-latest # x64
29+
- ubuntu-24.04-arm # ARM
30+
- macos-15-intel # x64
31+
- macos-latest # ARM
32+
- windows-latest # x64
33+
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2734
runs-on: ${{ matrix.os }}
2835

2936
steps:
3037
- name: Check out repo
31-
uses: actions/checkout@v3
38+
uses: actions/checkout@v6
3239

3340
- name: Configure Python version
34-
uses: actions/setup-python@v4
41+
uses: actions/setup-python@v6
3542
with:
3643
python-version: ${{ matrix.python_version }}
37-
architecture: x64
3844

3945
# Install LLVM 18 on Windows
4046
- name: Install LLVM 18 on Windows
@@ -52,18 +58,6 @@ jobs:
5258
run: |
5359
dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" /b
5460
55-
set "PATH=C:\\Program Files\\LLVM\\bin;%PATH%"
56-
set "AR=llvm-ar"
57-
set "AS=llvm-as"
58-
set "CC=clang"
59-
set "RANLIB=echo"
60-
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
61-
clang --version
62-
python -m build --wheel
63-
shell: cmd
64-
- name: Build wheel (Windows)
65-
if: startsWith(matrix.os, 'windows')
66-
run: |
6761
set "PATH=C:\Program Files\LLVM\bin;%PATH%"
6862
set "AR=llvm-ar"
6963
set "AS=llvm-as"
@@ -73,40 +67,20 @@ jobs:
7367
clang --version
7468
python -m build --wheel
7569
shell: cmd
70+
7671
- name: Build wheel (Mac)
7772
if: startsWith(matrix.os, 'macos')
7873
run: |
7974
python -m build --wheel
8075
81-
- name: Build wheel (Linux / clang)
82-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.6'
83-
run: |
84-
clang --version
85-
CC=clang python -m build --wheel
86-
87-
- name: Build wheel (Linux / gcc-9)
88-
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.7' || matrix.python_version == '3.8')
89-
run: |
90-
sudo apt update
91-
sudo apt install gcc-9
92-
gcc-9 --version
93-
CC=gcc-9 python -m build --wheel
94-
95-
- name: Build wheel (Linux / gcc-10)
96-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.9'
97-
run: |
98-
sudo apt update
99-
sudo apt install gcc-10
100-
gcc-10 --version
101-
CC=gcc-10 python -m build --wheel
10276
- name: Build wheel (Linux / clang-13)
10377
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.10'
10478
run: |
10579
clang --version
10680
CC=clang python -m build --wheel
10781
10882
- name: Build wheel (Linux / gcc)
109-
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.11' || matrix.python_version == '3.12')
83+
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version != '3.10'
11084
run: |
11185
gcc --version
11286
CC=gcc python -m build --wheel

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ def chdir(new_dir):
306306
"numpy>=2.0.0,<3.0.0",
307307
],
308308
install_requires=[
309-
"numpy>=1.15.0,<3.0.0; python_version < '3.9'",
310-
"numpy>=1.19.0,<3.0.0; python_version >= '3.9'",
309+
"numpy>=1.19.0,<3.0.0",
311310
],
312311
ext_modules=cythonize(
313312
[
@@ -324,7 +323,7 @@ def chdir(new_dir):
324323
],
325324
language_level=3,
326325
),
327-
python_requires=">=3.9,<3.15",
326+
python_requires=">=3.10,<3.15",
328327
cmdclass={"build_ext": ExtensionBuilder},
329328
package_data={"": ["*.json", "*.jsonl", "*.pyx", "*.pxd"]},
330329
name="blis",

0 commit comments

Comments
 (0)