Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is autogenerated by maturin v1.8.7
# This file is autogenerated by maturin v1.12.6
# To update, run
#
# maturin generate-ci --pytest github
Expand Down Expand Up @@ -37,7 +37,9 @@ jobs:
persist-credentials: false

- name: Update Rust toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
run: rustup update ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: ${{ matrix.toolchain }}

- name: Build
run: cargo build --verbose
Expand All @@ -59,6 +61,9 @@ jobs:
runner: ubuntu-24.04-arm
arch: sbsa
feat-flags: "cuda,pyo3"
- target: riscv64
runner: ubuntu-24.04-riscv
manylinux: "2_39"
- target: armv7
- target: s390x
- target: ppc64le
Expand All @@ -69,19 +74,26 @@ jobs:
persist-credentials: false

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
if: ${{ matrix.platform.target != 'riscv64' }}
with:
python-version: "3.13"

- uses: riseproject-dev/setup-python@8b57351c0f828145e2ac14bd328c731503361b7a # https://github.com/actions/setup-python/pull/1302
if: ${{ matrix.platform.target == 'riscv64' }}
with:
python-version: "3.13"
mirror: "https://raw.githubusercontent.com/riseproject-dev/python-versions/main"

- name: Build wheels
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
uses: PyO3/maturin-action@3f475a463fd27ce2440c13988f39fd1312dc9381
with:
target: ${{ matrix.platform.target }}
args: --release --locked --compatibility pypi --features ${{ matrix.platform.feat-flags || 'pyo3' }} --out dist --interpreter python3.13
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: "2_28"
manylinux: ${{ matrix.platform.manylinux || '2_28' }}
before-script-linux: |
# Install nvTIFF and clang-devel
if command -v dnf &> /dev/null; then
if command -v dnf &> /dev/null && test $(uname -m) != "riscv64"; then
# https://developer.nvidia.com/nvtiff-0-6-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Rocky&target_version=8&target_type=rpm_network
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/${{ matrix.platform.arch || 'x86_64' }}/cuda-rhel8.repo
dnf clean all
Expand All @@ -97,15 +109,15 @@ jobs:
fi

- name: Build free-threaded wheels
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
uses: PyO3/maturin-action@3f475a463fd27ce2440c13988f39fd1312dc9381
with:
target: ${{ matrix.platform.target }}
args: --release --locked --compatibility pypi --features ${{ matrix.platform.feat-flags || 'pyo3' }} --out dist --interpreter python3.13t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: "2_28"
manylinux: ${{ matrix.platform.manylinux || '2_28' }}
before-script-linux: |
# Install nvTIFF and clang-devel
if command -v dnf &> /dev/null; then
if command -v dnf &> /dev/null && test $(uname -m) != "riscv64"; then
# https://developer.nvidia.com/nvtiff-0-5-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Rocky&target_version=8&target_type=rpm_network
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/${{ matrix.platform.arch || 'x86_64' }}/cuda-rhel8.repo
dnf clean all
Expand All @@ -127,15 +139,17 @@ jobs:
path: dist/

- name: pytest
if: ${{ endswith(matrix.platform.target, '64') }} # x86_64 and aarch64
if: ${{ endswith(matrix.platform.target, '64') }} # x86_64, aarch64, and riscv64
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install cog3pio --no-index --no-deps --find-links dist --force-reinstall -vv
pip install cog3pio --group tests
pip install cog3pio --prefer-binary --group tests
pytest --verbose
env:
PIP_EXTRA_INDEX_URL: ${{ matrix.platform.target == 'riscv64' && 'https://gitlab.com/api/v4/projects/56254198/packages/pypi/simple/' || '' }}

- name: pytest
if: ${{ !endswith(matrix.platform.target, '64') && !startsWith(github.ref, 'refs/tags/') }} # armv7, s390x and ppc64le
Expand Down
Loading