diff --git a/.github/workflows/big_endian.yml b/.github/workflows/big_endian.yml deleted file mode 100644 index 2460cd17..00000000 --- a/.github/workflows/big_endian.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: Big-Endian Architecture Tests - -on: - pull_request: - branches: - - main - paths: - - "quaddtype/**" - - ".github/workflows/**" - workflow_dispatch: - -defaults: - run: - shell: bash - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - big_endian_tests: - runs-on: ubuntu-24.04 - continue-on-error: true - strategy: - fail-fast: false - matrix: - BUILD_PROP: - - [ - "s390x (IBM Z Big Endian)", - "s390x-linux-gnu", - "s390x/ubuntu:24.04", - "s390x", - ] - - [ - "s390x - baseline(Z13)", - "s390x-linux-gnu", - "s390x/ubuntu:24.04", - "s390x", - ] - env: - ARCH_NAME: ${{ matrix.BUILD_PROP[0] }} - TOOLCHAIN_NAME: ${{ matrix.BUILD_PROP[1] }} - DOCKER_CONTAINER: ${{ matrix.BUILD_PROP[2] }} - ARCH: ${{ matrix.BUILD_PROP[3] }} - TERM: xterm-256color - - name: "${{ matrix.BUILD_PROP[0] }}" - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - fetch-tags: true - persist-credentials: false - - - name: Initialize binfmt_misc for qemu-user-static - run: | - # Enable QEMU user-mode emulation for cross-architecture execution - docker run --rm --privileged tonistiigi/binfmt:qemu-v9.2.2-52 --install all - - - name: Install cross-compilation toolchain - run: | - sudo apt update - sudo apt install -y ninja-build gcc-${TOOLCHAIN_NAME} g++-${TOOLCHAIN_NAME} gfortran-${TOOLCHAIN_NAME} - - - name: Cache docker container - uses: actions/cache@v5 - id: container-cache - with: - path: ~/docker_${{ matrix.BUILD_PROP[1] }} - key: container-quaddtype-${{ runner.os }}-${{ matrix.BUILD_PROP[1] }}-${{ matrix.BUILD_PROP[2] }}-${{ hashFiles('quaddtype/pyproject.toml') }} - - - name: Create cross-compilation container - if: steps.container-cache.outputs.cache-hit != 'true' - run: | - docker run --platform=linux/${ARCH} --name quaddtype_container --interactive \ - -v /:/host -v $(pwd):/workspace ${DOCKER_CONTAINER} /bin/bash -c " - # Update package manager and install essential tools - apt update && - apt install -y cmake git python3 python-is-python3 python3-dev python3-pip build-essential && - - # Create necessary symlinks for cross-compilation - mkdir -p /lib64 && ln -sf /host/lib64/ld-* /lib64/ || true && - ln -sf /host/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu || true && - - # Link cross-compilation toolchain from host - rm -rf /usr/${TOOLCHAIN_NAME} && ln -sf /host/usr/${TOOLCHAIN_NAME} /usr/${TOOLCHAIN_NAME} && - rm -rf /usr/lib/gcc/${TOOLCHAIN_NAME} && ln -sf /host/usr/lib/gcc-cross/${TOOLCHAIN_NAME} /usr/lib/gcc/${TOOLCHAIN_NAME} && - - # Set up compiler symlinks - rm -f /usr/bin/gcc && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-gcc /usr/bin/gcc && - rm -f /usr/bin/g++ && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-g++ /usr/bin/g++ && - rm -f /usr/bin/gfortran && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-gfortran /usr/bin/gfortran && - - # Set up binutils - rm -f /usr/bin/ar && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-ar /usr/bin/ar && - rm -f /usr/bin/as && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-as /usr/bin/as && - rm -f /usr/bin/ld && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-ld /usr/bin/ld && - rm -f /usr/bin/ld.bfd && ln -sf /host/usr/bin/${TOOLCHAIN_NAME}-ld.bfd /usr/bin/ld.bfd && - - # Link build tools - rm -f /usr/bin/ninja && ln -sf /host/usr/bin/ninja /usr/bin/ninja && - rm -f /usr/local/bin/ninja && mkdir -p /usr/local/bin && ln -sf /host/usr/bin/ninja /usr/local/bin/ninja && - - # Configure git for workspace access - git config --global --add safe.directory /workspace && - - # Install Python build dependencies (using --break-system-packages for Ubuntu 24.04) - python -m pip install --break-system-packages meson>=1.3.2 meson-python wheel ninja cython && - echo \"Building NumPy from source (main branch)...\" && - python -m pip install --break-system-packages git+https://github.com/numpy/numpy.git@main && - python -c \"import numpy; print('NumPy version:', numpy.__version__)\" && - python -m pip install --break-system-packages pytest pytest-run-parallel pytest-timeout && - - # Install system dependencies for quaddtype (SLEEF dependencies) - apt install -y libssl-dev libfftw3-dev pkg-config - " - docker commit quaddtype_container quaddtype_container - mkdir -p "~/docker_${TOOLCHAIN_NAME}" - docker save -o "~/docker_${TOOLCHAIN_NAME}/quaddtype_container.tar" quaddtype_container - - - name: Load container from cache - if: steps.container-cache.outputs.cache-hit == 'true' - run: docker load -i "~/docker_${TOOLCHAIN_NAME}/quaddtype_container.tar" - - - name: Build quaddtype with cross-compilation and testing - run: | - docker run --rm --platform=linux/${ARCH} -e "TERM=xterm-256color" \ - -v $(pwd):/workspace -v /:/host quaddtype_container \ - /bin/script -e -q -c "/bin/bash --noprofile --norc -eo pipefail -c ' - cd /workspace/quaddtype && - echo \"Building quaddtype for ${ARCH_NAME}...\" && - - # Set OpenMP linking for cross-compilation - export LDFLAGS=\"-fopenmp\" && - - # Install quaddtype without dependencies (NumPy already installed from source) - python -m pip install --break-system-packages --no-deps . -v --no-build-isolation --force-reinstall && - - # Install test dependencies separately - python -m pip install --break-system-packages pytest pytest-run-parallel pytest-timeout mpmath && - - cd .. - python -m pytest -vvv --color=yes --timeout=600 --tb=short quaddtype/tests/ - '" diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml deleted file mode 100644 index 80d803db..00000000 --- a/.github/workflows/build_docs.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build Docs - -on: - push: - branches: - - main - workflow_dispatch: # Make sure this job can be triggered manually - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - steps: - - uses: actions/checkout@v6 - - uses: actions/configure-pages@v5 - - uses: actions/setup-python@v6 - with: - python-version: '3.13' - - name: Install dependencies - run: | - cd quaddtype/ - python -m pip install --upgrade pip - python -m pip install "numpy @ git+https://github.com/numpy/numpy.git" pytest meson meson-python - - name: Build quaddtype package - run: | - cd quaddtype/ - python -m pip install . -v - - name: Build Sphinx documentation - run: | - cd quaddtype/ - python -m pip install ."[docs]" - cd docs/ - sphinx-build -b html . _build/html/quaddtype - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 - with: - path: './quaddtype/docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml deleted file mode 100644 index 53928a29..00000000 --- a/.github/workflows/build_wheels.yml +++ /dev/null @@ -1,244 +0,0 @@ -name: Build Wheels - -on: - push: - branches: - - main - tags: - - "quaddtype-v*" - paths: - - "quaddtype/**" - - ".github/workflows/**" - pull_request: - paths: - - "quaddtype/**" - - ".github/workflows/**" - workflow_dispatch: - -jobs: - build_wheels_linux: - name: Build wheels on Linux - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: ">=3.11.0" - - - name: Install cibuildwheel - run: pip install cibuildwheel==3.1.4 - - - name: Build wheels - env: - CIBW_BUILD: "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 - CIBW_ENVIRONMENT: > - LDFLAGS="-fopenmp" - CIBW_REPAIR_WHEEL_COMMAND: | - auditwheel repair -w {dest_dir} --plat manylinux_2_28_x86_64 {wheel} - CIBW_TEST_COMMAND: | - pip install numpy - pip install --no-deps {wheel} - pip install pytest pytest-run-parallel - 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@v6 - 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-14, macos-15, macos-15-intel] - - steps: - - uses: actions/checkout@v6 - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: ">=3.11.0" - - - name: Install dependencies - run: | - packages="cmake libomp git" - echo "Remove preinstalled dependencies" - for pkg in $packages; do - brew uninstall --ignore-dependencies $pkg 2>/dev/null || true - done - brew cleanup - brew install $packages - - - 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: "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-14' && '14.0' || '15.0' }}" - CIBW_REPAIR_WHEEL_COMMAND: > - delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} - CIBW_TEST_COMMAND: | - pip install numpy - pip install --no-deps {wheel} - pip install pytest pytest-run-parallel - 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@v6 - 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@v6 - - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.architecture }} - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: ">=3.11.0" - architecture: ${{ matrix.architecture }} - - - name: Install CMake - uses: lukka/get-cmake@latest - - - 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: "cp311-* cp312-* cp313-* cp314-* cp313t-* cp314t-*" - CIBW_ENABLE: cpython-prerelease cpython-freethreading - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture == 'x86' && 'x86' || 'AMD64' }} - CIBW_BUILD_VERBOSITY: "3" - DISTUTILS_USE_SDK: "1" - MSSdk: "1" - CIBW_ENVIRONMENT: > - CFLAGS="/DDISABLE_QUADBLAS $CFLAGS" - CXXFLAGS="/DDISABLE_QUADBLAS $CXXFLAGS" - CIBW_REPAIR_WHEEL_COMMAND: 'delvewheel repair -w {dest_dir} {wheel} --add-path C:\sleef\bin' - CIBW_TEST_COMMAND_WINDOWS: pip install numpy && pip install --no-deps {wheel} && pip install pytest pytest-run-parallel && pytest -s {project}/tests - CIBW_TEST_EXTRAS: test - 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@v6 - with: - path: ./quaddtype/wheelhouse/*.whl - name: wheels-windows-${{ matrix.architecture }} - - build_sdist: - name: Build SDist - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: ">=3.11.0" - - - name: Install system dependencies - run: | - sudo apt-get update -y - sudo apt-get install -y cmake gcc g++ make git pkg-config - - - name: Install build dependencies - run: | - python -m pip install --upgrade pip build - - - name: Build SDist & test sdist - env: - LDFLAGS: "-fopenmp" - run: | - python -m build --sdist --outdir dist/ - pip install "$(ls dist/*.tar.gz)"[test] -v - pytest -s tests - working-directory: ./quaddtype - - - name: Upload SDist artifact - uses: actions/upload-artifact@v6 - 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, - 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@v7 - with: - pattern: "*" - path: dist - merge-multiple: true - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b745ad13..00eb712e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,21 +56,7 @@ jobs: working-directory: unytdtype run: | pytest -vvv --color=yes - - name: Install quaddtype dependencies - run: | - sudo apt-get update - sudo apt-get install -y libmpfr-dev libssl-dev libfftw3-dev - - - name: Install quaddtype - working-directory: quaddtype - run: | - export LDFLAGS="-fopenmp" - python -m pip install .[test] -v --no-build-isolation - - - name: Run quaddtype tests - working-directory: quaddtype - run: | - pytest -vvv --color=yes + # NOTE: quaddtype has moved to https://github.com/numpy/numpy-quaddtype - name: Install stringdtype working-directory: stringdtype run: | diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml deleted file mode 100644 index c2be0cf5..00000000 --- a/.github/workflows/typecheck.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Validate static types in quaddtype -permissions: read-all - -on: - pull_request: - paths: - - .github/workflows/typecheck.yml - - quaddtype/src/numpy_quaddtype/** - - quaddtype/meson.build - - quaddtype/pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - typecheck_quaddtype: - runs-on: ubuntu-latest - timeout-minutes: 2 - - steps: - - uses: actions/checkout@v6 - - - uses: astral-sh/setup-uv@v7.2.0 - with: - activate-environment: true - python-version: "3.12" - - - name: install - working-directory: quaddtype - run: | - uv pip install mypy pyright . - - - name: pyright - working-directory: quaddtype - run: pyright - - - name: pyright --verifytypes - working-directory: quaddtype - run: pyright --ignoreexternal --verifytypes numpy_quaddtype - - - name: mypy - working-directory: quaddtype - run: mypy --no-incremental --cache-dir=/dev/null . - - - name: stubtest - working-directory: quaddtype - run: stubtest --mypy-config-file pyproject.toml numpy_quaddtype diff --git a/quaddtype/README.md b/quaddtype/README.md index aa2884d5..cf24b251 100644 --- a/quaddtype/README.md +++ b/quaddtype/README.md @@ -1,5 +1,8 @@ # NumPy-QuadDType +> [!IMPORTANT] +> **This project has moved!** Development has been relocated to a dedicated repository at [numpy/numpy-quaddtype](https://github.com/numpy/numpy-quaddtype). Please visit the new repository for the latest updates, issues, and contributions. + [![PyPI](https://img.shields.io/pypi/v/numpy-quaddtype.svg)](https://pypi.org/project/numpy-quaddtype/) [![PyPI Downloads](https://static.pepy.tech/badge/numpy-quaddtype/month)](https://pepy.tech/project/numpy-quaddtype) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/numpy_quaddtype.svg?label=Conda%20downloads)](https://anaconda.org/conda-forge/numpy_quaddtype)