diff --git a/.github/workflows/artifact.yaml b/.github/workflows/artifact.yaml index 16d6fa2b..3eaf46ca 100644 --- a/.github/workflows/artifact.yaml +++ b/.github/workflows/artifact.yaml @@ -58,11 +58,16 @@ jobs: overwrite: true retention-days: 1 - manylinux_2_17_amd64: + manylinux_2_17: runs-on: ubuntu-24.04 + timeout-minutes: 10 strategy: fail-fast: false matrix: + arch: [ + "amd64", + "arm64", + ] python: [ { interpreter: 'python3.13', package: 'python3.13' }, { interpreter: 'python3.12', package: 'python3.12' }, @@ -80,23 +85,37 @@ jobs: 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=2 -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:42 steps: - name: cpuinfo run: cat /proc/cpuinfo - - name: Build environment pre-clone - run: dnf install -y git - - uses: actions/checkout@v4 - - name: Build environment post-clone + - name: setup-qemu-container + uses: sandervocke/setup-qemu-container@v1 + with: + container: fedora:42 + arch: ${{ matrix.arch }} + podman_args: "--user=root --cap-add=SYS_ADMIN -v .:/orjson -v /tmp:/tmp --workdir /orjson" + + - name: Setup Shell Wrapper + uses: sandervocke/setup-shell-wrapper@v1 + + - name: Use container shell + shell: bash + run: echo "WRAP_SHELL=run-in-container.sh" >> $GITHUB_ENV + + - name: Build and test + shell: wrap-shell {0} run: | ./script/install-fedora + echo $RUSTFLAGS + pwd + + export PATH="/root/.cargo/bin:/orjson/.venv/bin:/root/.local/bin:$PATH" + maturin build --release --strip \ --features=avx512,no-panic,unstable-simd,yyjson \ --compatibility=manylinux_2_17 \ @@ -110,334 +129,329 @@ jobs: ./integration/run http ./integration/run init - - name: Store wheels - if: "startsWith(github.ref, 'refs/tags/')" - uses: actions/upload-artifact@v4 - with: - name: orjson_manylinux_2_17_amd64_${{ matrix.python.interpreter }} - path: target/wheels - overwrite: true - retention-days: 1 - - musllinux_1_2: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - python: [ - { version: '3.13' }, - { version: '3.12' }, - { version: '3.11' }, - { version: '3.10' }, - { version: '3.9' }, - { version: '3.8' }, - ] - platform: - - target: aarch64-unknown-linux-musl - arch: aarch64 - platform: linux/arm64 - features: no-panic,unstable-simd,unwind,yyjson - - target: x86_64-unknown-linux-musl - arch: x86_64 - platform: linux/amd64 - features: avx512,no-panic,unstable-simd,unwind,yyjson - steps: - - uses: actions/checkout@v4 - - - name: build-std - run: | - mkdir .cargo - cp ci/config.toml .cargo/config.toml - - - name: Build - uses: PyO3/maturin-action@v1 - env: - CC: "gcc" - CFLAGS: "-Os" - 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: "${{ env.RUST_TOOLCHAIN }}" - rustup-components: rust-src - target: "${{ matrix.platform.target }}" - manylinux: musllinux_1_2 - args: --release --strip --out=dist --features=${{ matrix.platform.features }} -i python${{ matrix.python.version }} - - - name: QEMU - if: matrix.platform.arch != 'x86_64' - uses: docker/setup-qemu-action@v3 - with: - image: tonistiigi/binfmt:qemu-v8.1.5 - platforms: ${{ matrix.platform.platform }} - - - name: Test - uses: addnab/docker-run-action@v3 - with: - image: quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:latest - options: -v ${{ github.workspace }}:/io -w /io - run: | - apk add tzdata - sed -i '/^psutil/d' test/requirements.txt # missing 3.11, 3.12 wheels - sed -i '/^numpy/d' test/requirements.txt - - python${{ matrix.python.version }} -m venv venv - venv/bin/pip install -U pip wheel - venv/bin/pip install -r test/requirements.txt - venv/bin/pip install orjson --no-index --find-links dist/ --force-reinstall - venv/bin/python -m pytest -s -rxX -v -n 2 test + - run: ls -l target/wheels - name: Store wheels if: "startsWith(github.ref, 'refs/tags/')" uses: actions/upload-artifact@v4 with: - name: orjson_musllinux_1_2_${{ matrix.platform.arch }}_${{ matrix.python.version }} - path: dist - overwrite: true - retention-days: 1 - - manylinux_2_17_non_amd64: - runs-on: ubuntu-24.04 - strategy: - 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' }, - ] - target: [ - { - arch: 'aarch64', - cflags: '-Os -flto=full -fstrict-aliasing', - features: 'no-panic,unstable-simd,yyjson', - rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings', - target: 'aarch64-unknown-linux-gnu', - }, - { - arch: 'armv7', - cflags: '-Os -flto=full -fstrict-aliasing', - features: 'no-panic,yyjson', # no SIMD - rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C opt-level=s', - target: 'armv7-unknown-linux-gnueabihf', - }, - { - arch: 'ppc64le', - cflags: '-Os -flto=full -fstrict-aliasing', - features: 'no-panic,unstable-simd,yyjson', - rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings', - target: 'powerpc64le-unknown-linux-gnu', - }, - { - arch: 's390x', - cflags: '-Os -flto=full -fstrict-aliasing -march=z10', - features: 'no-panic,yyjson', - rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C target-cpu=z10', - target: 's390x-unknown-linux-gnu', - }, - ] - steps: - - uses: actions/checkout@v4 - - - name: build-std - run: | - mkdir .cargo - cp ci/config.toml .cargo/config.toml - - - name: Build - uses: PyO3/maturin-action@v1 - env: - PYO3_CROSS_LIB_DIR: "/opt/python/${{ matrix.python.abi }}" - CFLAGS: "${{ matrix.target.cflags }}" - LDFLAGS: "-Wl,--as-needed" - RUSTFLAGS: "${{ matrix.target.rustflags }}" - with: - target: "${{ matrix.target.target }}" - rust-toolchain: "${{ env.RUST_TOOLCHAIN }}" - rustup-components: rust-src - manylinux: auto - args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }} - - - name: Store wheels - if: "startsWith(github.ref, 'refs/tags/')" - uses: actions/upload-artifact@v4 - with: - name: orjson_manylinux_2_17_${{ matrix.target.arch }}_${{ matrix.python.version }} - path: dist - overwrite: true - retention-days: 1 - - macos_universal2_aarch64: - runs-on: macos-14 - strategy: - 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" }, - ] - env: - CC: "clang" - CFLAGS: "-Os -fstrict-aliasing -flto=full" - LDFLAGS: "-Wl,--as-needed" - CFLAGS_x86_64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -march=x86-64-v2 -mtune=generic" - CFLAGS_aarch64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -mcpu=apple-m1 -mtune=generic" - RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=3 -D warnings" - PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin" - steps: - - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "${{ matrix.python.version }}" - allow-prereleases: true - - - uses: dtolnay/rust-toolchain@master - with: - toolchain: "${{ env.RUST_TOOLCHAIN }}" - targets: "aarch64-apple-darwin, x86_64-apple-darwin" - components: "rust-src" - - - name: Build environment - run: | - cargo fetch --target aarch64-apple-darwin & - - 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: | - PATH=$HOME/.cargo/bin:$PATH \ - MACOSX_DEPLOYMENT_TARGET="${{ matrix.python.macosx_target }}" \ - PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \ - maturin build --release --strip \ - --features=no-panic,unstable-simd,yyjson \ - --interpreter python${{ matrix.python.version }} \ - --target=universal2-apple-darwin - uv pip install target/wheels/orjson*.whl - - - run: pytest -s -rxX -v -n 3 test - env: - PYTHONMALLOC: "debug" - - - run: source .venv/bin/activate && ./integration/run thread - - run: source .venv/bin/activate && ./integration/run http - - run: source .venv/bin/activate && ./integration/run init - - - name: Store wheels - if: "startsWith(github.ref, 'refs/tags/')" - uses: actions/upload-artifact@v4 - with: - name: orjson_universal2_aarch64_${{ matrix.python.version }} - path: target/wheels - overwrite: true - retention-days: 1 - - macos_universal2_amd64: - runs-on: macos-13 - strategy: - fail-fast: false - matrix: - python: [ - { version: '3.9', macosx_target: "10.15" }, - { version: '3.8', macosx_target: "10.15" }, - ] - env: - CC: "clang" - CFLAGS: "-Os -fstrict-aliasing -flto=full" - LDFLAGS: "-Wl,--as-needed" - CFLAGS_x86_64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -march=x86-64-v2 -mtune=generic" - CFLAGS_aarch64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -mcpu=apple-m1 -mtune=generic" - RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=3 -D warnings" - PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin" - steps: - - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "${{ matrix.python.version }}" - - - uses: dtolnay/rust-toolchain@master - with: - toolchain: "${{ env.RUST_TOOLCHAIN }}" - targets: "aarch64-apple-darwin, x86_64-apple-darwin" - components: "rust-src" - - - name: Build environment - run: | - cargo fetch --target aarch64-apple-darwin & - - 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: | - PATH=$HOME/.cargo/bin:$PATH \ - MACOSX_DEPLOYMENT_TARGET="${{ matrix.python.macosx_target }}" \ - PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \ - maturin build --release --strip \ - --features=no-panic,unstable-simd,yyjson \ - --interpreter python${{ matrix.python.version }} \ - --target=universal2-apple-darwin - uv pip install target/wheels/orjson*.whl - - - run: pytest -s -rxX -v -n 3 test - env: - PYTHONMALLOC: "debug" - - - run: source .venv/bin/activate && ./integration/run thread - - run: source .venv/bin/activate && ./integration/run http - - run: source .venv/bin/activate && ./integration/run init - - - name: Store wheels - if: "startsWith(github.ref, 'refs/tags/')" - uses: actions/upload-artifact@v4 - with: - name: orjson_universal2_amd64_${{ matrix.python.version }} + name: orjson_manylinux_2_17_amd64_${{ matrix.python.interpreter }} path: target/wheels overwrite: true retention-days: 1 - pypi: - name: PyPI - runs-on: ubuntu-24.04 - if: "startsWith(github.ref, 'refs/tags/')" - needs: [ - sdist, - manylinux_2_17_amd64, - musllinux_1_2, - manylinux_2_17_non_amd64, - macos_universal2_aarch64, - macos_universal2_amd64, - ] - steps: - - uses: actions/download-artifact@v4 - with: - pattern: orjson_* - merge-multiple: true - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - run: pip install pip "maturin>=1,<2" - - run: ls -1 . - - name: deploy wheel - run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.whl - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - - name: deploy sdist - run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.tar.gz - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + # musllinux_1_2: + # runs-on: ubuntu-24.04 + # strategy: + # fail-fast: false + # matrix: + # python: [ + # { version: '3.13' }, + # { version: '3.12' }, + # { version: '3.11' }, + # { version: '3.10' }, + # { version: '3.9' }, + # { version: '3.8' }, + # ] + # platform: + # - target: aarch64-unknown-linux-musl + # arch: aarch64 + # platform: linux/arm64 + # features: no-panic,unstable-simd,unwind,yyjson + # - target: x86_64-unknown-linux-musl + # arch: x86_64 + # platform: linux/amd64 + # features: avx512,no-panic,unstable-simd,unwind,yyjson + # steps: + # - uses: actions/checkout@v4 + + # - name: build-std + # run: | + # mkdir .cargo + # cp ci/config.toml .cargo/config.toml + + # - name: Build + # uses: PyO3/maturin-action@v1 + # env: + # CC: "gcc" + # CFLAGS: "-Os" + # 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: "${{ env.RUST_TOOLCHAIN }}" + # rustup-components: rust-src + # target: "${{ matrix.platform.target }}" + # manylinux: musllinux_1_2 + # args: --release --strip --out=dist --features=${{ matrix.platform.features }} -i python${{ matrix.python.version }} + + # - name: QEMU + # if: matrix.platform.arch != 'x86_64' + # uses: docker/setup-qemu-action@v3 + # with: + # image: tonistiigi/binfmt:qemu-v8.1.5 + # platforms: ${{ matrix.platform.platform }} + + # - name: Test + # uses: addnab/docker-run-action@v3 + # with: + # image: quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:latest + # options: -v ${{ github.workspace }}:/io -w /io + # run: | + # apk add tzdata + # sed -i '/^psutil/d' test/requirements.txt # missing 3.11, 3.12 wheels + # sed -i '/^numpy/d' test/requirements.txt + + # python${{ matrix.python.version }} -m venv venv + # venv/bin/pip install -U pip wheel + # venv/bin/pip install -r test/requirements.txt + # venv/bin/pip install orjson --no-index --find-links dist/ --force-reinstall + # venv/bin/python -m pytest -s -rxX -v -n 2 test + + # - name: Store wheels + # if: "startsWith(github.ref, 'refs/tags/')" + # uses: actions/upload-artifact@v4 + # with: + # name: orjson_musllinux_1_2_${{ matrix.platform.arch }}_${{ matrix.python.version }} + # path: dist + # overwrite: true + # retention-days: 1 + + # manylinux_2_17_non_amd64: + # runs-on: ubuntu-24.04 + # strategy: + # 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' }, + # ] + # target: [ + # { + # arch: 'armv7', + # cflags: '-Os -flto=full -fstrict-aliasing', + # features: 'no-panic,yyjson', # no SIMD + # rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C opt-level=s', + # target: 'armv7-unknown-linux-gnueabihf', + # }, + # { + # arch: 'ppc64le', + # cflags: '-Os -flto=full -fstrict-aliasing', + # features: 'no-panic,unstable-simd,yyjson', + # rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings', + # target: 'powerpc64le-unknown-linux-gnu', + # }, + # { + # arch: 's390x', + # cflags: '-Os -flto=full -fstrict-aliasing -march=z10', + # features: 'no-panic,yyjson', + # rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C target-cpu=z10', + # target: 's390x-unknown-linux-gnu', + # }, + # ] + # steps: + # - uses: actions/checkout@v4 + + # - name: build-std + # run: | + # mkdir .cargo + # cp ci/config.toml .cargo/config.toml + + # - name: Build + # uses: PyO3/maturin-action@v1 + # env: + # PYO3_CROSS_LIB_DIR: "/opt/python/${{ matrix.python.abi }}" + # CFLAGS: "${{ matrix.target.cflags }}" + # LDFLAGS: "-Wl,--as-needed" + # RUSTFLAGS: "${{ matrix.target.rustflags }}" + # with: + # target: "${{ matrix.target.target }}" + # rust-toolchain: "${{ env.RUST_TOOLCHAIN }}" + # rustup-components: rust-src + # manylinux: auto + # args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }} + + # - name: Store wheels + # if: "startsWith(github.ref, 'refs/tags/')" + # uses: actions/upload-artifact@v4 + # with: + # name: orjson_manylinux_2_17_${{ matrix.target.arch }}_${{ matrix.python.version }} + # path: dist + # overwrite: true + # retention-days: 1 + + # macos_universal2_aarch64: + # runs-on: macos-14 + # strategy: + # 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" }, + # ] + # env: + # CC: "clang" + # CFLAGS: "-Os -fstrict-aliasing -flto=full" + # LDFLAGS: "-Wl,--as-needed" + # CFLAGS_x86_64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -march=x86-64-v2 -mtune=generic" + # CFLAGS_aarch64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -mcpu=apple-m1 -mtune=generic" + # RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=3 -D warnings" + # PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin" + # steps: + + # - uses: actions/checkout@v4 + + # - uses: actions/setup-python@v5 + # with: + # python-version: "${{ matrix.python.version }}" + # allow-prereleases: true + + # - uses: dtolnay/rust-toolchain@master + # with: + # toolchain: "${{ env.RUST_TOOLCHAIN }}" + # targets: "aarch64-apple-darwin, x86_64-apple-darwin" + # components: "rust-src" + + # - name: Build environment + # run: | + # cargo fetch --target aarch64-apple-darwin & + + # 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: | + # PATH=$HOME/.cargo/bin:$PATH \ + # MACOSX_DEPLOYMENT_TARGET="${{ matrix.python.macosx_target }}" \ + # PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \ + # maturin build --release --strip \ + # --features=no-panic,unstable-simd,yyjson \ + # --interpreter python${{ matrix.python.version }} \ + # --target=universal2-apple-darwin + # uv pip install target/wheels/orjson*.whl + + # - run: pytest -s -rxX -v -n 3 test + # env: + # PYTHONMALLOC: "debug" + + # - run: source .venv/bin/activate && ./integration/run thread + # - run: source .venv/bin/activate && ./integration/run http + # - run: source .venv/bin/activate && ./integration/run init + + # - name: Store wheels + # if: "startsWith(github.ref, 'refs/tags/')" + # uses: actions/upload-artifact@v4 + # with: + # name: orjson_universal2_aarch64_${{ matrix.python.version }} + # path: target/wheels + # overwrite: true + # retention-days: 1 + + # macos_universal2_amd64: + # runs-on: macos-13 + # strategy: + # fail-fast: false + # matrix: + # python: [ + # { version: '3.9', macosx_target: "10.15" }, + # { version: '3.8', macosx_target: "10.15" }, + # ] + # env: + # CC: "clang" + # CFLAGS: "-Os -fstrict-aliasing -flto=full" + # LDFLAGS: "-Wl,--as-needed" + # CFLAGS_x86_64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -march=x86-64-v2 -mtune=generic" + # CFLAGS_aarch64_apple_darwin: "-O2 -fstrict-aliasing -flto=full -mcpu=apple-m1 -mtune=generic" + # RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=3 -D warnings" + # PATH: "/Users/runner/work/orjson/orjson/.venv/bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin" + # steps: + + # - uses: actions/checkout@v4 + + # - uses: actions/setup-python@v5 + # with: + # python-version: "${{ matrix.python.version }}" + + # - uses: dtolnay/rust-toolchain@master + # with: + # toolchain: "${{ env.RUST_TOOLCHAIN }}" + # targets: "aarch64-apple-darwin, x86_64-apple-darwin" + # components: "rust-src" + + # - name: Build environment + # run: | + # cargo fetch --target aarch64-apple-darwin & + + # 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: | + # PATH=$HOME/.cargo/bin:$PATH \ + # MACOSX_DEPLOYMENT_TARGET="${{ matrix.python.macosx_target }}" \ + # PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \ + # maturin build --release --strip \ + # --features=no-panic,unstable-simd,yyjson \ + # --interpreter python${{ matrix.python.version }} \ + # --target=universal2-apple-darwin + # uv pip install target/wheels/orjson*.whl + + # - run: pytest -s -rxX -v -n 3 test + # env: + # PYTHONMALLOC: "debug" + + # - run: source .venv/bin/activate && ./integration/run thread + # - run: source .venv/bin/activate && ./integration/run http + # - run: source .venv/bin/activate && ./integration/run init + + # - name: Store wheels + # if: "startsWith(github.ref, 'refs/tags/')" + # uses: actions/upload-artifact@v4 + # with: + # name: orjson_universal2_amd64_${{ matrix.python.version }} + # path: target/wheels + # overwrite: true + # retention-days: 1 + + # pypi: + # name: PyPI + # runs-on: ubuntu-24.04 + # if: "startsWith(github.ref, 'refs/tags/')" + # needs: [ + # sdist, + # manylinux_2_17_amd64, + # musllinux_1_2, + # manylinux_2_17_non_amd64, + # macos_universal2_aarch64, + # macos_universal2_amd64, + # ] + # steps: + # - uses: actions/download-artifact@v4 + # with: + # pattern: orjson_* + # merge-multiple: true + # - uses: actions/setup-python@v5 + # with: + # python-version: "3.12" + # - run: pip install pip "maturin>=1,<2" + # - run: ls -1 . + # - name: deploy wheel + # run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.whl + # env: + # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + # - name: deploy sdist + # run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.tar.gz + # env: + # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/script/install-fedora b/script/install-fedora index c9606115..f4219389 100755 --- a/script/install-fedora +++ b/script/install-fedora @@ -10,7 +10,7 @@ export VENV="${VENV:-.venv}" export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-target}" -sudo rm /etc/yum.repos.d/fedora-cisco-openh264.repo || true +rm /etc/yum.repos.d/fedora-cisco-openh264.repo || true dnf install -y rustup clang lld "${PYTHON_PACKAGE}"