Skip to content

Commit 8c56ad2

Browse files
committed
General CI refresh
1 parent bfdeca0 commit 8c56ad2

9 files changed

Lines changed: 80 additions & 97 deletions

File tree

.github/workflows/cibuildwheel.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,30 @@ 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/
@@ -27,14 +38,7 @@ jobs:
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
4044

@@ -97,8 +101,8 @@ jobs:
97101
TAG_NAME=${FULL_TAG#prerelease-}
98102
IS_PRERELEASE=true
99103
else
100-
echo "Tag does not match expected patterns" >&2
101-
exit 1
104+
TAG_NAME=$FULL_TAG
105+
IS_PRERELEASE=false
102106
fi
103107
echo "FULL_TAG=$TAG_NAME" >> $GITHUB_ENV
104108
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
@@ -114,7 +118,7 @@ jobs:
114118
- name: Create Draft Release
115119
id: create_release
116120
uses: softprops/action-gh-release@v2
117-
if: startsWith(github.ref, 'refs/tags/')
121+
if: startsWith(github.ref, 'refs/tags/release-') || startsWith(github.ref, 'refs/tags/prerelease-')
118122
env:
119123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120124
with:

.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: 35 additions & 50 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,10 +22,26 @@ 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"]
34+
cc: ['']
35+
include:
36+
# Note: default compiler for Linux is gcc. cibuildwheel uses gcc.
37+
# FIXME: clang crashes on ARM Linux
38+
- os: ubuntu-latest
39+
python_version: "3.10"
40+
cc: clang
41+
- os: ubuntu-latest
42+
python_version: "3.14"
43+
cc: clang
44+
2745
runs-on: ${{ matrix.os }}
2846

2947
steps:
@@ -34,7 +52,6 @@ jobs:
3452
uses: actions/setup-python@v6
3553
with:
3654
python-version: ${{ matrix.python_version }}
37-
architecture: x64
3855

3956
# Install LLVM 18 on Windows
4057
- name: Install LLVM 18 on Windows
@@ -52,18 +69,6 @@ jobs:
5269
run: |
5370
dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" /b
5471
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: |
6772
set "PATH=C:\Program Files\LLVM\bin;%PATH%"
6873
set "AR=llvm-ar"
6974
set "AS=llvm-as"
@@ -76,42 +81,22 @@ jobs:
7681

7782
- name: Build wheel (Mac)
7883
if: startsWith(matrix.os, 'macos')
79-
run: |
80-
python -m build --wheel
81-
82-
- name: Build wheel (Linux / clang)
83-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.6'
8484
run: |
8585
clang --version
86-
CC=clang python -m build --wheel
86+
python -m build --wheel
8787
88-
- name: Build wheel (Linux / gcc-9)
89-
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.7' || matrix.python_version == '3.8')
88+
- name: Build wheel (Linux / gcc)
89+
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == ''
9090
run: |
91-
sudo apt update
92-
sudo apt install gcc-9
93-
gcc-9 --version
94-
CC=gcc-9 python -m build --wheel
91+
gcc --version
92+
python -m build --wheel
9593
96-
- name: Build wheel (Linux / gcc-10)
97-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.9'
98-
run: |
99-
sudo apt update
100-
sudo apt install gcc-10
101-
gcc-10 --version
102-
CC=gcc-10 python -m build --wheel
103-
- name: Build wheel (Linux / clang-13)
104-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.10'
94+
- name: Build wheel (Linux / clang)
95+
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == 'clang'
10596
run: |
10697
clang --version
10798
CC=clang python -m build --wheel
10899
109-
- name: Build wheel (Linux / gcc)
110-
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.11' || matrix.python_version == '3.12')
111-
run: |
112-
gcc --version
113-
CC=gcc python -m build --wheel
114-
115100
# TODO: install mypy from requirements if reenabled
116101
- name: Run mypy
117102
shell: bash

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ blis/cy.c
66
blis/py.c
77
.eggs
88
.env/
9-
env3.6
9+
env/
1010
.hypothesis/
1111
build/
1212
cache/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ architectures. For example, here's how to build support for the ARM architecture
5555
```bash
5656
git clone https://github.com/explosion/cython-blis && cd cython-blis
5757
git pull && git submodule init && git submodule update && git submodule status
58-
python3 -m venv env3.6
59-
source env3.6/bin/activate
58+
python3 -m venv env
59+
source env/bin/activate
6060
pip install -r requirements.txt
6161
./bin/generate-make-jsonl linux cortexa57
6262
BLIS_ARCH="cortexa57" python setup.py build_ext --inplace
@@ -130,8 +130,8 @@ build the jsonl files for the generic arch:
130130
git clone https://github.com/explosion/cython-blis && cd cython-blis
131131
git pull && git submodule init && git submodule update && git submodule
132132
status
133-
/opt/python/cp36-cp36m/bin/python -m venv env3.6
134-
source env3.6/bin/activate
133+
/opt/python/cp36-cp36m/bin/python -m venv env
134+
source env/bin/activate
135135
pip install -r requirements.txt
136136
./bin/generate-make-jsonl linux generic --export
137137
BLIS_ARCH=generic python setup.py build_ext --inplace

azure-pipelines.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ jobs:
1010
condition: true
1111
strategy:
1212
matrix:
13-
Python39Mac:
13+
Python310Mac:
1414
imageName: 'macos-latest'
15-
python.version: '3.9'
16-
Python39Windows:
15+
python.version: '3.10'
16+
Python310Windows:
1717
imageName: 'windows-latest'
18-
python.version: '3.9'
19-
Python39Linux:
18+
python.version: '3.10'
19+
Python310Linux:
2020
imageName: 'ubuntu-22.04'
21-
python.version: '3.9'
21+
python.version: '3.10'
2222

2323
maxParallel: 4
2424
pool:
@@ -80,15 +80,15 @@ jobs:
8080
condition: true
8181
strategy:
8282
matrix:
83-
Python39Mac:
83+
Python310Mac:
8484
imageName: 'macos-latest'
85-
python.version: '3.9'
86-
Python39Windows:
85+
python.version: '3.10'
86+
Python310Windows:
8787
imageName: 'windows-latest'
88-
python.version: '3.9'
89-
Python39Linux:
88+
python.version: '3.10'
89+
Python310Linux:
9090
imageName: 'ubuntu-22.04'
91-
python.version: '3.9'
91+
python.version: '3.10'
9292
maxParallel: 4
9393
pool:
9494
vmImage: $(imageName)

build-constraints.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
# build version constraints for use with wheelwright + multibuild
2-
numpy==1.15.0; python_version<='3.7' and platform_machine!='aarch64'
3-
numpy==1.19.2; python_version<='3.7' and platform_machine=='aarch64'
4-
numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'
5-
numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'
6-
numpy>=2.0.0,<3.0.0; python_version>='3.9'
2+
numpy>=2.0.0,<3.0.0

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Test requirements
2-
numpy>=1.15.0; python_version < "3.9"
3-
numpy>=1.19.0; python_version >= "3.9"
2+
numpy>=1.19.0
43
pytest
54
cython>=3.0,<4.0
65
hypothesis>=4.0.0,<7.0.0

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)