Skip to content

Commit

Permalink
cargo update, ppc64le, maturin v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Mar 20, 2023
1 parent 4b8b5cf commit f6175cd
Show file tree
Hide file tree
Showing 16 changed files with 617 additions and 354 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/linux-cross.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,21 @@ jobs:
{ version: '3.11', abi: 'cp311-cp311' },
]
target: [
{ arch: 'armv7', flags: '--features=yyjson -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort' },
{ arch: 'aarch64', flags: '--features=yyjson' }, # build-std: aarch64-linux-gnu.so: undefined symbol: __aarch64_swp4_rel, likely QEMU?
{
arch: 'aarch64',
cflags: '-O2',
args: '--features=yyjson' # build-std: aarch64-linux-gnu.so: undefined symbol: __aarch64_swp4_rel, likely QEMU?
},
{
arch: 'armv7',
cflags: '-Os',
args: '--features=yyjson -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort'
},
{
arch: 'ppc64le',
cflags: '-O2',
args: '--features=yyjson -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort'
},
]
steps:
- uses: actions/checkout@v3
Expand All @@ -24,17 +37,17 @@ jobs:
env:
PYO3_CROSS_LIB_DIR: "/opt/python/${{ matrix.python.abi }}"
CC: "gcc"
CFLAGS: "-O2 -fno-plt"
LDFLAGS: "-O2 -flto -Wl,--as-needed"
CFLAGS: "${{ matrix.target.cflags }} -fno-plt"
LDFLAGS: "${{ matrix.target.cflags }} -flto -Wl,--as-needed"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
ORJSON_ENABLE_WRITEEXT: "1"
with:
maturin-version: v0.14.14
maturin-version: v1.0.0-beta.5
target: ${{ matrix.target.arch }}
rust-toolchain: nightly-2023-02-03
rust-toolchain: nightly-2023-03-20
rustup-components: rust-src
manylinux: auto
args: --release --strip --out dist -i python${{ matrix.python.version }} ${{ matrix.target.flags }}
args: --release --strip --out dist -i python${{ matrix.python.version }}
- uses: uraimo/run-on-arch-action@v2
name: Install built wheel
with:
Expand Down Expand Up @@ -72,7 +85,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install "maturin>=0.14,<0.15"
- run: pip install --pre "maturin>=0.14,<2"
- name: deploy
run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.whl
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manylinux2014.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
env:
PATH: /github/home/.local/bin:/github/home/.cargo/bin:/opt/python/${{ matrix.python.abi }}/bin:/opt/rh/devtoolset-10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CC: "gcc"
CFLAGS: "-O2 -fno-plt"
CFLAGS: "-O2 -fno-plt -flto"
LDFLAGS: "-O2 -flto -Wl,--as-needed"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
ORJSON_ENABLE_WRITEEXT: "1"
container:
image: quay.io/pypa/manylinux2014_x86_64:latest
options: --user 0
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2023-02-03 --profile minimal -y
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2023-03-20 --profile minimal -y
- uses: actions/checkout@v3
- run: python3 -m pip install --user --upgrade pip "maturin>=0.14,<0.15" wheel
- run: python3 -m pip install --user --upgrade --pre pip "maturin>=0.14,<2" wheel
- run: maturin build --release --strip --features=unstable-simd,yyjson --compatibility manylinux2014 --interpreter python${{ matrix.python.version }}
- run: python3 -m pip install --user target/wheels/orjson*.whl
- run: python3 -m pip install --user -r test/requirements.txt -r integration/requirements.txt
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manylinux_2_28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
options: --user 0
steps:
- run: yum install -y clang lld
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2023-02-03 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2023-02-03-x86_64-unknown-linux-gnu
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2023-03-20 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2023-03-20-x86_64-unknown-linux-gnu
- uses: actions/checkout@v3
- run: python3 -m pip install --user --upgrade pip "maturin>=0.14,<0.15" wheel
- run: python3 -m pip install --user --upgrade --pre pip "maturin>=0.14,<2" wheel
- run: |
maturin build --release --strip \
--features=unstable-simd,yyjson \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/musllinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
LDFLAGS: "-O2 -flto -Wl,--as-needed"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
with:
maturin-version: v0.14.14
rust-toolchain: nightly-2023-02-03
maturin-version: v1.0.0-beta.5
rust-toolchain: nightly-2023-03-20
rustup-components: rust-src
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_1
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install "maturin>=0.14,<0.15"
- run: pip install --pre "maturin>=0.14,<2"
- name: deploy
run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.whl
env:
Expand Down
40 changes: 24 additions & 16 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 @@ -49,7 +49,7 @@ associative-cache = { version = "1", default_features = false }
beef = { version = "0.5", default_features = false, features = ["impl_serde"] }
bytecount = { version = "^0.6.2", default_features = false, features = ["runtime-dispatch-simd"] }
chrono = { version = "^0.4.23", default_features = false }
compact_str = { version = "0.6", default_features = false, features = ["serde"] }
compact_str = { version = "0.7", default_features = false, features = ["serde"] }
encoding_rs = { version = "0.8", default_features = false }
itoa = { version = "1", default_features = false }
itoap = { version = "1", features = ["std", "simd"] }
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ support for 64-bit
* does not provide `load()` or `dump()` functions for reading from/writing to
file-like objects

orjson supports CPython 3.7, 3.8, 3.9, 3.10, and 3.11. It distributes x86_64/amd64,
aarch64/armv8, and arm7 wheels for Linux, amd64 and aarch64 wheels for macOS,
and amd64 wheels for Windows. orjson does not support PyPy. Releases
follow semantic versioning and serializing a new object type
without an opt-in flag is considered a breaking change.
orjson supports CPython 3.7, 3.8, 3.9, 3.10, and 3.11. It distributes
x86_64/amd64, aarch64/armv8, arm7, and POWER/ppc64le wheels for Linux,
amd64 and aarch64 wheels for macOS, and amd64 wheels for Windows.
orjson does not support PyPy. Releases follow semantic versioning and
serializing a new object type without an opt-in flag is considered a
breaking change.

orjson is licensed under both the Apache 2.0 and MIT licenses. The
repository and issue tracker is
Expand Down Expand Up @@ -1164,11 +1165,11 @@ 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-2023-02-03` and stable 1.60. It
The project's own CI tests against `nightly-2023-03-20` and stable 1.60. It
is prudent to pin the nightly version because that channel can introduce
breaking changes.

orjson is tested for amd64, aarch64, and arm7 on Linux. It is tested for
orjson is tested for amd64, aarch64, arm7, and ppc64le on Linux. It is tested for
amd64 on macOS and cross-compiles for aarch64. For Windows it is tested on
amd64.

Expand Down
2 changes: 1 addition & 1 deletion ci/azure-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ steps:
displayName: rustup
- bash: PATH=$(path) rustup default $(toolchain)
displayName: ensure toolchain
- bash: PATH=$(path) $(interpreter) -m pip install --user --upgrade pip "maturin>=0.14,<0.15" wheel
- bash: PATH=$(path) $(interpreter) -m pip install --user --upgrade --pre pip "maturin>=0.14,<2" wheel
displayName: build dependencies
- bash: PATH=$(path) $(interpreter) -m pip install --user -r test/requirements.txt -r integration/requirements.txt
displayName: test dependencies
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ steps:
- bash: rustup component add rust-src --toolchain $(toolchain)-x86_64-apple-darwin
- bash: rustup target add aarch64-apple-darwin

- bash: pip install --upgrade pip "maturin>=0.14,<0.15" wheel
- bash: pip install --upgrade pip --pre "maturin>=0.14,<2" wheel
displayName: build dependencies
- bash: pip install -r test/requirements.txt -r integration/requirements.txt
displayName: test dependencies
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
toolchain: nightly-2023-02-03
toolchain: nightly-2023-03-20

jobs:

Expand Down
2 changes: 1 addition & 1 deletion ci/azure-sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
displayName: rustup
- bash: PATH=$(path) rustup default $(toolchain)
displayName: ensure toolchain
- bash: PATH=$(path) $(interpreter) -m pip install --user --upgrade pip "maturin>=0.14,<0.15" wheel
- bash: PATH=$(path) $(interpreter) -m pip install --user --upgrade --pre pip "maturin>=0.14,<2" wheel
displayName: build dependencies
- bash: PATH=$(path) $(interpreter) -m pip install --user -r test/requirements.txt -r integration/requirements.txt mypy
displayName: test dependencies
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
rustup default $(toolchain)
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
displayName: rustup
- script: python.exe -m pip install --upgrade pip "maturin>=0.14,<0.15" wheel
- script: python.exe -m pip install --upgrade --pre pip "maturin>=0.14,<2" wheel
displayName: build dependencies
- script: python.exe -m pip install -r test\requirements.txt -r integration\requirements.txt
displayName: test dependencies
Expand Down
Loading

0 comments on commit f6175cd

Please sign in to comment.