Skip to content

Commit

Permalink
build misc
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Dec 23, 2024
1 parent e567c19 commit d78b0d5
Show file tree
Hide file tree
Showing 22 changed files with 599 additions and 199 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: push
env:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
RUST_TOOLCHAIN: "nightly-2024-11-22"
RUST_TOOLCHAIN: "nightly-2024-12-22"
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
UV_LINK_MODE: "copy"
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4

- run: python3 -m pip install --user --upgrade pip "maturin>=1,<2" wheel
- run: python3 -m pip install --user --upgrade pip "maturin==1.7.5" wheel

- name: Vendor dependencies
run: |
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
- target: armv7-unknown-linux-musleabihf
arch: armv7l
platform: linux/arm/v7
features: unstable-simd,yyjson
features: yyjson
- target: x86_64-unknown-linux-musl
arch: x86_64
platform: linux/amd64
Expand All @@ -287,6 +287,7 @@ jobs:
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 }}"
Expand Down Expand Up @@ -391,6 +392,7 @@ jobs:
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
Expand Down Expand Up @@ -448,7 +450,7 @@ jobs:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python python${{ matrix.python.version }}
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
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
Expand Down Expand Up @@ -522,7 +524,7 @@ jobs:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python python${{ matrix.python.version }}
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
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
Expand Down Expand Up @@ -597,7 +599,7 @@ jobs:
run: |
cargo fetch --target "${{ matrix.platform.target }}" &
python.exe -m pip install --upgrade pip "maturin>=1,<2" wheel
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
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,7 +10,7 @@ jobs:
profile: [
{ rust: "1.82", features: "" },
{ rust: "1.82", features: "--features=yyjson" },
{ rust: "nightly-2024-11-22", features: "--features=avx512,yyjson,unstable-simd" },
{ rust: "nightly-2024-12-22", features: "--features=avx512,yyjson,unstable-simd" },
]
python: [
{ version: '3.13' },
Expand All @@ -30,7 +30,7 @@ jobs:
with:
python-version: '${{ matrix.python.version }}'

- run: python -m pip install --user --upgrade pip "maturin>=1,<2" wheel
- run: python -m pip install --user --upgrade pip "maturin==1.7.5" wheel

- uses: actions/checkout@v4

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ permissions:

jobs:
stale:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@v9
with:
days-before-stale: 7
days-before-close: 1
exempt-assignees: ijl
36 changes: 18 additions & 18 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,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-11-22` and stable 1.72. It
The project's own CI tests against `nightly-2024-12-22` and stable 1.72. It
is prudent to pin the nightly version because that channel can introduce
breaking changes. There is a significant performance benefit to using
nightly.
Expand Down
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn main() {
for cfg in python_config.build_script_outputs() {
println!("{cfg}");
}
let is_64bit_python = matches!(python_config.pointer_width, Some(64));

if let Some(true) = version_check::supports_feature("core_intrinsics") {
println!("cargo:rustc-cfg=feature=\"intrinsics\"");
Expand All @@ -52,7 +53,7 @@ fn main() {
}

#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
if let Some(64) = python_config.pointer_width {
if is_64bit_python {
println!("cargo:rustc-cfg=feature=\"inline_int\"");
}

Expand Down
Loading

0 comments on commit d78b0d5

Please sign in to comment.