1
1
on :
2
2
workflow_dispatch :
3
+ release :
4
+ types :
5
+ - published
3
6
push :
4
- tags :
5
- - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6
-
7
- name : Creating release
8
-
9
- env :
10
- CIBW_TEST_EXTRAS : test
11
- CIBW_TEST_COMMAND : " pytest {project}/tests"
12
- CIBW_TEST_SKIP : " *_arm64 *_universal2:arm64"
13
- CIBW_ARCHS_MACOS : " x86_64 universal2"
7
+ branches :
8
+ - main
9
+ pull_request :
14
10
11
+ name : Tests/Release
15
12
jobs :
16
13
# Build & test simple source release before wasting hours building and
17
14
# testing the binary build matrix.
18
15
sdist :
19
16
name : Creating source release
20
17
runs-on : ubuntu-latest
21
18
steps :
22
- - uses : actions/checkout@v2
19
+ - uses : actions/checkout@v4.1.7
23
20
24
21
- name : Setting up Python
25
- uses : actions/setup-python@v2
22
+ uses : actions/setup-python@v5
26
23
with :
27
- python-version : 3.8
24
+ python-version : 3.13
28
25
29
26
- name : Installing python build dependencies
30
27
run : |
31
- python -m pip install --upgrade pip
32
- python -m pip install --upgrade setuptools
28
+ pip install uv
33
29
34
30
- name : Building source distribution
35
31
run : |
36
- pip install -e ".[release]"
37
- python setup.py sdist
32
+ uv build --sdist
38
33
39
34
- name : Ensuring documentation builds
40
35
run : |
41
- cd docs && make clean && make html
42
-
43
- - uses : actions/upload-artifact@v2
36
+ cd docs && uv run make clean html
37
+
38
+ - uses : actions/upload-artifact@v4.6.0
44
39
with :
40
+ name : dist-sdist
45
41
path : dist/*.tar.gz
46
-
42
+
47
43
build_wheels :
48
44
needs : [sdist]
49
45
name : " [${{ strategy.job-index }}/${{ strategy.job-total }}] py${{ matrix.py }} on ${{ matrix.os }}"
50
46
runs-on : ${{ matrix.os }}
51
47
strategy :
52
48
fail-fast : true
53
49
matrix :
54
- os : [ubuntu-20.04, windows-2019, macos-11]
55
- # cp - CPython
56
- # pp - PyPy
57
- py : ["cp39", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39"]
50
+ os : [ubuntu-latest, windows-latest, macos-14]
51
+ py : ["cp39", "cp310", "cp311", "cp312", "cp313"]
58
52
59
53
steps :
60
- - uses : actions/checkout@v2
54
+ - uses : actions/checkout@v4.1.7
61
55
62
- - uses : actions/setup-python@v2
63
- name : Setting up Python
56
+ - name : Setting up Python
57
+ uses : actions/setup-python@v5
64
58
with :
65
- python-version : ' 3.8 '
59
+ python-version : " 3.13 "
66
60
67
61
- name : Set up QEMU
68
62
if : runner.os == 'Linux'
69
- uses : docker/setup-qemu-action@v1
63
+ uses : docker/setup-qemu-action@v3
70
64
with :
71
65
platforms : all
72
66
73
67
- name : Build & test wheels
74
- uses : pypa/cibuildwheel@v2.16.5
68
+ uses : pypa/cibuildwheel@v2.22.0
75
69
env :
76
- CIBW_ARCHS_LINUX : auto aarch64 ppc64le
77
70
CIBW_BUILD : " ${{ matrix.py }}-*"
78
71
79
- - uses : actions/upload-artifact@v2
72
+ - uses : actions/upload-artifact@v4.6.0
80
73
with :
74
+ name : dist-${{ matrix.os }}-${{ matrix.py }}
81
75
path : ./wheelhouse/*.whl
82
76
83
77
upload_all :
84
- needs : [build_wheels, sdist]
85
78
name : Uploading built packages to pypi for release.
79
+ needs : [build_wheels, sdist]
80
+ if : github.event_name == 'release'
86
81
runs-on : ubuntu-latest
87
82
steps :
88
- - uses : actions/download-artifact@v2
83
+ - uses : actions/download-artifact@v4.1.8
89
84
with :
90
- name : artifact
85
+ pattern : dist-*
86
+ merge-multiple : true
91
87
path : dist
92
88
93
89
- uses : pypa/gh-action-pypi-publish@v1.4.2
@@ -98,28 +94,28 @@ jobs:
98
94
build_documentation :
99
95
name : Building & uploading documentation.
100
96
needs : [upload_all]
97
+ if : github.event_name == 'release'
101
98
runs-on : ubuntu-latest
102
99
steps :
103
- - uses : actions/checkout@v2
100
+ - uses : actions/checkout@v4.1.7
104
101
105
102
- name : Setting up Python
106
- uses : actions/setup-python@v2
103
+ uses : actions/setup-python@v5
107
104
with :
108
- python-version : 3.8
105
+ python-version : 3.13
109
106
110
107
- name : Installing python build dependencies
111
108
run : |
112
- python -m pip install --upgrade pip
113
- python -m pip install --upgrade setuptools
109
+ pip install uv
114
110
115
111
- name : Installing release dependencies.
116
112
run : |
117
- pip install -e ".[release]"
113
+ uv sync
118
114
119
115
- name : Building documentation
120
116
run : |
121
- cd docs && make clean && make html
117
+ cd docs && uv run make clean html
122
118
123
119
- name : Publishing documentation
124
120
run : |
125
- ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html
121
+ uv run ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html
0 commit comments