diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index d8cdb150..2b2da417 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -7,28 +7,54 @@ jobs: name: Build wheels for ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: # os: [ubuntu-20.04, windows-2019, macOS-10.15] os: [ubuntu-20.04, macOS-10.15] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-python@v2 - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==1.10.0 - name: Build wheels - run: python -m cibuildwheel --output-dir wheelhouse + uses: pypa/cibuildwheel@v2.3.1 env: - CIBW_BUILD: cp37-* cp38-* + CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* + CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_ALL_LINUX: bin/cibw_before_build_linux.sh CIBW_BEFORE_ALL_MACOS: bin/cibw_before_build_macosx.sh - # There are problems with both older and newer cython versions... - CIBW_BEFORE_BUILD: pip install numpy cython==0.27.3 + CIBW_BEFORE_BUILD: pip install numpy cython CIBW_ENVIRONMENT: > C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH + CIBW_TEST_COMMAND: python -c 'import flint; print(str(flint.fmpz(2)))' + - uses: actions/upload-artifact@v2 with: path: wheelhouse/*.whl + + 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, macOS-10.15] + python-version: ['3.7', '3.8', '3.9', '3.10'] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/download-artifact@v3 + with: + name: artifact + path: wheelhouse + - run: python -m venv venv + - run: venv/bin/pip install -U pip + - run: venv/bin/pip install --find-links wheelhouse python_flint + - run: venv/bin/python test/test.py diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 52013c3d..6ff7117e 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -74,6 +74,8 @@ if [ $USE_GMP = "gmp" ]; then curl -O https://gmplib.org/download/gmp/gmp-$GMPVER.tar.xz tar xf gmp-$GMPVER.tar.xz cd gmp-$GMPVER + # Show the output of configfsf.guess + ./configfsf.guess ./configure --prefix=$PREFIX\ --enable-fat\ --enable-shared=yes\ diff --git a/bin/build_variables.sh b/bin/build_variables.sh index 027532c4..253f787e 100644 --- a/bin/build_variables.sh +++ b/bin/build_variables.sh @@ -14,8 +14,8 @@ PREFIX=$(pwd)/.local mkdir -p $PREFIX GMPVER=6.2.1 -YASMVER=1.3.1 +YASMVER=1.3.0 MPIRVER=3.0.0 MPFRVER=4.1.0 -FLINTVER=2.7.1 -ARBVER=2.19.0 +FLINTVER=2.8.4 +ARBVER=2.22.0 diff --git a/bin/build_wheel.sh b/bin/build_wheel.sh index ba314f40..bc4c62ef 100755 --- a/bin/build_wheel.sh +++ b/bin/build_wheel.sh @@ -12,8 +12,8 @@ source bin/build_variables.sh python3 -m venv $PREFIX/venv source $PREFIX/venv/bin/activate pip install -U pip wheel delocate -pip install numpy cython==0.27.3 -# N.B. bugs in both older and newer Cython versions... +pip install numpy cython +# Working as of cython==0.29.28 C_INCLUDE_PATH=.local/include/ LIBRARY_PATH=.local/lib/ pip wheel . diff --git a/bin/cibw_before_build_linux.sh b/bin/cibw_before_build_linux.sh index 01506701..0bfc1456 100755 --- a/bin/cibw_before_build_linux.sh +++ b/bin/cibw_before_build_linux.sh @@ -2,5 +2,5 @@ yum install -y xz bin/build_dependencies_unix.sh\ - --gmp gmp\ - --host x86_64-unknown-linux-gnu + --gmp mpir\ + --host x86_64-pc-linux-gnu