Skip to content

Disable debug symbols in Flint build #594

Disable debug symbols in Flint build

Disable debug symbols in Flint build #594

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
# path-type inherit is used so that when cibuildwheel calls msys2 to
# run bin/cibw_before_build_windows.sh the virtual environment
# created by cibuildwheel will be available within msys2. The
# msys2/setup-msys2 README warns that using inherit here can be
# problematic in some situations. Maybe there is a better way to do
# this.
path-type: inherit
if: ${{ matrix.os == 'windows-2019' }}
# Install pkgconfig on Windows from choco rather than from msys and
# avoid using the Strawberry one.
- run: choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
if: ${{ matrix.os == 'windows-2019' }}
# We have to set this here rather than in the cibuildwheel config
# This is probably something to do with \ vs / in paths...
- run: echo "PKG_CONFIG_PATH=${{ github.workspace }}/.local/lib/pkgconfig" >> $env:GITHUB_ENV
if: ${{ matrix.os == 'windows-2019' }}
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.1
env:
# override setting in pyproject.toml to use msys2 instead of msys64 bash
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
build_sdist:
name: Build sdist
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: sudo apt-get update
- run: sudo apt-get install libgmp-dev libmpfr-dev xz-utils ninja-build
- run: curl -O -L https://www.flintlib.org/flint-3.1.0.tar.gz
- run: tar -xzf flint-3.1.0.tar.gz
- run: cd flint-3.1.0 && ./configure --disable-static && make -j4 && sudo make install
- run: pip install build
- run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
test_rst:
needs: build_wheels
name: Test rst docs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/download-artifact@v4
with:
name: wheels-ubuntu-20.04
path: wheelhouse
- run: pip install --upgrade pip
- run: pip install pytest
- run: pip install --no-index --find-links wheelhouse python_flint
- run: pytest --doctest-glob='*.rst' doc/source
test_wheels:
needs: build_wheels
name: Test ${{ matrix.python-version }} wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse
- run: pip install --no-index --find-links wheelhouse python_flint
- run: python -m flint.test --verbose
# 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@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: sudo apt-get update
- run: sudo apt-get install libflint-dev
- run: pip install .
- run: python -m flint.test --verbose
# For older Ubuntu we have to build Flint >= 3.0.0
test_flint_versions:
name: Test flint ${{ matrix.flint-tag }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# Supported versions and latest git
flint-tag: ['v3.0.0', 'v3.0.1', 'v3.1.0', 'v3.1.1', 'v3.1.2', 'main']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: bin/install_flint_ubuntu.sh ${{ matrix.flint-tag }}
- run: pip install .
- run: python -m flint.test --verbose