diff --git a/.github/workflows/release-build-binaries.yml b/.github/workflows/release-build-binaries.yml index 9bc39f9..a0e7904 100644 --- a/.github/workflows/release-build-binaries.yml +++ b/.github/workflows/release-build-binaries.yml @@ -27,12 +27,12 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: build-binaries-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: PACKAGE_NAME: djangofmt - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 CARGO_TERM_COLOR: always @@ -84,8 +84,8 @@ jobs: uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1 with: target: ${{ matrix.target }} - manylinux: auto - args: --release --locked --out dist + manylinux: "2_17" + args: --release --locked --out dist --compatibility pypi - name: "Test wheels" if: ${{ startsWith(matrix.target, 'x86_64') }} run: | @@ -124,23 +124,28 @@ jobs: platform: - target: aarch64-unknown-linux-gnu arch: aarch64 + manylinux: "2_17" # see https://github.com/astral-sh/ruff/issues/3791 # and https://github.com/gnzlbg/jemallocator/issues/170#issuecomment-1503228963 maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 - target: armv7-unknown-linux-gnueabihf arch: armv7 + manylinux: "2_17" - target: s390x-unknown-linux-gnu arch: s390x + manylinux: "2_17" - target: powerpc64le-unknown-linux-gnu arch: ppc64le + manylinux: "2_17" # see https://github.com/astral-sh/ruff/issues/10073 maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 - - target: powerpc64-unknown-linux-gnu - arch: ppc64 - # see https://github.com/astral-sh/ruff/issues/10073 + - target: riscv64gc-unknown-linux-gnu + arch: riscv64 + manylinux: "2_31" maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 - target: arm-unknown-linux-musleabihf arch: arm + manylinux: auto steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -153,11 +158,15 @@ jobs: uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1 with: target: ${{ matrix.platform.target }} - manylinux: auto + manylinux: ${{ matrix.platform.manylinux }} docker-options: ${{ matrix.platform.maturin_docker_options }} - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi + before-script-linux: | + if [[ "${{ matrix.platform.target }}" == "riscv64gc-unknown-linux-gnu" ]] && command -v apt-get &> /dev/null; then + apt-get update && apt-get install -y libatomic1 + fi - uses: uraimo/run-on-arch-action@d94c13912ea685de38fccc1109385b83fd79427d # v3.0.1 - if: ${{ matrix.platform.arch != 'ppc64' && matrix.platform.arch != 'ppc64le' }} + if: ${{ matrix.platform.arch != 'ppc64le' && matrix.platform.arch != 'riscv64' }} name: "Test wheels" with: arch: ${{ matrix.platform.arch == 'arm' && 'armv6' || matrix.platform.arch }} @@ -215,7 +224,7 @@ jobs: with: target: ${{ matrix.target }} manylinux: musllinux_1_2 - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Test wheels" if: matrix.target == 'x86_64-unknown-linux-musl' run: | @@ -274,7 +283,7 @@ jobs: with: target: ${{ matrix.platform.target }} manylinux: musllinux_1_2 - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi docker-options: ${{ matrix.platform.maturin_docker_options }} - uses: uraimo/run-on-arch-action@d94c13912ea685de38fccc1109385b83fd79427d # v3.0.1 name: "Test wheels" @@ -328,7 +337,7 @@ jobs: uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1 with: target: x86_64 - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Upload wheels" uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: @@ -367,7 +376,7 @@ jobs: uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1 with: target: aarch64 - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Test wheels" run: | pip install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall @@ -419,7 +428,7 @@ jobs: uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1 with: target: ${{ matrix.platform.target }} - args: --release --locked --out dist + args: --release --locked --out dist --compatibility pypi - name: "Test wheels" if: ${{ !startsWith(matrix.platform.target, 'aarch64') }} shell: bash diff --git a/dist-workspace.toml b/dist-workspace.toml index e0f1bfd..db329af 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -31,8 +31,8 @@ targets = [ "armv7-unknown-linux-gnueabihf", "armv7-unknown-linux-musleabihf", "x86_64-apple-darwin", - "powerpc64-unknown-linux-gnu", "powerpc64le-unknown-linux-gnu", + "riscv64gc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl",