Skip to content

Commit 4f86ce2

Browse files
author
t-swsingh_microsoft
committed
fixing setup
1 parent 99ed1f8 commit 4f86ce2

File tree

1 file changed

+11
-169
lines changed

1 file changed

+11
-169
lines changed

.github/workflows/build_wheels.yml

Lines changed: 11 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -3,121 +3,15 @@ name: Build Wheels
33
on:
44
push:
55
branches:
6-
- main
6+
- win-sleeef
77
tags:
8-
- "quaddtype-v*"
8+
- 'quaddtype-v*'
99
paths:
10-
- "quaddtype/**"
10+
- 'quaddtype/**'
1111
pull_request:
12-
paths:
13-
- "quaddtype/**"
1412
workflow_dispatch:
1513

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

14236
- name: Install Miniconda
14337
uses: conda-incubator/setup-miniconda@v3
14438
with:
14539
auto-update-conda: true
146-
python-version: "3.10"
40+
python-version: '3.10'
14741
architecture: ${{ matrix.architecture }}
14842

14943
- name: Install SLEEF and other dependencies
@@ -171,15 +65,15 @@ jobs:
17165
17266
- name: Build wheels
17367
env:
174-
CIBW_BUILD: "cp310-* cp311-* cp312-*"
175-
CIBW_SKIP: "pp* cp36-* cp37-* cp38-* cp39-* cp313-*"
68+
CIBW_BUILD: 'cp310-* cp311-* cp312-*'
69+
CIBW_SKIP: 'pp* cp36-* cp37-* cp38-* cp39-* cp313-*'
17670
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }}
177-
CIBW_BUILD_VERBOSITY: "3"
178-
DISTUTILS_USE_SDK: "1"
179-
MSSdk: "1"
71+
CIBW_BUILD_VERBOSITY: '3'
72+
DISTUTILS_USE_SDK: '1'
73+
MSSdk: '1'
18074
CIBW_BEFORE_BUILD: |
18175
pip install meson meson-python ninja numpy
182-
CIBW_REPAIR_WHEEL_COMMAND: "delvewheel repair -w {dest_dir} {wheel}"
76+
CIBW_REPAIR_WHEEL_COMMAND: 'delvewheel repair -w {dest_dir} {wheel}'
18377
CIBW_TEST_COMMAND: |
18478
pip install {package}[test]
18579
python -m pytest -v {project}/test
@@ -195,55 +89,3 @@ jobs:
19589
with:
19690
path: ./quaddtype/wheelhouse/*.whl
19791
name: wheels-windows-${{ matrix.architecture }}
198-
199-
publish_to_testpypi:
200-
name: Publish to TestPyPI
201-
needs: [build_wheels_linux, build_wheels_macos, build_wheels_windows]
202-
runs-on: ubuntu-latest
203-
if: startsWith(github.ref, 'refs/tags/quaddtype-v')
204-
steps:
205-
- name: Download all workflow run artifacts
206-
uses: actions/download-artifact@v4
207-
with:
208-
path: dist
209-
- name: Publish to TestPyPI
210-
uses: pypa/gh-action-pypi-publish@v1.9.0
211-
with:
212-
user: __token__
213-
password: ${{ secrets.PYPI_API_TOKEN }}
214-
repository-url: https://test.pypi.org/legacy/
215-
packages-dir: dist/*
216-
217-
create_release:
218-
name: Create Release
219-
needs: [build_wheels_linux, build_wheels_macos, build_wheels_windows]
220-
runs-on: ubuntu-latest
221-
if: startsWith(github.ref, 'refs/tags/quaddtype-v')
222-
223-
steps:
224-
- name: Checkout code
225-
uses: actions/checkout@v2
226-
227-
- name: Download all workflow run artifacts
228-
uses: actions/download-artifact@v4
229-
with:
230-
path: artifacts
231-
232-
- name: Create Release
233-
id: create_release
234-
uses: actions/create-release@v1
235-
env:
236-
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
237-
with:
238-
tag_name: ${{ github.ref }}
239-
release_name: Release ${{ github.ref }}
240-
draft: false
241-
prerelease: false
242-
243-
- name: Upload Release Assets
244-
uses: softprops/action-gh-release@v1
245-
if: startsWith(github.ref, 'refs/tags/')
246-
with:
247-
files: ./artifacts/**/*.whl
248-
env:
249-
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 commit comments

Comments
 (0)