diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index 339448c..1476473 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -13,8 +13,8 @@ on: - '*' env: - UNIX_PYTHON_VERSIONS: 3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.7 pypy3.8 pypy3.9 pypy3.10 - WINDOWS_PYTHON_VERSIONS: 3.8 3.9 3.10 3.11 3.12 + UNIX_PYTHON_VERSIONS: 3.9 3.10 3.11 3.12 3.13 pypy3.10 + WINDOWS_PYTHON_VERSIONS: 3.9 3.10 3.11 3.12 3.13 permissions: contents: read @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.13' - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -43,39 +43,36 @@ jobs: name: wheels-linux-${{ matrix.target }} path: dist - # linux-musl: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # platform: [ - # { target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" }, - # { target: "i686-unknown-linux-musl", image_tag: "i686-musl" }, - # { target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" }, - # { target: "armv7-unknown-linux-musleabihf", image_tag: "armv7-musleabihf" }, - # { target: "powerpc64le-unknown-linux-musl", image_tag: "powerpc64le-musl" }, - # ] - # container: - # image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }} - # env: - # CFLAGS_armv7_unknown_linux_musleabihf: '-mfpu=vfpv3-d16' - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/setup-python@v4 - # with: - # python-version: '3.10' - # - name: Build wheels - linux-musl - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.platform.target }} - # args: --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }} - # sccache: 'true' - # manylinux: musllinux_1_1 - # container: off - # - name: Upload wheels - # uses: actions/upload-artifact@v4 - # with: - # name: wheels-musl-${{ matrix.target }} - # path: dist + linux-musl: + runs-on: ubuntu-latest + strategy: + matrix: + platform: [ + { target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" }, + { target: "i686-unknown-linux-musl", image_tag: "i686-musl" }, + { target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" }, + { target: "armv7-unknown-linux-musleabihf", image_tag: "armv7-musleabihf" }, + { target: "powerpc64le-unknown-linux-musl", image_tag: "powerpc64le-musl" }, + ] + container: + image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }} + env: + CFLAGS_armv7_unknown_linux_musleabihf: '-mfpu=vfpv3-d16' + steps: + - uses: actions/checkout@v3 + - name: Build wheels - linux-musl + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }} + sccache: 'true' + manylinux: musllinux_1_1 + container: off + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-musl-${{ matrix.target }} + path: dist windows: runs-on: windows-latest @@ -86,7 +83,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.13' architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -109,7 +106,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.13' - name: Build wheels uses: PyO3/maturin-action@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fcfd126..11b80e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,20 +9,22 @@ on: pull_request: branches: [ "main" ] +env: + UNIX_PYTHON_VERSIONS: 3.9 3.10 3.11 3.12 3.13 pypy3.10 + WINDOWS_PYTHON_VERSIONS: 3.9 3.10 3.11 3.12 3.13 + permissions: contents: read jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python 3.13 + uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.13" - name: Install dependencies run: | python -m pip install --upgrade pip @@ -43,3 +45,85 @@ jobs: uses: jpetrucciani/mypy-check@master with: requirements_file: "requirements-dev.txt" + + build-linux: + runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.13' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }} + sccache: 'true' + manylinux: auto + + build-windows: + runs-on: windows-latest + strategy: + matrix: + target: [x64, x86] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.13" + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --interpreter ${{ env.WINDOWS_PYTHON_VERSIONS }} + sccache: 'true' + manylinux: auto + build-macos: + runs-on: macos-latest + strategy: + matrix: + target: [x86_64, aarch64] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.13' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }} + sccache: 'true' + build-linux-musl: + runs-on: ubuntu-latest + strategy: + matrix: + platform: [ + { target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" }, + { target: "i686-unknown-linux-musl", image_tag: "i686-musl" }, + { target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" }, + { target: "armv7-unknown-linux-musleabihf", image_tag: "armv7-musleabihf" }, + { target: "powerpc64le-unknown-linux-musl", image_tag: "powerpc64le-musl" }, + ] + container: + image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }} + env: + CFLAGS_armv7_unknown_linux_musleabihf: '-mfpu=vfpv3-d16' + steps: + - uses: actions/checkout@v3 + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.13' + - name: Build wheels - linux-musl + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }} + sccache: 'true' + manylinux: musllinux_1_1 + container: off