From 642a993ae9dc9f9235dfae172e04601c7b2a1066 Mon Sep 17 00:00:00 2001 From: swayaminsync Date: Wed, 27 Aug 2025 21:18:59 +0530 Subject: [PATCH 1/4] building sdist --- .github/workflows/build_wheels.yml | 39 +++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 20af6db..23a9e6d 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -247,9 +247,42 @@ jobs: path: ./quaddtype/wheelhouse/*.whl name: wheels-windows-${{ matrix.architecture }} + build_sdist: + name: Build SDist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ">=3.11.0" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + + - name: Build SDist + 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, + ] # ← Add build_sdist here runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/quaddtype-v') @@ -264,9 +297,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/* From 67d042e64403817149b3a83c226c70ec826ae867 Mon Sep 17 00:00:00 2001 From: swayaminsync Date: Wed, 27 Aug 2025 21:19:34 +0530 Subject: [PATCH 2/4] building sdist --- .github/workflows/build_wheels.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 23a9e6d..05b7466 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -277,12 +277,13 @@ jobs: publish_to_pypi: name: Publish to PyPI - needs: [ + needs: + [ build_wheels_linux, build_wheels_macos, build_wheels_windows, build_sdist, - ] # ← Add build_sdist here + ] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/quaddtype-v') From e7cd4698e8194d1f28daf63b12d258341fd20255 Mon Sep 17 00:00:00 2001 From: swayaminsync Date: Wed, 27 Aug 2025 21:26:01 +0530 Subject: [PATCH 3/4] modifying job --- .github/workflows/build_wheels.yml | 520 +++++++++++++++-------------- 1 file changed, 274 insertions(+), 246 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 05b7466..7180ad6 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -16,8 +16,239 @@ on: workflow_dispatch: jobs: - build_wheels_linux: - name: Build wheels on Linux + # build_wheels_linux: + # name: Build wheels on Linux + # 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 cibuildwheel + # run: pip install cibuildwheel==3.1.4 + + # - name: Build wheels + # env: + # CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp313t-manylinux_x86_64 cp314-manylinux_x86_64 cp314t-manylinux_x86_64" + # CIBW_ENABLE: cpython-prerelease cpython-freethreading + # CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + # CIBW_BUILD_VERBOSITY: "3" + # CIBW_BEFORE_ALL: | + # yum update -y + # yum install -y cmake gcc gcc-c++ make git pkgconfig + # # Install SLEEF in container + # 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 + # cmake --install build --prefix /usr/local + # CIBW_ENVIRONMENT: > + # CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" + # CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include -fext-numeric-literals $CXXFLAGS" + # LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -Wl,-rpath,/usr/local/lib -fopenmp $LDFLAGS" + # 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" + # CIBW_REPAIR_WHEEL_COMMAND: | + # auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel} + # CIBW_TEST_COMMAND: | + # pip install {package}[test] + # if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then + # pytest --parallel-threads=10 --iterations=10 {project}/tests + # else + # pytest -s {project}/tests + # fi + # CIBW_TEST_EXTRAS: "test" + # run: | + # python -m cibuildwheel --output-dir wheelhouse + # working-directory: ./quaddtype + + # - uses: actions/upload-artifact@v4 + # with: + # path: ./quaddtype/wheelhouse/*.whl + # name: wheels-linux + + # build_wheels_macos: + # name: Build wheels on ${{ matrix.os }} + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # os: [macos-13, macos-14] + + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: ">=3.11.0" + + # - name: Install dependencies + # run: | + # brew install cmake libomp git + + # - name: Install SLEEF + # env: + # MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} + # 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 \ + # -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} \ + # -DCMAKE_INSTALL_RPATH="@loader_path/../lib" \ + # -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + # cmake --build build/ --clean-first -j + # sudo cmake --install build --prefix /usr/local + + # - name: Verify QuadBLAS submodule + # run: | + # ls -la quaddtype/numpy_quaddtype/QBLAS/ + # ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ + + # - name: Installing Python dependencies + # run: | + # pip install -U pip + # pip install cibuildwheel==3.1.4 + # pip install pytest-run-parallel + + # - name: Build wheels + # env: + # CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" + # CIBW_ENABLE: cpython-prerelease cpython-freethreading + # CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }} + # CIBW_BUILD_VERBOSITY: "3" + # CIBW_ENVIRONMENT: > + # MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}" + # DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" + # CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" + # CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CXXFLAGS" + # LDFLAGS="-L/usr/local/lib $LDFLAGS" + # PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" + # CIBW_REPAIR_WHEEL_COMMAND: > + # delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + # CIBW_TEST_COMMAND: | + # pip install {package}[test] + # if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then + # pytest --parallel-threads=10 --iterations=10 {project}/tests + # else + # pytest -s {project}/tests + # fi + # CIBW_TEST_EXTRAS: "test" + # run: | + # python -m cibuildwheel --output-dir wheelhouse + # working-directory: ./quaddtype + + # - uses: actions/upload-artifact@v4 + # with: + # path: ./quaddtype/wheelhouse/*.whl + # name: wheels-${{ matrix.os }} + + # # disabling QBLAS optimization for windows due to incompatibility with MSVC + # build_wheels_windows: + # name: Build wheels on Windows + # runs-on: windows-latest + # strategy: + # matrix: + # architecture: [x64] + + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - name: Setup MSVC + # uses: ilammy/msvc-dev-cmd@v1 + # with: + # arch: ${{ matrix.architecture }} + + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: ">=3.11.0" + # architecture: ${{ matrix.architecture }} + + # - name: Install CMake + # uses: lukka/get-cmake@latest + + # - name: Verify QuadBLAS submodule + # shell: pwsh + # run: | + # Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/ + # Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ + + # - name: Clone and Build SLEEF + # shell: pwsh + # run: | + # git clone --branch 3.8 https://github.com/shibatch/sleef.git + # cd sleef + # cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture == 'x86' && 'Win32' || 'x64' }} -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON + # cmake --build build --config Release + # cmake --install build --prefix "C:/sleef" --config Release + + # - name: Install build dependencies + # shell: bash -l {0} + # run: | + # pip install -U pip + # pip install cibuildwheel==3.1.4 ninja meson meson-python numpy delvewheel pytest + + # - name: Build wheels + # env: + # CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" + # CIBW_ENABLE: cpython-prerelease cpython-freethreading + # CIBW_SKIP: "pp* cp36-* cp37-* cp38-* cp39-*" + # CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }} + # CIBW_BUILD_VERBOSITY: "3" + # DISTUTILS_USE_SDK: "1" + # MSSdk: "1" + # CIBW_BEFORE_BUILD: | + # pip install meson meson-python ninja numpy + # CIBW_ENVIRONMENT: > + # INCLUDE="C:/sleef/include;{project}/numpy_quaddtype/QBLAS/include;$INCLUDE" + # LIB="C:/sleef/lib;$LIB" + # PATH="C:/sleef/bin;$PATH" + # CFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CFLAGS" + # CXXFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CXXFLAGS" + # LDFLAGS="C:/sleef/lib/sleef.lib C:/sleef/lib/sleefquad.lib $LDFLAGS" + # CIBW_REPAIR_WHEEL_COMMAND: 'delvewheel repair -w {dest_dir} {wheel} --add-path C:\sleef\bin' + # CIBW_TEST_COMMAND: | + # pip install {package}[test] + # if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then + # pytest --parallel-threads=10 --iterations=10 {project}/tests + # else + # pytest -s {project}/tests + # fi + # CIBW_TEST_EXTRAS: test + # CIBW_TEST_FAIL_FAST: 1 + # shell: pwsh + # run: | + # python -m cibuildwheel --output-dir wheelhouse + # if (-not (Test-Path wheelhouse/*.whl)) { throw "Wheel was not created" } + # working-directory: ./quaddtype + + # - uses: actions/upload-artifact@v4 + # with: + # path: ./quaddtype/wheelhouse/*.whl + # name: wheels-windows-${{ matrix.architecture }} + + build_sdist: + name: Build SDist runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -34,239 +265,36 @@ jobs: ls -la quaddtype/numpy_quaddtype/QBLAS/ ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ - - name: Install cibuildwheel - run: pip install cibuildwheel==3.1.4 - - - name: Build wheels - env: - CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp313t-manylinux_x86_64 cp314-manylinux_x86_64 cp314t-manylinux_x86_64" - CIBW_ENABLE: cpython-prerelease cpython-freethreading - CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 - CIBW_BUILD_VERBOSITY: "3" - CIBW_BEFORE_ALL: | - yum update -y - yum install -y cmake gcc gcc-c++ make git pkgconfig - # Install SLEEF in container - 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 - cmake --install build --prefix /usr/local - CIBW_ENVIRONMENT: > - CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" - CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include -fext-numeric-literals $CXXFLAGS" - LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -Wl,-rpath,/usr/local/lib -fopenmp $LDFLAGS" - 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" - CIBW_REPAIR_WHEEL_COMMAND: | - auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel} - CIBW_TEST_COMMAND: | - pip install {package}[test] - if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then - pytest --parallel-threads=10 --iterations=10 {project}/tests - else - pytest -s {project}/tests - fi - CIBW_TEST_EXTRAS: "test" - run: | - python -m cibuildwheel --output-dir wheelhouse - working-directory: ./quaddtype - - - uses: actions/upload-artifact@v4 - with: - path: ./quaddtype/wheelhouse/*.whl - name: wheels-linux - - build_wheels_macos: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-13, macos-14] - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ">=3.11.0" - - - name: Install dependencies + - name: Install system dependencies run: | - brew install cmake libomp git + sudo apt-get update -y + sudo apt-get install -y cmake gcc g++ make git pkg-config - name: Install SLEEF - env: - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} 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 \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} \ - -DCMAKE_INSTALL_RPATH="@loader_path/../lib" \ - -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + -DCMAKE_POSITION_INDEPENDENT_CODE=ON cmake --build build/ --clean-first -j sudo cmake --install build --prefix /usr/local - - name: Verify QuadBLAS submodule - run: | - ls -la quaddtype/numpy_quaddtype/QBLAS/ - ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ - - - name: Installing Python dependencies - run: | - pip install -U pip - pip install cibuildwheel==3.1.4 - pip install pytest-run-parallel - - - name: Build wheels - env: - CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" - CIBW_ENABLE: cpython-prerelease cpython-freethreading - CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }} - CIBW_BUILD_VERBOSITY: "3" - CIBW_ENVIRONMENT: > - MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}" - DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" - CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" - CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CXXFLAGS" - LDFLAGS="-L/usr/local/lib $LDFLAGS" - PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" - CIBW_REPAIR_WHEEL_COMMAND: > - delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} - CIBW_TEST_COMMAND: | - pip install {package}[test] - if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then - pytest --parallel-threads=10 --iterations=10 {project}/tests - else - pytest -s {project}/tests - fi - CIBW_TEST_EXTRAS: "test" - run: | - python -m cibuildwheel --output-dir wheelhouse - working-directory: ./quaddtype - - - uses: actions/upload-artifact@v4 - with: - path: ./quaddtype/wheelhouse/*.whl - name: wheels-${{ matrix.os }} - - # disabling QBLAS optimization for windows due to incompatibility with MSVC - build_wheels_windows: - name: Build wheels on Windows - runs-on: windows-latest - strategy: - matrix: - architecture: [x64] - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.architecture }} - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ">=3.11.0" - architecture: ${{ matrix.architecture }} - - - name: Install CMake - uses: lukka/get-cmake@latest - - - name: Verify QuadBLAS submodule - shell: pwsh - run: | - Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/ - Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ - - - name: Clone and Build SLEEF - shell: pwsh - run: | - git clone --branch 3.8 https://github.com/shibatch/sleef.git - cd sleef - cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture == 'x86' && 'Win32' || 'x64' }} -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON - cmake --build build --config Release - cmake --install build --prefix "C:/sleef" --config Release - - - name: Install build dependencies - shell: bash -l {0} - run: | - pip install -U pip - pip install cibuildwheel==3.1.4 ninja meson meson-python numpy delvewheel pytest - - - name: Build wheels - env: - CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" - CIBW_ENABLE: cpython-prerelease cpython-freethreading - CIBW_SKIP: "pp* cp36-* cp37-* cp38-* cp39-*" - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }} - CIBW_BUILD_VERBOSITY: "3" - DISTUTILS_USE_SDK: "1" - MSSdk: "1" - CIBW_BEFORE_BUILD: | - pip install meson meson-python ninja numpy - CIBW_ENVIRONMENT: > - INCLUDE="C:/sleef/include;{project}/numpy_quaddtype/QBLAS/include;$INCLUDE" - LIB="C:/sleef/lib;$LIB" - PATH="C:/sleef/bin;$PATH" - CFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CFLAGS" - CXXFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CXXFLAGS" - LDFLAGS="C:/sleef/lib/sleef.lib C:/sleef/lib/sleefquad.lib $LDFLAGS" - CIBW_REPAIR_WHEEL_COMMAND: 'delvewheel repair -w {dest_dir} {wheel} --add-path C:\sleef\bin' - CIBW_TEST_COMMAND: | - pip install {package}[test] - if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then - pytest --parallel-threads=10 --iterations=10 {project}/tests - else - pytest -s {project}/tests - fi - CIBW_TEST_EXTRAS: test - CIBW_TEST_FAIL_FAST: 1 - shell: pwsh - run: | - python -m cibuildwheel --output-dir wheelhouse - if (-not (Test-Path wheelhouse/*.whl)) { throw "Wheel was not created" } - working-directory: ./quaddtype - - - uses: actions/upload-artifact@v4 - with: - path: ./quaddtype/wheelhouse/*.whl - name: wheels-windows-${{ matrix.architecture }} - - build_sdist: - name: Build SDist - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ">=3.11.0" - - name: Install build dependencies run: | python -m pip install --upgrade pip python -m pip install build - name: Build SDist - run: python -m build --sdist --outdir dist/ + 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 @@ -275,32 +303,32 @@ jobs: name: sdist path: ./quaddtype/dist/*.tar.gz - publish_to_pypi: - name: Publish to PyPI - needs: - [ - build_wheels_linux, - build_wheels_macos, - build_wheels_windows, - build_sdist, - ] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/quaddtype-v') - - environment: - name: quadtype_release - url: https://pypi.org/p/numpy-quaddtype - - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - - steps: - - 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 + # publish_to_pypi: + # name: Publish to PyPI + # needs: + # [ + # build_wheels_linux, + # build_wheels_macos, + # build_wheels_windows, + # build_sdist, + # ] + # runs-on: ubuntu-latest + # if: startsWith(github.ref, 'refs/tags/quaddtype-v') + + # environment: + # name: quadtype_release + # url: https://pypi.org/p/numpy-quaddtype + + # permissions: + # id-token: write # IMPORTANT: mandatory for trusted publishing + + # steps: + # - 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 From 7424ccaf4db2349b1762db7a5a5f194cc73c5656 Mon Sep 17 00:00:00 2001 From: swayaminsync Date: Wed, 27 Aug 2025 21:33:00 +0530 Subject: [PATCH 4/4] looks good --- .github/workflows/build_wheels.yml | 518 ++++++++++++++--------------- 1 file changed, 259 insertions(+), 259 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 7180ad6..a8b9d22 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -16,236 +16,236 @@ on: workflow_dispatch: jobs: - # build_wheels_linux: - # name: Build wheels on Linux - # 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 cibuildwheel - # run: pip install cibuildwheel==3.1.4 - - # - name: Build wheels - # env: - # CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp313t-manylinux_x86_64 cp314-manylinux_x86_64 cp314t-manylinux_x86_64" - # CIBW_ENABLE: cpython-prerelease cpython-freethreading - # CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 - # CIBW_BUILD_VERBOSITY: "3" - # CIBW_BEFORE_ALL: | - # yum update -y - # yum install -y cmake gcc gcc-c++ make git pkgconfig - # # Install SLEEF in container - # 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 - # cmake --install build --prefix /usr/local - # CIBW_ENVIRONMENT: > - # CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" - # CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include -fext-numeric-literals $CXXFLAGS" - # LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -Wl,-rpath,/usr/local/lib -fopenmp $LDFLAGS" - # 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" - # CIBW_REPAIR_WHEEL_COMMAND: | - # auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel} - # CIBW_TEST_COMMAND: | - # pip install {package}[test] - # if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then - # pytest --parallel-threads=10 --iterations=10 {project}/tests - # else - # pytest -s {project}/tests - # fi - # CIBW_TEST_EXTRAS: "test" - # run: | - # python -m cibuildwheel --output-dir wheelhouse - # working-directory: ./quaddtype - - # - uses: actions/upload-artifact@v4 - # with: - # path: ./quaddtype/wheelhouse/*.whl - # name: wheels-linux - - # build_wheels_macos: - # name: Build wheels on ${{ matrix.os }} - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # os: [macos-13, macos-14] - - # steps: - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: ">=3.11.0" - - # - name: Install dependencies - # run: | - # brew install cmake libomp git - - # - name: Install SLEEF - # env: - # MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} - # 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 \ - # -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} \ - # -DCMAKE_INSTALL_RPATH="@loader_path/../lib" \ - # -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON - # cmake --build build/ --clean-first -j - # sudo cmake --install build --prefix /usr/local - - # - name: Verify QuadBLAS submodule - # run: | - # ls -la quaddtype/numpy_quaddtype/QBLAS/ - # ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ - - # - name: Installing Python dependencies - # run: | - # pip install -U pip - # pip install cibuildwheel==3.1.4 - # pip install pytest-run-parallel - - # - name: Build wheels - # env: - # CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" - # CIBW_ENABLE: cpython-prerelease cpython-freethreading - # CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }} - # CIBW_BUILD_VERBOSITY: "3" - # CIBW_ENVIRONMENT: > - # MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}" - # DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" - # CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" - # CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CXXFLAGS" - # LDFLAGS="-L/usr/local/lib $LDFLAGS" - # PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" - # CIBW_REPAIR_WHEEL_COMMAND: > - # delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} - # CIBW_TEST_COMMAND: | - # pip install {package}[test] - # if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then - # pytest --parallel-threads=10 --iterations=10 {project}/tests - # else - # pytest -s {project}/tests - # fi - # CIBW_TEST_EXTRAS: "test" - # run: | - # python -m cibuildwheel --output-dir wheelhouse - # working-directory: ./quaddtype - - # - uses: actions/upload-artifact@v4 - # with: - # path: ./quaddtype/wheelhouse/*.whl - # name: wheels-${{ matrix.os }} - - # # disabling QBLAS optimization for windows due to incompatibility with MSVC - # build_wheels_windows: - # name: Build wheels on Windows - # runs-on: windows-latest - # strategy: - # matrix: - # architecture: [x64] - - # steps: - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - - # - name: Setup MSVC - # uses: ilammy/msvc-dev-cmd@v1 - # with: - # arch: ${{ matrix.architecture }} - - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: ">=3.11.0" - # architecture: ${{ matrix.architecture }} - - # - name: Install CMake - # uses: lukka/get-cmake@latest - - # - name: Verify QuadBLAS submodule - # shell: pwsh - # run: | - # Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/ - # Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ - - # - name: Clone and Build SLEEF - # shell: pwsh - # run: | - # git clone --branch 3.8 https://github.com/shibatch/sleef.git - # cd sleef - # cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture == 'x86' && 'Win32' || 'x64' }} -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON - # cmake --build build --config Release - # cmake --install build --prefix "C:/sleef" --config Release - - # - name: Install build dependencies - # shell: bash -l {0} - # run: | - # pip install -U pip - # pip install cibuildwheel==3.1.4 ninja meson meson-python numpy delvewheel pytest - - # - name: Build wheels - # env: - # CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" - # CIBW_ENABLE: cpython-prerelease cpython-freethreading - # CIBW_SKIP: "pp* cp36-* cp37-* cp38-* cp39-*" - # CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }} - # CIBW_BUILD_VERBOSITY: "3" - # DISTUTILS_USE_SDK: "1" - # MSSdk: "1" - # CIBW_BEFORE_BUILD: | - # pip install meson meson-python ninja numpy - # CIBW_ENVIRONMENT: > - # INCLUDE="C:/sleef/include;{project}/numpy_quaddtype/QBLAS/include;$INCLUDE" - # LIB="C:/sleef/lib;$LIB" - # PATH="C:/sleef/bin;$PATH" - # CFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CFLAGS" - # CXXFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CXXFLAGS" - # LDFLAGS="C:/sleef/lib/sleef.lib C:/sleef/lib/sleefquad.lib $LDFLAGS" - # CIBW_REPAIR_WHEEL_COMMAND: 'delvewheel repair -w {dest_dir} {wheel} --add-path C:\sleef\bin' - # CIBW_TEST_COMMAND: | - # pip install {package}[test] - # if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then - # pytest --parallel-threads=10 --iterations=10 {project}/tests - # else - # pytest -s {project}/tests - # fi - # CIBW_TEST_EXTRAS: test - # CIBW_TEST_FAIL_FAST: 1 - # shell: pwsh - # run: | - # python -m cibuildwheel --output-dir wheelhouse - # if (-not (Test-Path wheelhouse/*.whl)) { throw "Wheel was not created" } - # working-directory: ./quaddtype - - # - uses: actions/upload-artifact@v4 - # with: - # path: ./quaddtype/wheelhouse/*.whl - # name: wheels-windows-${{ matrix.architecture }} + build_wheels_linux: + name: Build wheels on Linux + 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 cibuildwheel + run: pip install cibuildwheel==3.1.4 + + - name: Build wheels + env: + CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp313t-manylinux_x86_64 cp314-manylinux_x86_64 cp314t-manylinux_x86_64" + CIBW_ENABLE: cpython-prerelease cpython-freethreading + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_BUILD_VERBOSITY: "3" + CIBW_BEFORE_ALL: | + yum update -y + yum install -y cmake gcc gcc-c++ make git pkgconfig + # Install SLEEF in container + 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 + cmake --install build --prefix /usr/local + CIBW_ENVIRONMENT: > + CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" + CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include -fext-numeric-literals $CXXFLAGS" + LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib -Wl,-rpath,/usr/local/lib64 -Wl,-rpath,/usr/local/lib -fopenmp $LDFLAGS" + 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" + CIBW_REPAIR_WHEEL_COMMAND: | + auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel} + CIBW_TEST_COMMAND: | + pip install {package}[test] + if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then + pytest --parallel-threads=10 --iterations=10 {project}/tests + else + pytest -s {project}/tests + fi + CIBW_TEST_EXTRAS: "test" + run: | + python -m cibuildwheel --output-dir wheelhouse + working-directory: ./quaddtype + + - uses: actions/upload-artifact@v4 + with: + path: ./quaddtype/wheelhouse/*.whl + name: wheels-linux + + build_wheels_macos: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-13, macos-14] + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ">=3.11.0" + + - name: Install dependencies + run: | + brew install cmake libomp git + + - name: Install SLEEF + env: + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} + 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 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-13' && '13.0' || '14.0' }} \ + -DCMAKE_INSTALL_RPATH="@loader_path/../lib" \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + cmake --build build/ --clean-first -j + sudo cmake --install build --prefix /usr/local + + - name: Verify QuadBLAS submodule + run: | + ls -la quaddtype/numpy_quaddtype/QBLAS/ + ls -la quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ + + - name: Installing Python dependencies + run: | + pip install -U pip + pip install cibuildwheel==3.1.4 + pip install pytest-run-parallel + + - name: Build wheels + env: + CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" + CIBW_ENABLE: cpython-prerelease cpython-freethreading + CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }} + CIBW_BUILD_VERBOSITY: "3" + CIBW_ENVIRONMENT: > + MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}" + DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" + CFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CFLAGS" + CXXFLAGS="-I/usr/local/include -I{project}/numpy_quaddtype/QBLAS/include $CXXFLAGS" + LDFLAGS="-L/usr/local/lib $LDFLAGS" + PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" + CIBW_REPAIR_WHEEL_COMMAND: > + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + CIBW_TEST_COMMAND: | + pip install {package}[test] + if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then + pytest --parallel-threads=10 --iterations=10 {project}/tests + else + pytest -s {project}/tests + fi + CIBW_TEST_EXTRAS: "test" + run: | + python -m cibuildwheel --output-dir wheelhouse + working-directory: ./quaddtype + + - uses: actions/upload-artifact@v4 + with: + path: ./quaddtype/wheelhouse/*.whl + name: wheels-${{ matrix.os }} + + # disabling QBLAS optimization for windows due to incompatibility with MSVC + build_wheels_windows: + name: Build wheels on Windows + runs-on: windows-latest + strategy: + matrix: + architecture: [x64] + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup MSVC + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.architecture }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ">=3.11.0" + architecture: ${{ matrix.architecture }} + + - name: Install CMake + uses: lukka/get-cmake@latest + + - name: Verify QuadBLAS submodule + shell: pwsh + run: | + Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/ + Get-ChildItem quaddtype/numpy_quaddtype/QBLAS/include/quadblas/ + + - name: Clone and Build SLEEF + shell: pwsh + run: | + git clone --branch 3.8 https://github.com/shibatch/sleef.git + cd sleef + cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture == 'x86' && 'Win32' || 'x64' }} -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON + cmake --build build --config Release + cmake --install build --prefix "C:/sleef" --config Release + + - name: Install build dependencies + shell: bash -l {0} + run: | + pip install -U pip + pip install cibuildwheel==3.1.4 ninja meson meson-python numpy delvewheel pytest + + - name: Build wheels + env: + CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" + CIBW_ENABLE: cpython-prerelease cpython-freethreading + CIBW_SKIP: "pp* cp36-* cp37-* cp38-* cp39-*" + CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }} + CIBW_BUILD_VERBOSITY: "3" + DISTUTILS_USE_SDK: "1" + MSSdk: "1" + CIBW_BEFORE_BUILD: | + pip install meson meson-python ninja numpy + CIBW_ENVIRONMENT: > + INCLUDE="C:/sleef/include;{project}/numpy_quaddtype/QBLAS/include;$INCLUDE" + LIB="C:/sleef/lib;$LIB" + PATH="C:/sleef/bin;$PATH" + CFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CFLAGS" + CXXFLAGS="/IC:/sleef/include /I{project}/numpy_quaddtype/QBLAS/include /DDISABLE_QUADBLAS $CXXFLAGS" + LDFLAGS="C:/sleef/lib/sleef.lib C:/sleef/lib/sleefquad.lib $LDFLAGS" + CIBW_REPAIR_WHEEL_COMMAND: 'delvewheel repair -w {dest_dir} {wheel} --add-path C:\sleef\bin' + CIBW_TEST_COMMAND: | + pip install {package}[test] + if python -c "import sys; exit(0 if hasattr(sys, '_is_gil_enabled') and not sys._is_gil_enabled() else 1)"; then + pytest --parallel-threads=10 --iterations=10 {project}/tests + else + pytest -s {project}/tests + fi + CIBW_TEST_EXTRAS: test + CIBW_TEST_FAIL_FAST: 1 + shell: pwsh + run: | + python -m cibuildwheel --output-dir wheelhouse + if (-not (Test-Path wheelhouse/*.whl)) { throw "Wheel was not created" } + working-directory: ./quaddtype + + - uses: actions/upload-artifact@v4 + with: + path: ./quaddtype/wheelhouse/*.whl + name: wheels-windows-${{ matrix.architecture }} build_sdist: name: Build SDist @@ -303,32 +303,32 @@ jobs: name: sdist path: ./quaddtype/dist/*.tar.gz - # publish_to_pypi: - # name: Publish to PyPI - # needs: - # [ - # build_wheels_linux, - # build_wheels_macos, - # build_wheels_windows, - # build_sdist, - # ] - # runs-on: ubuntu-latest - # if: startsWith(github.ref, 'refs/tags/quaddtype-v') - - # environment: - # name: quadtype_release - # url: https://pypi.org/p/numpy-quaddtype - - # permissions: - # id-token: write # IMPORTANT: mandatory for trusted publishing - - # steps: - # - 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 + publish_to_pypi: + name: Publish to PyPI + needs: + [ + build_wheels_linux, + build_wheels_macos, + build_wheels_windows, + build_sdist, + ] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/quaddtype-v') + + environment: + name: quadtype_release + url: https://pypi.org/p/numpy-quaddtype + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - 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