-
Notifications
You must be signed in to change notification settings - Fork 223
665 lines (573 loc) · 21 KB
/
artifact.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
name: artifact
on: push
env:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
RUST_TOOLCHAIN: "nightly-2024-12-22"
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
UV_LINK_MODE: "copy"
jobs:
sdist:
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
fail-fast: false
env:
RUST_TOOLCHAIN: "1.82" # MSRV
steps:
- name: rustup stable
run: |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain "${RUST_TOOLCHAIN}" -y
rustup default "${RUST_TOOLCHAIN}"
- uses: actions/checkout@v4
- run: python3 -m pip install --user --upgrade pip "maturin==1.7.5" wheel
- name: Vendor dependencies
run: |
maturin build
cargo fetch
mkdir .cargo
cp ci/sdist.toml .cargo/config.toml
cargo vendor include/cargo --versioned-dirs
- run: maturin sdist --out=dist
- run: python3 -m pip install --user dist/orjson*.tar.gz
env:
CARGO_NET_OFFLINE: "true"
- run: python3 -m pip install --user -r test/requirements.txt -r integration/requirements.txt mypy
- run: pytest -v test
env:
PYTHONMALLOC: "debug"
- run: ./integration/run thread
- run: ./integration/run http
- run: ./integration/run init
- run: ./integration/run typestubs
- name: Store sdist
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_sdist
path: dist
overwrite: true
retention-days: 1
manylinux_amd64:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: [
{ interpreter: 'python3.13', package: 'python3.13', compatibility: "manylinux_2_17" },
{ interpreter: 'python3.12', package: 'python3.12', compatibility: "manylinux_2_17" },
{ interpreter: 'python3.11', package: 'python3.11', compatibility: "manylinux_2_17" },
{ interpreter: 'python3.10', package: 'python3.10', compatibility: "manylinux_2_17" },
{ interpreter: 'python3.9', package: 'python3.9', compatibility: "manylinux_2_17" },
{ interpreter: 'python3.8', package: 'python3.8', compatibility: "manylinux_2_17" },
]
arch: [
{
cc: "clang",
cflags: "-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm",
features: "avx512,unstable-simd,yyjson",
ldflags: "-fuse-ld=lld -Wl,-plugin-opt=also-emit-llvm -Wl,--as-needed -Wl,-zrelro,-znow",
rustflags: "-C linker=clang -C link-arg=-fuse-ld=lld -C linker-plugin-lto -C lto=fat -C link-arg=-Wl,-zrelro,-znow -Z mir-opt-level=4 -Z threads=4 -D warnings",
tag: null,
target: "x86_64-unknown-linux-gnu",
},
]
env:
CARGO_TARGET_DIR: "/tmp/orjson"
CC: "${{ matrix.arch.cc }}"
CFLAGS: "${{ matrix.arch.cflags }}"
COMPATIBILITY: "${{ matrix.python.compatibility }}"
FEATURES: "${{ matrix.arch.features }}"
LDFLAGS: "${{ matrix.arch.ldflags }}"
PYTHON: "${{ matrix.python.interpreter }}"
PYTHON_PACKAGE: "${{ matrix.python.package }}"
RUSTFLAGS: "${{ matrix.arch.rustflags }}"
TARGET: "${{ matrix.arch.target }}"
VENV: ".venv"
steps:
- name: cpuinfo
run: cat /proc/cpuinfo
- uses: actions/checkout@v4
- name: setup-qemu-container
uses: sandervocke/setup-qemu-container@v1
with:
container: registry.fedoraproject.org/fedora:42
arch: ${{ matrix.arch.tag }}
initial_delay: 5s
podman_args: "-v .:/orjson -v /tmp:/tmp --workdir /orjson"
- name: setup-shell-wrapper
uses: sandervocke/setup-shell-wrapper@v1
- name: Build and test
shell: wrap-shell {0}
env:
WRAP_SHELL: run-in-container.sh
run: |
set -eou pipefail
mkdir dist
export PATH="/root/.cargo/bin:/home/runner/work/orjson/orjson/.venv:/home/runner/.cargo/bin:$PATH"
./script/install-fedora
source "${VENV}/bin/activate"
maturin build --release --strip \
--features="${FEATURES}" \
--compatibility="${COMPATIBILITY}" \
--interpreter="${PYTHON}" \
--target="${TARGET}"
uv pip install ${CARGO_TARGET_DIR}/wheels/orjson*.whl
pytest -v test
./integration/run thread
./integration/run http
./integration/run init
cp ${CARGO_TARGET_DIR}/wheels/orjson*.whl dist
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_manylinux_2_17_amd64_${{ matrix.python.interpreter }}
path: dist
overwrite: true
retention-days: 1
manylinux_aarch64:
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
python: [
{ interpreter: 'python3.13', package: 'python3.13', compatibility: "manylinux_2_17" },
]
arch: [
{
cc: "clang",
cflags: "-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm",
features: "unstable-simd,yyjson",
ldflags: "-fuse-ld=lld -Wl,-plugin-opt=also-emit-llvm -Wl,--as-needed -Wl,-zrelro,-znow",
rustflags: "-C linker=clang -C link-arg=-fuse-ld=lld -C linker-plugin-lto -C lto=fat -C link-arg=-Wl,-zrelro,-znow -Z mir-opt-level=4 -Z threads=4 -D warnings",
tag: "aarch64",
target: "aarch64-unknown-linux-gnu",
},
]
env:
CARGO_TARGET_DIR: "/tmp/orjson"
CC: "${{ matrix.arch.cc }}"
CFLAGS: "${{ matrix.arch.cflags }}"
COMPATIBILITY: "${{ matrix.python.compatibility }}"
FEATURES: "${{ matrix.arch.features }}"
LDFLAGS: "${{ matrix.arch.ldflags }}"
PYTHON: "${{ matrix.python.interpreter }}"
PYTHON_PACKAGE: "${{ matrix.python.package }}"
RUSTFLAGS: "${{ matrix.arch.rustflags }}"
TARGET: "${{ matrix.arch.target }}"
VENV: ".venv"
steps:
- name: cpuinfo
run: cat /proc/cpuinfo
- uses: actions/checkout@v4
- name: setup-qemu-container
uses: sandervocke/setup-qemu-container@v1
with:
container: registry.fedoraproject.org/fedora:42
arch: ${{ matrix.arch.tag }}
podman_args: "-v .:/orjson -v /tmp:/tmp --workdir /orjson"
- name: setup-shell-wrapper
uses: sandervocke/setup-shell-wrapper@v1
- name: Build and test
shell: wrap-shell {0}
env:
WRAP_SHELL: run-in-container.sh
run: |
set -eou pipefail
mkdir dist
export PATH="/root/.cargo/bin:/home/runner/work/orjson/orjson/.venv:/home/runner/.cargo/bin:$PATH"
./script/install-fedora
source "${VENV}/bin/activate"
maturin build --release --strip \
--features="${FEATURES}" \
--compatibility="${COMPATIBILITY}" \
--interpreter="${PYTHON}" \
--target="${TARGET}"
uv pip install ${CARGO_TARGET_DIR}/wheels/orjson*.whl
pytest -v test
cp ${CARGO_TARGET_DIR}/wheels/orjson*.whl dist
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_manylinux_aarch64_${{ matrix.python.interpreter }}
path: dist
overwrite: true
retention-days: 1
musllinux:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13' },
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
{ version: '3.9' },
{ version: '3.8' },
]
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
platform: linux/arm64
features: unstable-simd,unwind,yyjson
- target: armv7-unknown-linux-musleabihf
arch: armv7l
platform: linux/arm/v7
features: yyjson
- target: x86_64-unknown-linux-musl
arch: x86_64
platform: linux/amd64
features: avx512,unstable-simd,unwind,yyjson
- target: i686-unknown-linux-musl
arch: i686
platform: linux/386
features: unstable-simd,unwind,yyjson
steps:
- uses: actions/checkout@v4
- name: build-std
run: |
mkdir .cargo
cp ci/config.toml .cargo/config.toml
- name: Build
uses: PyO3/maturin-action@v1
env:
CC: "gcc"
CFLAGS: "-Os"
LDFLAGS: "-Wl,--as-needed"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z threads=2 -D warnings -C target-feature=-crt-static"
with:
maturin-version: 1.7.5
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
rustup-components: rust-src
target: "${{ matrix.platform.target }}"
manylinux: musllinux_1_2
args: --release --strip --out=dist --features=${{ matrix.platform.features }} -i python${{ matrix.python.version }}
- name: QEMU
if: matrix.platform.arch != 'x86_64'
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v8.1.5
platforms: ${{ matrix.platform.platform }}
- name: Test
uses: addnab/docker-run-action@v3
with:
image: quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add tzdata
sed -i '/^psutil/d' test/requirements.txt # missing 3.11, 3.12 wheels
sed -i '/^numpy/d' test/requirements.txt
python${{ matrix.python.version }} -m venv venv
venv/bin/pip install -U pip wheel
venv/bin/pip install -r test/requirements.txt
venv/bin/pip install orjson --no-index --find-links dist/ --force-reinstall
venv/bin/python -m pytest -v test
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_musllinux_${{ matrix.platform.arch }}_${{ matrix.python.version }}
path: dist
overwrite: true
retention-days: 1
manylinux_non_amd64:
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.12', abi: 'cp312-cp312' },
{ version: '3.11', abi: 'cp311-cp311' },
{ version: '3.10', abi: 'cp310-cp310' },
{ version: '3.9', abi: 'cp39-cp39' },
{ version: '3.8', abi: 'cp38-cp38' },
]
target: [
{
arch: 'aarch64',
cflags: '-Os -flto=full -fstrict-aliasing',
features: 'unstable-simd,yyjson',
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings',
target: 'aarch64-unknown-linux-gnu',
},
{
arch: 'i686',
cflags: '-Os -flto -fstrict-aliasing',
features: 'unstable-simd,yyjson',
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings',
target: 'i686-unknown-linux-gnu',
},
{
arch: 'armv7',
cflags: '-Os -flto=full -fstrict-aliasing',
features: 'yyjson', # no SIMD
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C opt-level=s',
target: 'armv7-unknown-linux-gnueabihf',
},
{
arch: 'ppc64le',
cflags: '-Os -flto=full -fstrict-aliasing',
features: 'unstable-simd,yyjson',
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings',
target: 'powerpc64le-unknown-linux-gnu',
},
{
arch: 's390x',
cflags: '-Os -flto=full -fstrict-aliasing -march=z10',
features: 'yyjson',
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C target-cpu=z10',
target: 's390x-unknown-linux-gnu',
},
]
steps:
- uses: actions/checkout@v4
- name: build-std
run: |
mkdir .cargo
cp ci/config.toml .cargo/config.toml
- name: Build
uses: PyO3/maturin-action@v1
env:
PYO3_CROSS_LIB_DIR: "/opt/python/${{ matrix.python.abi }}"
CFLAGS: "${{ matrix.target.cflags }}"
LDFLAGS: "-Wl,--as-needed"
RUSTFLAGS: "${{ matrix.target.rustflags }}"
with:
maturin-version: 1.7.5
target: "${{ matrix.target.target }}"
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
rustup-components: rust-src
manylinux: auto
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_manylinux_2_17_${{ matrix.target.arch }}_${{ matrix.python.version }}
path: dist
overwrite: true
retention-days: 1
macos_aarch64:
runs-on: macos-15
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13', macosx_target: "10.15" },
{ version: '3.12', macosx_target: "10.15" },
{ version: '3.11', macosx_target: "10.15" },
{ version: '3.10', macosx_target: "10.15" },
]
env:
CC: "clang"
CFLAGS: "-Os -fstrict-aliasing -flto=full"
LDFLAGS: "-Wl,--as-needed"
CFLAGS_x86_64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -march=x86-64-v2 -mtune=generic"
CFLAGS_aarch64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -mcpu=apple-m1 -mtune=generic"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z threads=3 -D warnings"
PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python.version }}"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "${{ env.RUST_TOOLCHAIN }}"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"
- name: Build environment
run: |
cargo fetch --target aarch64-apple-darwin &
export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python python${{ matrix.python.version }}
uv pip install --upgrade "maturin==1.7.5" -r test/requirements.txt -r integration/requirements.txt
mkdir .cargo
cp ci/config.toml .cargo/config.toml
- name: maturin
run: |
export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
MACOSX_DEPLOYMENT_TARGET="${{ matrix.python.macosx_target }}" \
PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \
maturin build --release --strip \
--features=unstable-simd,yyjson \
--interpreter python${{ matrix.python.version }} \
--target=universal2-apple-darwin
uv pip install target/wheels/orjson*.whl
- run: pytest -v test
env:
PYTHONMALLOC: "debug"
- run: source .venv/bin/activate && ./integration/run thread
- run: source .venv/bin/activate && ./integration/run http
- run: source .venv/bin/activate && ./integration/run init
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_universal2_aarch64_${{ matrix.python.version }}
path: target/wheels
overwrite: true
retention-days: 1
macos_amd64:
runs-on: macos-13
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.9', macosx_target: "10.15" },
{ version: '3.8', macosx_target: "10.15" },
]
env:
CC: "clang"
CFLAGS: "-Os -fstrict-aliasing -flto=full"
LDFLAGS: "-Wl,--as-needed"
CFLAGS_x86_64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -march=x86-64-v2 -mtune=generic"
CFLAGS_aarch64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -mcpu=apple-m1 -mtune=generic"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z threads=3 -D warnings"
PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python.version }}"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "${{ env.RUST_TOOLCHAIN }}"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"
- name: Build environment
run: |
cargo fetch --target aarch64-apple-darwin &
export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python python${{ matrix.python.version }}
uv pip install --upgrade "maturin==1.7.5" -r test/requirements.txt -r integration/requirements.txt
mkdir .cargo
cp ci/config.toml .cargo/config.toml
- name: maturin
run: |
export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
MACOSX_DEPLOYMENT_TARGET="${{ matrix.python.macosx_target }}" \
PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \
maturin build --release --strip \
--features=unstable-simd,yyjson \
--interpreter python${{ matrix.python.version }} \
--target=universal2-apple-darwin
uv pip install target/wheels/orjson*.whl
- run: pytest -v test
env:
PYTHONMALLOC: "debug"
- run: source .venv/bin/activate && ./integration/run thread
- run: source .venv/bin/activate && ./integration/run http
- run: source .venv/bin/activate && ./integration/run init
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_universal2_amd64_${{ matrix.python.version }}
path: target/wheels
overwrite: true
retention-days: 1
windows:
runs-on: windows-2022
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13' },
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
{ version: '3.9' },
{ version: '3.8' },
]
platform: [
{ arch: "x64", target: "x86_64-pc-windows-msvc" },
{ arch: "x86", target: "i686-pc-windows-msvc" },
]
env:
CFLAGS: "-Os"
LDFLAGS: "-Wl,--as-needed"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -D warnings"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python.version }}"
architecture: "${{ matrix.platform.arch }}"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "${{ env.RUST_TOOLCHAIN }}"
targets: "${{ matrix.platform.target }}"
components: "rust-src"
- name: Build environment
run: |
cargo fetch --target "${{ matrix.platform.target }}" &
python.exe -m pip install --upgrade pip "maturin==1.7.5" wheel
python.exe -m pip install -r test\requirements.txt -r integration\requirements.txt
mkdir .cargo
cp ci\config.toml .cargo\config.toml
- name: maturin
run: |
maturin.exe build --release --strip --features=unstable-simd,yyjson --target="${{ matrix.platform.target }}"
python.exe -m pip install orjson --no-index --find-links target\wheels
- run: python.exe -m pytest -s -rxX -v test
env:
PYTHONMALLOC: "debug"
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_windows_${{ matrix.platform.arch }}_${{ matrix.python.version }}
path: target\wheels
overwrite: true
retention-days: 1
pypi:
name: PyPI
runs-on: ubuntu-24.04
timeout-minutes: 10
if: "startsWith(github.ref, 'refs/tags/')"
needs: [
macos_aarch64,
macos_amd64,
manylinux_aarch64,
manylinux_amd64,
manylinux_non_amd64,
musllinux,
sdist,
windows,
]
environment:
name: pypi
url: https://pypi.org/p/orjson
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist/
pattern: orjson_*
- run: ls -1 dist/
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
packages-dir: dist
skip-existing: true
verbose: true