diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 1acbac9a..cfc83035 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -2,10 +2,6 @@ name: Build on: [push, pull_request] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - permissions: contents: read @@ -26,47 +22,12 @@ jobs: fail-fast: false matrix: include: - - name: Build manylinux x86-64 wheels - os: ubuntu-22.04 - kind: native - artifact_name: wheels-ubuntu-22.04 - cibw_platform: auto - cibw_build: "*" - - name: Build manylinux arm64 wheels - os: ubuntu-22.04-arm - kind: native - artifact_name: wheels-ubuntu-22.04-arm - cibw_platform: auto - cibw_build: "*" - - name: Build Windows x86-64 wheels - os: windows-2022 - kind: native - artifact_name: wheels-windows-2022 - cibw_platform: auto - cibw_build: "*" - - name: Build Windows arm64 wheels - os: windows-11-arm - kind: native - artifact_name: wheels-windows-11-arm - cibw_platform: auto - cibw_build: "*" - - name: Build macOS x86-64 wheels - os: macos-15-intel - kind: native - artifact_name: wheels-macos-15-intel - cibw_platform: auto - cibw_build: "*" - name: Build macOS arm64 wheels os: macos-14 kind: native artifact_name: wheels-macos-14 cibw_platform: auto cibw_build: "*" - - name: Build Pyodide wheels - os: ubuntu-22.04 - kind: pyodide - artifact_name: wheels-pyodide - cibw_platform: pyodide steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 @@ -172,18 +133,10 @@ jobs: fail-fast: false matrix: os: [ - ubuntu-22.04, - ubuntu-24.04, - ubuntu-24.04-arm, - windows-2022, - windows-2025, - windows-11-arm, - macos-15-intel, - macos-14, macos-15, ] # This list to be kept in sync with python-requires in pyproject.toml. - python-version: ['3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t', 'pypy3.11'] + python-version: ['3.11'] exclude: - os: windows-11-arm python-version: pypy3.11 @@ -209,59 +162,14 @@ jobs: - run: python -m flint.test --verbose - test_pyodide: - needs: build_wheels - name: Test Pyodide wheel - runs-on: ubuntu-22.04 - permissions: {} - - steps: - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ env.PYODIDE_PYTHON_VERSION }} - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: '22' - - - run: pip install pyodide-build - - run: pyodide xbuildenv install "$PYODIDE_VERSION" - - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: wheels-pyodide - path: wheelhouse - - - run: | - pyodide venv .venv-pyodide - source .venv-pyodide/bin/activate - pip install wheelhouse/*.whl - pip install pytest hypothesis - python -m pytest -svra -p no:cacheprovider --pyargs flint - - # On new enough Ubuntu we can build against the system deb. - test_pip_flint_deb: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + test_docs: + name: Test docs (build and doctest) {{ matrix.number }} + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - os: [ubuntu-24.04] - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: sudo apt-get update - - run: sudo apt-get install libflint-dev - - run: pip install . - - run: python -m flint.test --verbose - - test_docs: - name: Test docs (build and doctest) - runs-on: ubuntu-24.04 + number: + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: @@ -272,161 +180,12 @@ jobs: - run: bin/install_latest_flint_ubuntu.sh - run: pip install --upgrade pip - run: pip install -r requirements-dev.txt + - run: gcc test.c -l flint -o test.exe + - run: ./test.exe + - run: spin run python test.py - run: spin run -- pytest --doctest-glob='*.rst' doc/source - run: spin docs - # Test build with minimum Cython and meson-python versions. - test_old_build_requires: - name: 'Test old Cython/meson-python' - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: sudo apt-get update - - run: sudo apt-get install libflint-dev - # The versions of cython and meson-python here should be kept in sync - # with those in pyproject.toml so that we test the stated minimum - # versions. - # - # We don't need to specify ninja as a requirement in pyproject.toml - # because without --no-build-isolation meson-python handles it - # automatically in get_requirements_for_build_wheel(). - - run: 'pip install "cython==3.0.11" "meson-python==0.18" "ninja<1.11"' - - run: pip install --no-build-isolation . - - run: python -m flint.test --verbose - - # For older Ubuntu we have to build Flint >= 3.0.0 - test_flint_releases: - name: Test flint ${{ matrix.flint-tag }} - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - # Supported Flint versions: - flint-tag: ['v3.0.1', 'v3.1.3-p1', 'v3.2.2', 'v3.3.1'] - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - env: - FLINT_TAG: ${{ matrix.flint-tag }} - run: bin/install_flint_ubuntu.sh "$FLINT_TAG" - - run: pip install . - - run: python -m flint.test --verbose - - # Test against flint main - test_flint_main: - name: Test flint main Linux x86-64 - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: bin/install_flint_ubuntu.sh main - # Need to disable flint version check to build against main - - run: pip install --config-settings=setup-args="-Dflint_version_check=false" . - - run: python -m flint.test --verbose - - # Test against flint main - test_flint_main_arm: - name: Test flint main Linux ARM - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: bin/install_flint_ubuntu.sh main - # Need to disable flint version check to build against main - - run: pip install --config-settings=setup-args="-Dflint_version_check=false" . - - run: python -m flint.test --verbose - - # Test that we can make a coverage build and report coverage - test_coverage_build_setuptools: - name: Test coverage setuptools build - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: sudo apt-get update - - run: sudo apt-get install libflint-dev - - run: pip install -r requirements-dev.txt - - run: bin/coverage_setuptools.sh - - # Test that we can make a coverage build and report coverage - test_coverage_build_meson: - name: Test coverage meson build - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.12' # does not work with 3.13 - - run: sudo apt-get update - - run: sudo apt-get install libflint-dev - - run: pip install -r requirements-dev.txt - - run: bin/coverage.sh - - # Run SymPy test suite against python-flint master - test_sympy: - name: Test SymPy ${{ matrix.sympy-version }} - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - sympy-version: ['1.13.1', '1.14.0'] - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: sudo apt-get update - - run: sudo apt-get install libflint-dev - - run: pip install . - - run: pip install pytest pytest-xdist hypothesis - - env: - SYMPY_VERSION: ${{ matrix.sympy-version }} - run: pip install "sympy==$SYMPY_VERSION" - - run: python -c 'import sympy; sympy.test(parallel=True)' - - # Run SymPy master branch agains python-flint main - test_sympy_master: - name: Test SymPy master - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - - run: sudo apt-get update - - run: sudo apt-get install libflint-dev - - run: pip install . - - run: pip install pytest pytest-xdist hypothesis - - run: pip install git+https://github.com/sympy/sympy.git@master - - run: python -c 'import sympy; sympy.test(parallel=True)' - # Push nightly wheels to Anaconda scientific-python nightly channel # https://scientific-python.org/specs/spec-0004/ # https://anaconda.org/scientific-python-nightly-wheels/python-flint diff --git a/bin/build_variables.sh b/bin/build_variables.sh index 256f4d84..bb21c9fc 100644 --- a/bin/build_variables.sh +++ b/bin/build_variables.sh @@ -19,4 +19,4 @@ MPIRVER=3.0.0 # MPIR build no longer works (not clear where to download from) # These are the actual dependencies used (at least by default): GMPVER=6.3.0 MPFRVER=4.2.2 -FLINTVER=3.4.0 +FLINTVER=3.5.0 diff --git a/test.c b/test.c new file mode 100644 index 00000000..e24c4665 --- /dev/null +++ b/test.c @@ -0,0 +1,20 @@ +#include + +#include "flint/mpoly.h" +#include "flint/gr.h" +#include "flint/gr_mpoly.h" + +#define TRACE(n) do { printf("TRACE %d\n", (n)); fflush(stdout); } while (0) + +int main(int argc, char *argv[]) +{ + gr_ctx_t ctx_fmpzi; + + printf("before...\n"); fflush(stdout); + + gr_ctx_init_fmpzi(ctx_fmpzi); + + printf("...after\n"); fflush(stdout); + + return 0; +} diff --git a/test.py b/test.py new file mode 100644 index 00000000..0279a03a --- /dev/null +++ b/test.py @@ -0,0 +1,6 @@ +from flint.types._gr import gr_fmpzi_ctx, gr_gr_mpoly_ctx +ctx = gr_gr_mpoly_ctx.new(gr_fmpzi_ctx, ["x", "y"]) +print(repr(ctx.gens())) +x, y = ctx.gens() +p = (x + y)**2 +print(repr(p))