Skip to content
Open
Show file tree
Hide file tree
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
22 changes: 8 additions & 14 deletions .github/workflows/build-munkres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,15 @@ jobs:
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build munkres ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.libc }}_riscv64
name: Build munkres ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# Upstream builds no free-threaded wheel and the extension declares no Py_mod_gil.
python: ["cp312", "cp313", "cp314"]
libc: [manylinux, musllinux]
include:
- libc: manylinux
test_requires: pytest hypothesis numpy scipy
# numpy/scipy have no musllinux riscv64 wheel anywhere; the suite importorskips them.
- libc: musllinux
test_requires: pytest hypothesis
# Upstream builds no free-threaded wheel and the extension declares no Py_mod_gil;
# docs/packages/munkres.yaml declares no `t` targets either.
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

env:
MUNKRES_VERSION: ${{ matrix.version }}
Expand All @@ -88,14 +81,15 @@ jobs:
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
only: ${{ matrix.python }}-${{ matrix.libc }}_riscv64
only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }}
CIBW_ENVIRONMENT: >-
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
PIP_ONLY_BINARY=numpy,scipy
CIBW_TEST_REQUIRES: ${{ matrix.test_requires }}
# numpy/scipy have no musllinux riscv64 wheel anywhere; the suite importorskips them.
CIBW_TEST_REQUIRES: ${{ matrix.platform == 'musllinux' && 'pytest hypothesis' || 'pytest hypothesis numpy scipy' }}
# pyproject's pytest `pythonpath = ["src"]` puts the checkout's pure-Python
# package ahead of the wheel, so stage only the suite and its ini.
CIBW_TEST_SOURCES: tests pyproject.toml
Expand All @@ -105,7 +99,7 @@ jobs:

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: munkres-${{ env.MUNKRES_VERSION }}-${{ matrix.python }}-${{ matrix.libc }}_riscv64
name: munkres-${{ env.MUNKRES_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error

Expand Down
85 changes: 46 additions & 39 deletions .github/workflows/build-rebound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,45 +51,13 @@ jobs:
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build rebound ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.libc }}_riscv64
name: Build rebound ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
python: ["cp312", "cp313", "cp314", "cp314t"]
libc: [manylinux, musllinux]
include:
- libc: manylinux
test-environment: PIP_ONLY_BINARY=numpy,matplotlib,contourpy,kiwisolver,pillow
test-requires: pytest multiprocess matplotlib numpy
test-command: >-
python -m unittest discover -v -s rebound.tests &&
python {project}/python_examples/dragforce/problem.py &&
python {project}/python_examples/megno_simple/problem.py &&
python {project}/python_examples/orbital_elements/problem.py &&
python {project}/python_examples/outersolarsystem/problem.py &&
python {project}/python_examples/simple_orbit/problem.py &&
python {project}/python_examples/longtermtest/problem.py &&
python {project}/python_examples/megno/problem.py
# No numpy/matplotlib riscv64 musllinux wheels exist, so skip the tests and examples
# that import them. test_megno excluded too: TestMegno.test_chaotic compares the
# MEGNO chaos indicator between the IAS15 and WHFast integrators against a
# delta=0.3 tolerance (already loose, since chaotic systems are inherently
# numerically sensitive) -- it passes on every manylinux leg but overshoots to
# ~0.313 on every musllinux one, consistent with musl's libm giving slightly
# different rounding than glibc's across enough integration steps to matter here.
# unittest's CLI has no single-test deselect, so drop the whole module.
- libc: musllinux
test-environment: ''
test-requires: ''
test-command: >-
python -m unittest -v $(python -c "import pkgutil, rebound.tests as t; print(*('rebound.tests.' + m.name for m in pkgutil.iter_modules(t.__path__) if not m.name.startswith(('test_frequency_analysis', 'test_plotting', 'test_trace', 'test_megno'))))") &&
python {project}/python_examples/dragforce/problem.py &&
python {project}/python_examples/orbital_elements/problem.py &&
python {project}/python_examples/outersolarsystem/problem.py &&
python {project}/python_examples/simple_orbit/problem.py
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

env:
REBOUND_VERSION: ${{ matrix.version }}
Expand All @@ -102,23 +70,62 @@ jobs:
ref: ${{ env.REBOUND_VERSION }}
persist-credentials: false

# No numpy/matplotlib riscv64 musllinux wheels exist, so skip the tests and examples
# that import them. test_megno excluded too: TestMegno.test_chaotic compares the
# MEGNO chaos indicator between the IAS15 and WHFast integrators against a
# delta=0.3 tolerance (already loose, since chaotic systems are inherently
# numerically sensitive) -- it passes on every manylinux leg but overshoots to
# ~0.313 on every musllinux one, consistent with musl's libm giving slightly
# different rounding than glibc's across enough integration steps to matter here.
# unittest's CLI has no single-test deselect, so drop the whole module.
- name: Select per-platform test configuration
run: |
if [ "${{ matrix.platform }}" = musllinux ]; then
cat >> "$GITHUB_ENV" <<'ENVEOF'
TEST_ENVIRONMENT=
TEST_REQUIRES=
TEST_COMMAND<<TESTCMD_EOF
python -m unittest -v $(python -c "import pkgutil, rebound.tests as t; print(*('rebound.tests.' + m.name for m in pkgutil.iter_modules(t.__path__) if not m.name.startswith(('test_frequency_analysis', 'test_plotting', 'test_trace', 'test_megno'))))") &&
python {project}/python_examples/dragforce/problem.py &&
python {project}/python_examples/orbital_elements/problem.py &&
python {project}/python_examples/outersolarsystem/problem.py &&
python {project}/python_examples/simple_orbit/problem.py
TESTCMD_EOF
ENVEOF
else
cat >> "$GITHUB_ENV" <<'ENVEOF'
TEST_ENVIRONMENT=PIP_ONLY_BINARY=numpy,matplotlib,contourpy,kiwisolver,pillow
TEST_REQUIRES=pytest multiprocess matplotlib numpy
TEST_COMMAND<<TESTCMD_EOF
python -m unittest discover -v -s rebound.tests &&
python {project}/python_examples/dragforce/problem.py &&
python {project}/python_examples/megno_simple/problem.py &&
python {project}/python_examples/orbital_elements/problem.py &&
python {project}/python_examples/outersolarsystem/problem.py &&
python {project}/python_examples/simple_orbit/problem.py &&
python {project}/python_examples/longtermtest/problem.py &&
python {project}/python_examples/megno/problem.py
TESTCMD_EOF
ENVEOF
fi

- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
env:
CIBW_ARCHS: riscv64
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.libc }}_riscv64
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_MUSLLINUX_RISCV64_IMAGE: ${{ env.MUSLLINUX_RISCV64_IMAGE }}
# Upstream's FFP_CONTRACT_OFF is a runner env var, which never reaches the Linux build container.
CIBW_ENVIRONMENT: >-
FFP_CONTRACT_OFF=1
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
CIBW_TEST_ENVIRONMENT: ${{ matrix.test-environment }}
CIBW_TEST_REQUIRES: ${{ matrix.test-requires }}
CIBW_TEST_COMMAND: ${{ matrix.test-command }}
CIBW_TEST_ENVIRONMENT: ${{ env.TEST_ENVIRONMENT }}
CIBW_TEST_REQUIRES: ${{ env.TEST_REQUIRES }}
CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }}

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: rebound-${{ env.REBOUND_VERSION }}-${{ matrix.python }}-${{ matrix.libc }}_riscv64
name: rebound-${{ env.REBOUND_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-vmprof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ jobs:
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build vmprof ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
name: Build vmprof ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
# Upstream's own CIBW_SKIP drops cp3*t-*: vmprof does not support
# free-threaded CPython.
python: ["cp312", "cp313", "cp314"]
# free-threaded CPython. docs/packages/vmprof.yaml declares no `t`
# targets either, so the generated matrix never includes one.
include: ${{ fromJSON(needs.setup.outputs.matrix) }}

env:
VMPROF_VERSION: ${{ matrix.version }}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
only: ${{ matrix.python }}-manylinux_riscv64
only: ${{ matrix.python }}-${{ matrix.platform }}_riscv64
env:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# Upstream's before-build is a plain `dnf install -y libunwind-devel`, which
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vmprof-${{ env.VMPROF_VERSION }}-${{ matrix.python }}-manylinux_riscv64
name: vmprof-${{ env.VMPROF_VERSION }}-${{ matrix.python }}-${{ matrix.platform }}_riscv64
path: ./wheelhouse/*.whl
if-no-files-found: error

Expand Down
Loading