Skip to content

Commit

Permalink
cargo update, misc
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Aug 8, 2024
1 parent 4c05bfa commit bd9dca5
Show file tree
Hide file tree
Showing 23 changed files with 143 additions and 99 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: artifact
on: push
env:
RUST_TOOLCHAIN: "nightly-2024-07-02"
RUST_TOOLCHAIN: "nightly-2024-08-05"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
jobs:

Expand Down Expand Up @@ -57,16 +58,17 @@ jobs:
retention-days: 1

manylinux_2_17_amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
{ version: '3.9' },
{ version: '3.8' },
{ interpreter: 'python3.13', package: 'python3.13' },
{ interpreter: 'python3.12', package: 'python3.12' },
{ interpreter: 'python3.11', package: 'python3.11' },
{ interpreter: 'python3.10', package: 'python3.10' },
{ interpreter: 'python3.9', package: 'python3.9' },
{ interpreter: 'python3.8', package: 'python3.8' },
]
env:
CC: "clang"
Expand All @@ -83,7 +85,8 @@ jobs:

- name: Build environment pre-clone
run: |
dnf install -y rustup clang lld python${{ matrix.python.version }} git
dnf copr enable -y @fedora-llvm-team/llvm19
dnf install -y rustup clang lld ${{ matrix.python.package }} git
rustup-init --default-toolchain "${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu" --profile minimal --component rust-src -y
- uses: actions/checkout@v4
Expand All @@ -96,7 +99,7 @@ jobs:
cp ci/config.toml .cargo/config.toml
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python python${{ matrix.python.version }}
uv venv --python ${{ matrix.python.interpreter }}
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
- name: maturin
Expand All @@ -105,7 +108,7 @@ jobs:
maturin build --release --strip \
--features=avx512,no-panic,unstable-simd,yyjson \
--compatibility manylinux_2_17 \
--interpreter python${{ matrix.python.version }} \
--interpreter ${{ matrix.python.interpreter }} \
--target=x86_64-unknown-linux-gnu
uv pip install target/wheels/orjson*.whl
Expand All @@ -117,12 +120,6 @@ jobs:
- run: source .venv/bin/activate && ./integration/run http
- run: source .venv/bin/activate && ./integration/run init

- run: |
source .venv/bin/activate
uv pip install -U --pre "numpy>=2.0.0rc1"
pytest -s test/test_numpy.py
if: matrix.python.version != '3.8'
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
Expand All @@ -133,11 +130,12 @@ jobs:
retention-days: 1

musllinux_1_2:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13' },
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
Expand Down Expand Up @@ -169,7 +167,7 @@ jobs:
LDFLAGS: "-Wl,--as-needed"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=2 -D warnings -C target-feature=-crt-static"
with:
rust-toolchain: nightly-2024-07-02
rust-toolchain: nightly-2024-08-05
rustup-components: rust-src
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
Expand Down Expand Up @@ -208,7 +206,7 @@ jobs:
retention-days: 1

manylinux_2_17_non_amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -265,7 +263,7 @@ jobs:
RUSTFLAGS: "${{ matrix.target.rustflags }}"
with:
target: ${{ matrix.target.target }}
rust-toolchain: nightly-2024-07-02
rust-toolchain: nightly-2024-08-05
rustup-components: rust-src
manylinux: auto
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
Expand Down Expand Up @@ -306,6 +304,7 @@ jobs:
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" },
Expand All @@ -325,10 +324,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python.version }}"
allow-prereleases: true

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-02"
toolchain: "nightly-2024-08-05"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"

Expand Down Expand Up @@ -398,7 +398,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-02"
toolchain: "nightly-2024-08-05"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"

Expand Down Expand Up @@ -443,7 +443,7 @@ jobs:

pypi:
name: PyPI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: "startsWith(github.ref, 'refs/tags/')"
needs: [
sdist,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
profile: [
{ rust: "1.72", features: "" },
{ rust: "1.72", features: "--features=yyjson" },
{ rust: "nightly-2024-07-02", features: "--features=yyjson,unstable-simd"},
{ rust: "nightly-2024-07-02", features: "--features=avx512,yyjson,unstable-simd"},
{ rust: "nightly-2024-08-05", features: "--features=yyjson,unstable-simd"},
{ rust: "nightly-2024-08-05", features: "--features=avx512,yyjson,unstable-simd"},
]
python: [
{ version: '3.13' },
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: lint
on: push
jobs:
lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/setup-python@v5
with:
Expand Down
56 changes: 32 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ associative-cache = { version = "2", default-features = false }
beef = { version = "0.5", default-features = false, features = ["impl_serde"] }
bytecount = { version = "^0.6.7", default-features = false, features = ["runtime-dispatch-simd"] }
chrono = { version = "=0.4.34", default-features = false }
compact_str = { version = "0.7", default-features = false, features = ["serde"] }
compact_str = { version = "0.8", default-features = false, features = ["serde"] }
encoding_rs = { version = "0.8", default-features = false }
half = { version = "2", default-features = false, features = ["std"] }
itoa = { version = "1", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ support for 64-bit
* does not provide `load()` or `dump()` functions for reading from/writing to
file-like objects

orjson supports CPython 3.8, 3.9, 3.10, 3.11, and 3.12. It distributes
orjson supports CPython 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13. It distributes
amd64/x86_64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux,
amd64 and aarch64 wheels for macOS, and amd64 and i686/x86 wheels for Windows.
orjson does not and will not support PyPy. orjson does not and will not
Expand Down Expand Up @@ -1205,7 +1205,7 @@ It benefits from also having a C build environment to compile a faster
deserialization backend. See this project's `manylinux_2_28` builds for an
example using clang and LTO.

The project's own CI tests against `nightly-2024-07-02` and stable 1.72. It
The project's own CI tests against `nightly-2024-08-05` and stable 1.72. It
is prudent to pin the nightly version because that channel can introduce
breaking changes.

Expand Down
9 changes: 9 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@ fn main() {
println!("cargo:rustc-cfg=feature=\"strict_provenance\"");
}

// auto build unstable SIMD on nightly
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
if env::var("ORJSON_DISABLE_SIMD").is_err() {
if let Some(true) = version_check::supports_feature("portable_simd") {
println!("cargo:rustc-cfg=feature=\"unstable-simd\"");

// auto build AVX512 on x86-64-v4 or supporting native targets
#[cfg(all(target_arch = "x86_64", target_feature = "avx512vl"))]
if let Some(true) = version_check::supports_feature("stdarch_x86_avx512") {
if env::var("ORJSON_DISABLE_AVX512").is_err() {
println!("cargo:rustc-cfg=feature=\"avx512\"");
}
}
}
}

Expand Down
Loading

0 comments on commit bd9dca5

Please sign in to comment.