bump to 2.2.4 #297
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| # Allow to run manually | |
| concurrency: | |
| # Cancel previous runs of this workflow for the same branch | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build and Test (${{ matrix.os }}, Python ${{ matrix.python-version }}, PARI ${{ matrix.pari-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.12', '3.13', '3.14'] | |
| pari-version: ['2.15.4', '2.15.5', '2.17.2'] | |
| include: | |
| - os: macos-latest | |
| python-version: '3.12' | |
| pari-version: '2.17.2' # Whatever comes with homebrew | |
| - os: macos-latest | |
| python-version: '3.13' | |
| pari-version: '2.17.2' # Whatever comes with homebrew | |
| - os: macos-latest | |
| python-version: '3.14' | |
| pari-version: '2.17.2' # Whatever comes with homebrew | |
| env: | |
| LC_ALL: C | |
| PARI_VERSION: ${{ matrix.pari-version }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }} | |
| steps: | |
| - name: Set up the repository | |
| uses: actions/checkout@v4 | |
| - name: Setup MSYS2 | |
| if: runner.os == 'Windows' | |
| id: msys2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| update: true | |
| install: >- | |
| base-devel | |
| m4 | |
| bison | |
| make | |
| patch | |
| sed | |
| wget | |
| mingw-w64-ucrt-x86_64-toolchain | |
| mingw-w64-ucrt-x86_64-gmp | |
| mingw-w64-ucrt-x86_64-python | |
| mingw-w64-ucrt-x86_64-python-pip | |
| mingw-w64-ucrt-x86_64-meson-python | |
| mingw-w64-ucrt-x86_64-cython | |
| path-type: inherit | |
| - name: Set up Python ${{ matrix.python-version }} | |
| if: runner.os != 'Windows' | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install PARI | |
| if: matrix.os != 'macos-latest' | |
| run: | | |
| bash -x .install-pari.sh | |
| - name: Install PARI | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install pari | |
| - name: Smoke test PARI | |
| run: | | |
| if [ ${{ runner.os }} = macOS ]; then | |
| HOMEBREW=`brew --prefix` | |
| clang -v tests/test.c -o test -I$HOMEBREW/include -L$HOMEBREW/lib -lpari -lgmp | |
| else | |
| gcc -v tests/test.c -o test -I/usr/local/include -L/usr/local/bin -lpari -lgmp | |
| fi | |
| expected="zeta(2) = 1.6449340668482264364 | |
| p = x^3 + x^2 + x - 1 | |
| modulus = y^3 + y^2 + y - 1 | |
| centerlift(lift(fq)) = [x - y, 1; x + (y^2 + y - 1), 1; x + (-y^2 - 1), 1]" | |
| output="$(./test)" | |
| # Normalize newlines for comparison | |
| output="$(echo "$output" | tr -d '\r')" | |
| expected="$(echo "$expected" | tr -d '\r')" | |
| echo -e "Got:\n$output" | |
| if [ "$output" != "$expected" ]; then | |
| echo "Unexpected output from test.c" | |
| echo -e "Expected:\n$expected" | |
| exit 1 | |
| fi | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Build | |
| run: | | |
| if [ ${{ runner.os }} = Windows ]; then | |
| export C_INCLUDE_PATH=$(cygpath -am "${{ steps.msys2.outputs.msys2-location }}")/usr/local/include | |
| export LIBRARY_PATH=$(cygpath -am "${{ steps.msys2.outputs.msys2-location }}")/usr/local/bin | |
| fi | |
| echo $PATH | |
| echo $C_INCLUDE_PATH | |
| echo $LIBRARY_PATH | |
| uv sync --frozen --inexact -v --no-install-project | |
| uv sync --frozen --inexact -v --no-build-isolation --no-editable --config-settings=builddir=builddir | |
| - name: Test | |
| run: | | |
| uv run make check | |
| - name: Build docs | |
| run: | | |
| uv sync --frozen --inexact -v --group doc | |
| (cd docs && uv run make html) |