Skip to content

Commit 3d9ac21

Browse files
authored
Merge pull request #119 from crusaderky/sane
Refresh CI to a sane point
2 parents 1bbf096 + 922bbf7 commit 3d9ac21

File tree

5 files changed

+42
-28
lines changed

5 files changed

+42
-28
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
name: Build
1+
name: Build wheels
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: [master]
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: Build-${{ github.ref }}
14+
cancel-in-progress: true
15+
1016
jobs:
1117
build_wheels:
1218
uses: explosion/gha-cibuildwheel/.github/workflows/cibuildwheel.yml@main
@@ -16,6 +22,6 @@ jobs:
1622
with:
1723
wheel-name-pattern: "srsly-*.whl"
1824
pure-python: false
25+
create-release: ${{ startsWith(github.ref, 'refs/tags/release-') || startsWith(github.ref, 'refs/tags/prerelease-') }}
1926
secrets:
2027
gh-token: ${{ secrets.GITHUB_TOKEN }}
21-

.github/workflows/tests.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
name: tests
1+
name: Test
22

33
on:
44
push:
5-
tags-ignore:
6-
- '**'
7-
paths-ignore:
8-
- "*.md"
9-
- ".github/cibuildwheel.yml"
10-
- ".github/publish_pypi.yml"
5+
branches: [master]
116
pull_request:
12-
types: [opened, synchronize, reopened, edited]
13-
paths-ignore:
14-
- "*.md"
15-
- ".github/cibuildwheel.yml"
16-
- ".github/publish_pypi.yml"
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: Test-${{ github.ref }}
14+
cancel-in-progress: true
15+
1716
env:
1817
MODULE_NAME: 'srsly'
1918
RUN_MYPY: 'false'
2019

2120
jobs:
2221
tests:
23-
name: Test
24-
if: github.repository_owner == 'explosion'
2522
strategy:
2623
fail-fast: false
2724
matrix:
2825
os: [ubuntu-latest, windows-latest]
29-
python_version: ["3.9", "3.10", "3.11", "3.12"]
26+
# FIXME: ujson segfault on 3.14
27+
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3028
runs-on: ${{ matrix.os }}
3129

3230
steps:
3331
- name: Check out repo
34-
uses: actions/checkout@v3
32+
uses: actions/checkout@v5
33+
3534
- name: Configure Python version
36-
uses: actions/setup-python@v4
35+
uses: actions/setup-python@v6
3736
with:
3837
python-version: ${{ matrix.python_version }}
3938
architecture: x64

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
[build-system]
22
requires = [
33
"setuptools",
4-
"cython>=0.25",
4+
"cython>=0.29.1",
55
]
66
build-backend = "setuptools.build_meta"
77

88
[tool.cibuildwheel]
99
build = "*"
10-
skip = "cp38*"
10+
skip = [
11+
"cp38*", # Obsolete
12+
"cp314-*", # FIXME ujson segfaults
13+
"cp314t-*", # TODO free-threading support (note: 3.13t is skipped by default)
14+
]
1115
test-skip = ""
1216

1317
archs = ["native"]

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ classifiers =
2727
[options]
2828
zip_safe = true
2929
include_package_data = true
30-
python_requires = >=3.9,<3.15
30+
# FIXME ujson segfaults on 3.14
31+
python_requires = >=3.9,<3.14
3132
setup_requires =
3233
cython>=0.29.1
3334
install_requires =

srsly/tests/cloudpickle/cloudpickle_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ def method_c(self):
112112
return "c"
113113

114114
clsdict = _extract_class_dict(C)
115-
assert sorted(clsdict.keys()) == ["C_CONSTANT", "__doc__", "method_c"]
115+
if sys.version_info >= (3, 13):
116+
expected_keys = ["C_CONSTANT", "__doc__", "__firstlineno__", "method_c"]
117+
else:
118+
expected_keys = ["C_CONSTANT", "__doc__", "method_c"]
119+
assert sorted(clsdict) == expected_keys
116120
assert clsdict["C_CONSTANT"] == 43
117121
assert clsdict["__doc__"] is None
118122
assert clsdict["method_c"](C()) == C().method_c()

0 commit comments

Comments
 (0)