diff --git a/.github/workflows/artifact.yaml b/.github/workflows/artifact.yaml index 1f0384a0..bb668905 100644 --- a/.github/workflows/artifact.yaml +++ b/.github/workflows/artifact.yaml @@ -62,46 +62,47 @@ jobs: 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' }, + { version: '3.12' }, + { version: '3.11' }, + { version: '3.10' }, + { version: '3.9' }, + { version: '3.8' }, ] env: CC: "clang" - CFLAGS: "-Os -fstrict-aliasing -flto=full" - LDFLAGS: "-fuse-ld=lld -Wl,--as-needed" - RUSTFLAGS: "-C linker=clang -C lto=fat -C link-arg=-fuse-ld=lld -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=4 -D warnings" + CFLAGS: "-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm" + 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 virtual-function-elimination -Z threads=4 -D warnings" 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" container: image: fedora:41 - options: --user 0 steps: - name: cpuinfo run: cat /proc/cpuinfo + - name: Build environment pre-clone + run: | + dnf install -y rustup clang lld python${{ matrix.python.version }} git + rustup-init --default-toolchain "${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu" --profile minimal --component rust-src -y + - uses: actions/checkout@v4 - - name: Build environment + - name: Build environment post-clone run: | - dnf install -y rustup clang lld python${{ matrix.python.version }} - - rustup-init --default-toolchain "${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu" --profile minimal --component rust-src -y cargo fetch --target=x86_64-unknown-linux-gnu & + mkdir .cargo + cp ci/config.toml .cargo/config.toml + 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 - mkdir .cargo - cp ci/config.toml .cargo/config.toml - - name: maturin run: | maturin build --release --strip \ - --features=no-panic,unstable-simd,yyjson \ + --features=avx512,no-panic,unstable-simd,yyjson \ --compatibility manylinux_2_17 \ --interpreter python${{ matrix.python.version }} \ --target=x86_64-unknown-linux-gnu diff --git a/Cargo.lock b/Cargo.lock index e905fa75..75336eb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,18 +280,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.200" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.200" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" dependencies = [ "proc-macro2", "quote", diff --git a/script/develop b/script/develop index a4207166..f18bb24c 100755 --- a/script/develop +++ b/script/develop @@ -9,9 +9,9 @@ export LD="${LD:-lld}" echo "CC: ${CC}, LD: ${LD}, LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" -export CFLAGS="-Os -fstrict-aliasing -fno-plt -flto=full" -export LDFLAGS="-fuse-ld=${LD} -Wl,--as-needed" -export RUSTFLAGS="-C linker=${CC} -C lto=fat -C link-arg=-fuse-ld=${LD} -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=8" +export CFLAGS="-Os -fstrict-aliasing -fno-plt -flto=full -emit-llvm" +export LDFLAGS="-fuse-ld=${LD} -Wl,-plugin-opt=also-emit-llvm -Wl,--as-needed -Wl,-zrelro,-znow" +export RUSTFLAGS="-C linker=${CC} -C link-arg=-fuse-ld=${LD} -C linker-plugin-lto -C lto=fat -C link-arg=-Wl,-zrelro,-znow -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=8" maturin build "$@"