cargo update, vendor pyo3-ffi, python3.14 · ijl/orjson@c5af268 (original) (raw)
1
1
`name: artifact
`
2
2
`on: push
`
3
3
`env:
`
4
``
`-
RUST_TOOLCHAIN: "nightly-2024-08-05"
`
``
4
`+
RUST_TOOLCHAIN: "nightly-2024-09-25"
`
5
5
`CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
`
6
6
`UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
`
7
7
`UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
`
``
8
`+
UV_LINK_MODE: "copy"
`
8
9
`jobs:
`
9
10
``
10
11
`sdist:
`
`@@ -71,54 +72,43 @@ jobs:
`
71
72
`{ interpreter: 'python3.8', package: 'python3.8' },
`
72
73
`]
`
73
74
`env:
`
``
75
`+
PYTHON: "${{ matrix.python.interpreter }}"
`
``
76
`+
PYTHON_PACKAGE: "${{ matrix.python.package }}"
`
``
77
`+
TARGET: "x86_64-unknown-linux-gnu"
`
74
78
`CC: "clang"
`
``
79
`+
VENV: ".venv"
`
75
80
`CFLAGS: "-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm"
`
76
81
`LDFLAGS: "-fuse-ld=lld -Wl,-plugin-opt=also-emit-llvm -Wl,--as-needed -Wl,-zrelro,-znow"
`
77
82
`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 virtual-function-elimination -Z threads=2 -D warnings"
`
78
83
`PATH: "/__w/orjson/orjson/.venv/bin:/github/home/.cargo/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
`
79
84
`container:
`
80
``
`-
image: fedora:41
`
``
85
`+
image: fedora:42
`
81
86
`steps:
`
82
87
``
83
88
` - name: cpuinfo
`
84
89
`run: cat /proc/cpuinfo
`
85
90
``
86
91
` - name: Build environment pre-clone
`
87
``
`-
run: |
`
88
``
`-
dnf copr enable -y @fedora-llvm-team/llvm19
`
89
``
`-
dnf install -y rustup clang lld ${{ matrix.python.package }} git
`
90
``
`-
rustup-init --default-toolchain "${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu" --profile minimal --component rust-src -y
`
``
92
`+
run: dnf install -y git
`
91
93
``
92
94
` - uses: actions/checkout@v4
`
93
95
``
94
96
` - name: Build environment post-clone
`
95
97
`run: |
`
96
``
`-
cargo fetch --target=x86_64-unknown-linux-gnu &
`
97
``
-
98
``
`-
mkdir .cargo
`
99
``
`-
cp ci/config.toml .cargo/config.toml
`
100
``
-
101
``
`-
curl -LsSf https://astral.sh/uv/install.sh | sh
`
102
``
`-
uv venv --python ${{ matrix.python.interpreter }}
`
103
``
`-
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
`
``
98
`+
./script/install-fedora
`
104
99
``
105
``
`-
- name: maturin
`
106
``
`-
run: |
`
107
``
`-
source .venv/bin/activate
`
108
100
` maturin build --release --strip \
`
109
101
` --features=avx512,no-panic,unstable-simd,yyjson \
`
110
``
`-
--compatibility manylinux_2_17 \
`
111
``
`-
--interpreter ${{ matrix.python.interpreter }} \
`
112
``
`-
--target=x86_64-unknown-linux-gnu
`
``
102
`+
--compatibility=manylinux_2_17 \
`
``
103
`+
--interpreter="${PYTHON}" \
`
``
104
`+
--target="${TARGET}"
`
``
105
+
113
106
` uv pip install target/wheels/orjson*.whl
`
114
107
``
115
``
`-
- run: source .venv/bin/activate && pytest -s -rxX -v -n 2 test
`
116
``
`-
env:
`
117
``
`-
PYTHONMALLOC: "debug"
`
118
``
-
119
``
`-
- run: source .venv/bin/activate && ./integration/run thread
`
120
``
`-
- run: source .venv/bin/activate && ./integration/run http
`
121
``
`-
- run: source .venv/bin/activate && ./integration/run init
`
``
108
`+
pytest -s -rxX -v -n 2 test
`
``
109
`+
./integration/run thread
`
``
110
`+
./integration/run http
`
``
111
`+
./integration/run init
`
122
112
``
123
113
` - name: Store wheels
`
124
114
`if: "startsWith(github.ref, 'refs/tags/')"
`
`@@ -167,9 +157,9 @@ jobs:
`
167
157
`LDFLAGS: "-Wl,--as-needed"
`
168
158
`RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=2 -D warnings -C target-feature=-crt-static"
`
169
159
`with:
`
170
``
`-
rust-toolchain: nightly-2024-08-05
`
``
160
`+
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
`
171
161
`rustup-components: rust-src
`
172
``
`-
target: ${{ matrix.platform.target }}
`
``
162
`+
target: "${{ matrix.platform.target }}"
`
173
163
`manylinux: musllinux_1_2
`
174
164
`args: --release --strip --out=dist --features=${{ matrix.platform.features }} -i python${{ matrix.python.version }}
`
175
165
``
`@@ -249,6 +239,7 @@ jobs:
`
249
239
`]
`
250
240
`steps:
`
251
241
` - uses: actions/checkout@v4
`
``
242
+
252
243
` - name: build-std
`
253
244
`run: |
`
254
245
` mkdir .cargo
`
`@@ -262,33 +253,12 @@ jobs:
`
262
253
`LDFLAGS: "-Wl,--as-needed"
`
263
254
`RUSTFLAGS: "${{ matrix.target.rustflags }}"
`
264
255
`with:
`
265
``
`-
target: ${{ matrix.target.target }}
`
266
``
`-
rust-toolchain: nightly-2024-08-05
`
``
256
`+
target: "${{ matrix.target.target }}"
`
``
257
`+
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
`
267
258
`rustup-components: rust-src
`
268
259
`manylinux: auto
`
269
260
`args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
`
270
261
``
271
``
`-
- uses: uraimo/run-on-arch-action@v2
`
272
``
`-
name: Test
`
273
``
`-
with:
`
274
``
`-
arch: ${{ matrix.target.arch }}
`
275
``
`-
distro: ubuntu22.04
`
276
``
`-
githubToken: ${{ github.token }}
`
277
``
`-
install: |
`
278
``
`-
export TZ=UTC
`
279
``
`-
export DEBIAN_FRONTEND=noninteractive
`
280
``
`-
apt-get update
`
281
``
`-
apt-get install -y --no-install-recommends software-properties-common gpg gpg-agent curl
`
282
``
`-
add-apt-repository ppa:deadsnakes/ppa
`
283
``
`-
apt-get update
`
284
``
`-
apt-get install -y python${{ matrix.python.version }}-dev python${{ matrix.python.version }}-venv
`
285
``
`-
run: |
`
286
``
`-
python${{ matrix.python.version }} -m venv venv
`
287
``
`-
venv/bin/pip install -U pip wheel
`
288
``
`-
venv/bin/pip install -r test/requirements.txt
`
289
``
`-
venv/bin/pip install orjson --no-index --find-links dist/ --force-reinstall
`
290
``
`-
venv/bin/python -m pytest -s -rxX -v -n 2 test
`
291
``
-
292
262
` - name: Store wheels
`
293
263
`if: "startsWith(github.ref, 'refs/tags/')"
`
294
264
`uses: actions/upload-artifact@v4
`
`@@ -328,7 +298,7 @@ jobs:
`
328
298
``
329
299
` - uses: dtolnay/rust-toolchain@master
`
330
300
`with:
`
331
``
`-
toolchain: "nightly-2024-08-05"
`
``
301
`+
toolchain: "${{ env.RUST_TOOLCHAIN }}"
`
332
302
`targets: "aarch64-apple-darwin, x86_64-apple-darwin"
`
333
303
`components: "rust-src"
`
334
304
``
`@@ -398,7 +368,7 @@ jobs:
`
398
368
``
399
369
` - uses: dtolnay/rust-toolchain@master
`
400
370
`with:
`
401
``
`-
toolchain: "nightly-2024-08-05"
`
``
371
`+
toolchain: "${{ env.RUST_TOOLCHAIN }}"
`
402
372
`targets: "aarch64-apple-darwin, x86_64-apple-darwin"
`
403
373
`components: "rust-src"
`
404
374
``