From 43a81b65eee169589255d10298969b77be9ddb94 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 11:24:32 +0200 Subject: [PATCH 1/5] Run pyodide CI jobs repeatedly --- .github/workflows/buildwheel.yml | 397 +------------------------------ 1 file changed, 3 insertions(+), 394 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index f6677d0d..294e3a4d 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -26,42 +26,6 @@ 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 @@ -130,77 +94,12 @@ jobs: name: ${{ matrix.artifact_name }} path: wheelhouse/*.whl - build_sdist: - name: Build sdist - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ env.PYODIDE_PYTHON_VERSION }} - - - run: bin/install_latest_flint_ubuntu.sh - - run: pip install build - - run: python -m build --sdist - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: sdist - path: dist/*.tar.gz - - test_wheels: - needs: build_wheels - name: Test ${{ matrix.python-version }} wheel on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - permissions: {} - strategy: - 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.14', '3.14t', 'pypy3.11'] - exclude: - - os: windows-11-arm - python-version: pypy3.11 - - steps: - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - path: wheelhouse - merge-multiple: true - - run: pip install --no-index --find-links wheelhouse python_flint - - # Check if the GIL is disabled in the free-threading build after import. - - run: | - python --version --version - which python - python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))" - python -c "import sys; print(getattr(sys, '_is_gil_enabled', lambda: True)())" - python -c "import sys; import flint; print(getattr(sys, '_is_gil_enabled', lambda: True)())" - - - run: python -m flint.test --verbose - test_pyodide: needs: build_wheels name: Test Pyodide wheel + strategy: + matrix: + number: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] runs-on: ubuntu-22.04 permissions: {} @@ -227,293 +126,3 @@ jobs: 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 }} - 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 - 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_latest_flint_ubuntu.sh - - run: pip install --upgrade pip - - run: pip install -r requirements-dev.txt - - 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', - 'v3.4.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' - - 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 - # https://github.com/scientific-python/upload-nightly-action/issues/111 - - nightly-wheels-upload: - name: Upload Anaconda Scientific Python nightly wheels - needs: [build_wheels] - # Run on push/merge to main - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - environment: - name: anaconda_nightly - permissions: {} - - steps: - # Downloads all artifacts - - name: Download release artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - path: wheelhouse - merge-multiple: true - - - name: Copy the wheels into dist - run: mkdir dist && cp wheelhouse/*.whl dist - - - name: Upload wheels - uses: scientific-python/upload-nightly-action@e76cfec8a4611fd02808a801b0ff5a7d7c1b2d99 # 0.6.4 - with: - artifacts_path: dist - # This token is generated from anaconda.org - # https://github.com/scientific-python/upload-nightly-action/issues/111 - anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN_V2 }} - - # Deploy wheels and sdist to PyPI - - pypi_release: - name: Publish to PyPI - needs: [build_wheels, build_sdist] - # Run only when a tag is pushed to the flintlib/python-flint repo - if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.repository_owner == 'flintlib'" - environment: - name: pypi - url: https://pypi.org/p/python-flint - permissions: - id-token: write # Required for trusted publishing to PyPI via OIDC. - runs-on: ubuntu-latest - - steps: - # Downloads all artifacts - - name: Download release artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - path: wheelhouse - merge-multiple: true - - - name: Copy the PyPI files into dist - run: | - mkdir dist - cp wheelhouse/*.whl wheelhouse/*.tar.gz dist - - - name: Publish package on PyPI - # It is recommended to pin a commit hash here for security but it - # should be kept up to date. Possibly all actions and dependencies used - # by the build script should be pinned... - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 - - # Make a GitHub release - - github-publish: - name: Publish GitHub release - needs: pypi_release - runs-on: ubuntu-latest - permissions: - contents: write # Required to create the GitHub release with the gh CLI. - - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - - name: Download sdist - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: sdist - path: dist - - - name: Create GitHub release - env: - GH_TOKEN: ${{ github.token }} - REF_NAME: ${{ github.ref_name }} - run: | - gh release create "$REF_NAME" dist/* \ - --title "python-flint $REF_NAME" \ - --notes "https://github.com/flintlib/python-flint?tab=readme-ov-file#changelog" From 1b71f4d51160f5094a5a64419b8f257b5ce78a67 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 11:35:28 +0200 Subject: [PATCH 2/5] trigger another build --- .github/workflows/buildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 294e3a4d..76526a34 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -26,7 +26,7 @@ jobs: fail-fast: false matrix: include: - - name: Build Pyodide wheels + - name: Build Pyodide wheels again os: ubuntu-22.04 kind: pyodide artifact_name: wheels-pyodide From 264d80e492e9a5a740b75d4c81b73c443e09f694 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 11:36:49 +0200 Subject: [PATCH 3/5] trigger another build --- .github/workflows/buildwheel.yml | 4 ---- .github/workflows/lint.yml | 36 -------------------------------- .github/workflows/zizmor.yml | 29 ------------------------- 3 files changed, 69 deletions(-) delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/zizmor.yml diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 76526a34..44bc6ae9 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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index de50a9ee..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Linting - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - pip install uv - uv pip install cython-lint --upgrade --system - - - name: cython-lint - run: | - cython-lint src/ diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml deleted file mode 100644 index 0dd811f4..00000000 --- a/.github/workflows/zizmor.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Zizmor - -on: [pull_request, push] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: {} - -jobs: - zizmor: - name: Audit GitHub Actions - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - name: Checkout repository - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - - name: Run zizmor - uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 - with: - advanced-security: false - annotations: true - persona: auditor - inputs: .github/workflows/ From 28bb8f33b8cec2580cef8ee7347ac4d489d5b899 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 11:37:33 +0200 Subject: [PATCH 4/5] And again... --- .github/workflows/buildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 44bc6ae9..4e4bfcba 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: include: - - name: Build Pyodide wheels again + - name: Build Pyodide wheels and again os: ubuntu-22.04 kind: pyodide artifact_name: wheels-pyodide From c41b45964155e29902c4dc111a29d1abf639a910 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 11:38:12 +0200 Subject: [PATCH 5/5] Once more --- .github/workflows/buildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 4e4bfcba..44bc6ae9 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: include: - - name: Build Pyodide wheels and again + - name: Build Pyodide wheels again os: ubuntu-22.04 kind: pyodide artifact_name: wheels-pyodide