Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 65 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,71 @@ jobs:
path: ./quaddtype/wheelhouse/*.whl
name: wheels-windows-${{ matrix.architecture }}

build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ">=3.11.0"

- name: Verify QuadBLAS submodule
run: |
ls -la quaddtype/numpy_quaddtype/QBLAS/
ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/

- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y cmake gcc g++ make git pkg-config

- name: Install SLEEF
run: |
git clone --branch 3.8 https://github.com/shibatch/sleef.git
cd sleef
cmake -S . -B build \
-DSLEEF_BUILD_QUAD:BOOL=ON \
-DSLEEF_BUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build build/ --clean-first -j
sudo cmake --install build --prefix /usr/local

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build

- name: Build SDist
env:
CFLAGS: "-I/usr/local/include -I$(pwd)/numpy_quaddtype/QBLAS/include"
CXXFLAGS: "-I/usr/local/include -I$(pwd)/numpy_quaddtype/QBLAS/include -fext-numeric-literals"
LDFLAGS: "-L/usr/local/lib64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -Wl,-rpath,/usr/local/lib -fopenmp"
LD_LIBRARY_PATH: "/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH"
PKG_CONFIG_PATH: "/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
run: |
python -m build --sdist --outdir dist/
working-directory: ./quaddtype

- name: Upload SDist artifact
uses: actions/upload-artifact@v4
with:
name: sdist
path: ./quaddtype/dist/*.tar.gz

publish_to_pypi:
name: Publish to PyPI
needs: [build_wheels_linux, build_wheels_macos, build_wheels_windows]
needs:
[
build_wheels_linux,
build_wheels_macos,
build_wheels_windows,
build_sdist,
]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/quaddtype-v')

Expand All @@ -264,9 +326,9 @@ jobs:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
pattern: "*"
path: dist
merge-multiple: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/*
Loading