Skip to content

Commit 14a3a7a

Browse files
committed
fixing setup
1 parent 131c76a commit 14a3a7a

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

.github/workflows/temp.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,110 @@ on:
99
pull_request:
1010

1111
jobs:
12+
build_wheels_linux:
13+
name: Build wheels on Linux
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '>=3.10.0'
22+
23+
- name: Install cibuildwheel
24+
run: pip install cibuildwheel==2.20.0
25+
26+
- name: Build wheels
27+
env:
28+
CIBW_BUILD: 'cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64'
29+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
30+
CIBW_BUILD_VERBOSITY: '3'
31+
CIBW_BEFORE_ALL: |
32+
git clone https://github.com/shibatch/sleef.git
33+
cd sleef
34+
cmake -S . -B build -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
35+
cmake --build build/ --clean-first -j
36+
cmake --install build --prefix /usr/local
37+
CIBW_ENVIRONMENT: >
38+
CFLAGS="-I/usr/local/include $CFLAGS"
39+
CXXFLAGS="-I/usr/local/include $CXXFLAGS"
40+
LDFLAGS="-L/usr/local/lib64 $LDFLAGS"
41+
LD_LIBRARY_PATH="/usr/local/lib64:$LD_LIBRARY_PATH"
42+
CIBW_REPAIR_WHEEL_COMMAND: |
43+
auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel}
44+
CIBW_TEST_COMMAND: |
45+
pip install {package}[test]
46+
pytest {project}/tests
47+
CIBW_TEST_EXTRAS: 'test'
48+
run: |
49+
python -m cibuildwheel --output-dir wheelhouse
50+
working-directory: ./quaddtype
51+
52+
- uses: actions/upload-artifact@v4
53+
with:
54+
path: ./quaddtype/wheelhouse/*.whl
55+
name: wheels-linux
56+
57+
build_wheels_macos:
58+
name: Build wheels on ${{ matrix.os }}
59+
runs-on: ${{ matrix.os }}
60+
strategy:
61+
matrix:
62+
os: [macos-13, macos-14]
63+
64+
steps:
65+
- uses: actions/checkout@v3
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v4
69+
with:
70+
python-version: '3.10'
71+
72+
- name: Install SLEEF
73+
env:
74+
MACOSX_DEPLOYMENT_TARGET: '11.0'
75+
run: |
76+
git clone https://github.com/shibatch/sleef.git
77+
cd sleef
78+
cmake -S . -B build \
79+
-DSLEEF_BUILD_QUAD:BOOL=ON \
80+
-DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \
81+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
82+
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
83+
-DCMAKE_INSTALL_RPATH="@loader_path/../lib" \
84+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
85+
cmake --build build/ --clean-first -j
86+
sudo cmake --install build --prefix /usr/local
87+
- name: Install cibuildwheel
88+
run: pip install cibuildwheel==2.20.0
89+
90+
- name: Build wheels
91+
env:
92+
CIBW_BUILD: 'cp310-* cp311-* cp312-*'
93+
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }}
94+
CIBW_BUILD_VERBOSITY: '1'
95+
CIBW_ENVIRONMENT: >
96+
MACOSX_DEPLOYMENT_TARGET="11.0"
97+
DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"
98+
CFLAGS="-I/usr/local/include $CFLAGS"
99+
CXXFLAGS="-I/usr/local/include $CXXFLAGS"
100+
LDFLAGS="-L/usr/local/lib $LDFLAGS"
101+
CIBW_REPAIR_WHEEL_COMMAND: >
102+
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
103+
CIBW_TEST_COMMAND: |
104+
pip install {package}[test]
105+
pytest {project}/tests
106+
CIBW_TEST_EXTRAS: 'test'
107+
run: |
108+
python -m cibuildwheel --output-dir wheelhouse
109+
working-directory: ./quaddtype
110+
111+
- uses: actions/upload-artifact@v4
112+
with:
113+
path: ./quaddtype/wheelhouse/*.whl
114+
name: wheels-${{ matrix.os }}
115+
12116
build_wheels_windows:
13117
name: Build wheels on Windows
14118
runs-on: windows-latest

0 commit comments

Comments
 (0)