Skip to content

Commit 1669e5f

Browse files
committed
fixing macos CI
1 parent 764fc72 commit 1669e5f

File tree

1 file changed

+63
-85
lines changed

1 file changed

+63
-85
lines changed

.github/workflows/build_wheels.yml

Lines changed: 63 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -73,99 +73,77 @@ jobs:
7373
path: ./quaddtype/wheelhouse/*.whl
7474
name: wheels-linux
7575

76-
# build_wheels_macos:
77-
# name: Build wheels on ${{ matrix.os }}
78-
# runs-on: ${{ matrix.os }}
79-
# strategy:
80-
# matrix:
81-
# os: [macos-13, macos-14]
76+
build_wheels_macos:
77+
name: Build wheels on ${{ matrix.os }}
78+
runs-on: ${{ matrix.os }}
79+
strategy:
80+
matrix:
81+
os: [macos-13, macos-14]
8282

83-
# steps:
84-
# - uses: actions/checkout@v3
85-
# with:
86-
# submodules: recursive
83+
steps:
84+
- uses: actions/checkout@v3
85+
with:
86+
submodules: recursive
8787

88-
# - name: Set up Python
89-
# uses: actions/setup-python@v4
90-
# with:
91-
# python-version: "3.10"
88+
- name: Set up Python
89+
uses: actions/setup-python@v4
90+
with:
91+
python-version: "3.10"
9292

93-
# - name: Install dependencies
94-
# run: |
95-
# brew install cmake libomp git
93+
- name: Install dependencies
94+
run: |
95+
brew install cmake libomp git
9696
97-
# - name: Verify QuadBLAS submodule
98-
# run: |
99-
# ls -la quaddtype/numpy_quaddtype/QBLAS/
100-
# ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/
97+
- name: Install SLEEF
98+
env:
99+
MACOSX_DEPLOYMENT_TARGET: "11.0"
100+
run: |
101+
git clone --branch 3.8 https://github.com/shibatch/sleef.git
102+
cd sleef
103+
cmake -S . -B build \
104+
-DSLEEF_BUILD_QUAD:BOOL=ON \
105+
-DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \
106+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
107+
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
108+
-DCMAKE_INSTALL_RPATH="@loader_path/../lib" \
109+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
110+
cmake --build build/ --clean-first -j
111+
sudo cmake --install build --prefix /usr/local
101112
102-
# - name: Install SLEEF and setup QuadBLAS
103-
# env:
104-
# MACOSX_DEPLOYMENT_TARGET: "11.0"
105-
# run: |
106-
# # Install SLEEF
107-
# git clone --branch 3.8 --depth 1 https://github.com/shibatch/sleef.git
108-
# cd sleef
109-
# cmake -S . -B build \
110-
# -DSLEEF_BUILD_QUAD:BOOL=ON \
111-
# -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \
112-
# -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
113-
# -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
114-
# -DCMAKE_INSTALL_RPATH="@loader_path/../lib" \
115-
# -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
116-
# cmake --build build/ --clean-first -j
117-
# sudo cmake --install build --prefix /usr/local
118-
# cd ..
119-
120-
# # Install QuadBLAS headers from submodule
121-
# sudo cp -r quaddtype/numpy_quaddtype/QBLAS/include/quadblas /usr/local/include/
122-
123-
# - name: Install cibuildwheel
124-
# run: pip install cibuildwheel==2.20.0
113+
- name: Verify QuadBLAS submodule
114+
run: |
115+
ls -la quaddtype/numpy_quaddtype/QBLAS/
116+
ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/
125117
126-
# - name: Build wheels
127-
# env:
128-
# CIBW_BUILD: "cp310-* cp311-* cp312-*"
129-
# CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }}
130-
# CIBW_BUILD_VERBOSITY: "1"
131-
# CIBW_BEFORE_ALL: |
132-
# # Install SLEEF
133-
# git clone --branch 3.8 --depth 1 https://github.com/shibatch/sleef.git
134-
# cd sleef
135-
# cmake -S . -B build \
136-
# -DSLEEF_BUILD_QUAD:BOOL=ON \
137-
# -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \
138-
# -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
139-
# -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
140-
# -DCMAKE_INSTALL_RPATH="@loader_path/../lib" \
141-
# -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
142-
# cmake --build build/ --clean-first -j
143-
# cmake --install build --prefix /usr/local
144-
# cd ..
118+
- name: Install cibuildwheel
119+
run: pip install cibuildwheel==2.20.0
145120

146-
# # Install QuadBLAS headers from submodule
147-
# cp -r quaddtype/numpy_quaddtype/QBLAS/include/quadblas /usr/local/include/
148-
# CIBW_ENVIRONMENT: >
149-
# MACOSX_DEPLOYMENT_TARGET="11.0"
150-
# DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"
151-
# CFLAGS="-I/usr/local/include -I/usr/local/include/quadblas $CFLAGS"
152-
# CXXFLAGS="-I/usr/local/include -I/usr/local/include/quadblas -std=c++17 $CXXFLAGS"
153-
# LDFLAGS="-L/usr/local/lib -lsleef -lsleefquad $LDFLAGS"
154-
# PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
155-
# CIBW_REPAIR_WHEEL_COMMAND: >
156-
# delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
157-
# CIBW_TEST_COMMAND: |
158-
# pip install {package}[test]
159-
# pytest {project}/tests
160-
# CIBW_TEST_EXTRAS: "test"
161-
# run: |
162-
# python -m cibuildwheel --output-dir wheelhouse
163-
# working-directory: ./quaddtype
121+
- name: Build wheels
122+
env:
123+
CIBW_BUILD: "cp310-* cp311-* cp312-*"
124+
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }}
125+
CIBW_BUILD_VERBOSITY: "3"
126+
CIBW_ENVIRONMENT: >
127+
MACOSX_DEPLOYMENT_TARGET="11.0"
128+
DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"
129+
CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS"
130+
CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CXXFLAGS"
131+
LDFLAGS="-L/usr/local/lib $LDFLAGS"
132+
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
133+
CIBW_REPAIR_WHEEL_COMMAND: >
134+
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
135+
CIBW_TEST_COMMAND: |
136+
pip install {package}[test]
137+
pytest -s {project}/tests
138+
CIBW_TEST_EXTRAS: "test"
139+
run: |
140+
python -m cibuildwheel --output-dir wheelhouse
141+
working-directory: ./quaddtype
164142

165-
# - uses: actions/upload-artifact@v4
166-
# with:
167-
# path: ./quaddtype/wheelhouse/*.whl
168-
# name: wheels-${{ matrix.os }}
143+
- uses: actions/upload-artifact@v4
144+
with:
145+
path: ./quaddtype/wheelhouse/*.whl
146+
name: wheels-${{ matrix.os }}
169147

170148
# build_wheels_windows:
171149
# name: Build wheels on Windows

0 commit comments

Comments
 (0)