@@ -247,9 +247,71 @@ jobs:
247
247
path : ./quaddtype/wheelhouse/*.whl
248
248
name : wheels-windows-${{ matrix.architecture }}
249
249
250
+ build_sdist :
251
+ name : Build SDist
252
+ runs-on : ubuntu-latest
253
+ steps :
254
+ - uses : actions/checkout@v3
255
+ with :
256
+ submodules : recursive
257
+
258
+ - name : Set up Python
259
+ uses : actions/setup-python@v4
260
+ with :
261
+ python-version : " >=3.11.0"
262
+
263
+ - name : Verify QuadBLAS submodule
264
+ run : |
265
+ ls -la quaddtype/numpy_quaddtype/QBLAS/
266
+ ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/
267
+
268
+ - name : Install system dependencies
269
+ run : |
270
+ sudo apt-get update -y
271
+ sudo apt-get install -y cmake gcc g++ make git pkg-config
272
+
273
+ - name : Install SLEEF
274
+ run : |
275
+ git clone --branch 3.8 https://github.com/shibatch/sleef.git
276
+ cd sleef
277
+ cmake -S . -B build \
278
+ -DSLEEF_BUILD_QUAD:BOOL=ON \
279
+ -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \
280
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
281
+ cmake --build build/ --clean-first -j
282
+ sudo cmake --install build --prefix /usr/local
283
+
284
+ - name : Install build dependencies
285
+ run : |
286
+ python -m pip install --upgrade pip
287
+ python -m pip install build
288
+
289
+ - name : Build SDist
290
+ env :
291
+ CFLAGS : " -I/usr/local/include -I$(pwd)/numpy_quaddtype/QBLAS/include"
292
+ CXXFLAGS : " -I/usr/local/include -I$(pwd)/numpy_quaddtype/QBLAS/include -fext-numeric-literals"
293
+ LDFLAGS : " -L/usr/local/lib64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -Wl,-rpath,/usr/local/lib -fopenmp"
294
+ LD_LIBRARY_PATH : " /usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH"
295
+ PKG_CONFIG_PATH : " /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
296
+ run : |
297
+ python -m build --sdist --outdir dist/
298
+ working-directory : ./quaddtype
299
+
300
+ - name : Upload SDist artifact
301
+ uses : actions/upload-artifact@v4
302
+ with :
303
+ name : sdist
304
+ path : ./quaddtype/dist/*.tar.gz
305
+
250
306
publish_to_pypi :
251
307
name : Publish to PyPI
252
- needs : [build_wheels_linux, build_wheels_macos, build_wheels_windows]
308
+ needs :
309
+ [
310
+ build_wheels_linux,
311
+ build_wheels_macos,
312
+ build_wheels_windows,
313
+ build_sdist,
314
+ ]
253
315
runs-on : ubuntu-latest
254
316
if : startsWith(github.ref, 'refs/tags/quaddtype-v')
255
317
@@ -264,9 +326,9 @@ jobs:
264
326
- name : Download all workflow run artifacts
265
327
uses : actions/download-artifact@v4
266
328
with :
329
+ pattern : " *"
267
330
path : dist
331
+ merge-multiple : true
268
332
269
333
- name : Publish to PyPI
270
334
uses : pypa/gh-action-pypi-publish@release/v1
271
- with :
272
- packages-dir : dist/*
0 commit comments