Skip to content

Commit 11b418f

Browse files
Merge pull request #20 from oscarbenjamin/pr_bump_versions
maint: update CI wheel building script
2 parents b3eb354 + ecbaa5b commit 11b418f

File tree

5 files changed

+42
-14
lines changed

5 files changed

+42
-14
lines changed

.github/workflows/buildwheel.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,54 @@ jobs:
77
name: Build wheels for ${{ matrix.os }}
88
runs-on: ${{ matrix.os }}
99
strategy:
10+
fail-fast: false
1011
matrix:
1112
# os: [ubuntu-20.04, windows-2019, macOS-10.15]
1213
os: [ubuntu-20.04, macOS-10.15]
1314

1415
steps:
15-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1617
- uses: actions/setup-python@v2
1718

18-
- name: Install cibuildwheel
19-
run: python -m pip install cibuildwheel==1.10.0
2019
- name: Build wheels
21-
run: python -m cibuildwheel --output-dir wheelhouse
20+
uses: pypa/cibuildwheel@v2.3.1
2221
env:
23-
CIBW_BUILD: cp37-* cp38-*
22+
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
23+
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
24+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
2425
CIBW_BEFORE_ALL_LINUX: bin/cibw_before_build_linux.sh
2526
CIBW_BEFORE_ALL_MACOS: bin/cibw_before_build_macosx.sh
26-
# There are problems with both older and newer cython versions...
27-
CIBW_BEFORE_BUILD: pip install numpy cython==0.27.3
27+
CIBW_BEFORE_BUILD: pip install numpy cython
2828
CIBW_ENVIRONMENT: >
2929
C_INCLUDE_PATH=$(pwd)/.local/include/
3030
LIBRARY_PATH=$(pwd)/.local/lib/
3131
LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH
32+
CIBW_TEST_COMMAND: python -c 'import flint; print(str(flint.fmpz(2)))'
33+
3234
- uses: actions/upload-artifact@v2
3335
with:
3436
path: wheelhouse/*.whl
37+
38+
test_wheels:
39+
needs: build_wheels
40+
name: Test ${{ matrix.python-version }} wheel on ${{ matrix.os }}
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
os: [ubuntu-20.04, macOS-10.15]
46+
python-version: ['3.7', '3.8', '3.9', '3.10']
47+
48+
steps:
49+
- uses: actions/checkout@v2
50+
- uses: actions/setup-python@v2
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
- uses: actions/download-artifact@v3
54+
with:
55+
name: artifact
56+
path: wheelhouse
57+
- run: python -m venv venv
58+
- run: venv/bin/pip install -U pip
59+
- run: venv/bin/pip install --find-links wheelhouse python_flint
60+
- run: venv/bin/python test/test.py

bin/build_dependencies_unix.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ if [ $USE_GMP = "gmp" ]; then
7474
curl -O https://gmplib.org/download/gmp/gmp-$GMPVER.tar.xz
7575
tar xf gmp-$GMPVER.tar.xz
7676
cd gmp-$GMPVER
77+
# Show the output of configfsf.guess
78+
./configfsf.guess
7779
./configure --prefix=$PREFIX\
7880
--enable-fat\
7981
--enable-shared=yes\

bin/build_variables.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ PREFIX=$(pwd)/.local
1414
mkdir -p $PREFIX
1515

1616
GMPVER=6.2.1
17-
YASMVER=1.3.1
17+
YASMVER=1.3.0
1818
MPIRVER=3.0.0
1919
MPFRVER=4.1.0
20-
FLINTVER=2.7.1
21-
ARBVER=2.19.0
20+
FLINTVER=2.8.4
21+
ARBVER=2.22.0

bin/build_wheel.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ source bin/build_variables.sh
1212
python3 -m venv $PREFIX/venv
1313
source $PREFIX/venv/bin/activate
1414
pip install -U pip wheel delocate
15-
pip install numpy cython==0.27.3
16-
# N.B. bugs in both older and newer Cython versions...
15+
pip install numpy cython
16+
# Working as of cython==0.29.28
1717

1818
C_INCLUDE_PATH=.local/include/ LIBRARY_PATH=.local/lib/ pip wheel .
1919

bin/cibw_before_build_linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
yum install -y xz
44
bin/build_dependencies_unix.sh\
5-
--gmp gmp\
6-
--host x86_64-unknown-linux-gnu
5+
--gmp mpir\
6+
--host x86_64-pc-linux-gnu

0 commit comments

Comments
 (0)