Skip to content

Release 1.0.0

Release 1.0.0 #15

Workflow file for this run

# Workflow to build and test wheels
name: Cuda Wheel builder
on:
push:
branches: [ "main" ]
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# Build the wheels for Linux, and macOS for Python 3.9 and newer
build_cuda_wheels:
name: Build wheel for cp${{ matrix.python }}-${{ matrix.package.name }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
runs-on: ${{ matrix.os }}
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
os: [ubuntu-22.04]
platform_id: [manylinux_x86_64]
manylinux_image: [manylinux_2_28]
python: [39, 310, 311, 312, 313]
package: [
{
name: "bipp-cuda12x",
desc: "Bluebild imaging algorithm for radio astronomy build with CUDA 12.x",
cuda_arch: "60;61;70;75;80;86;89;90",
cuda_url: "https://developer.download.nvidia.com/compute/cuda/12.8.1/local_installers/cuda_12.8.1_570.124.06_linux.run"
}
]
steps:
- name: Checkout bipp
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Maximize build space
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
- name: Build and test wheels
env:
CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease }}
CIBW_ENVIRONMENT: >
BIPP_PACKAGE_NAME="${{ matrix.package.name }}"
BIPP_PACKAGE_DESC="${{ matrix.package.desc }}"
BIPP_GPU=CUDA
CUDACXX=/usr/local/cuda/bin/nvcc
CUDAARCHS="${{ matrix.package.cuda_arch }}"
BIPP_CIBW_WHEEL_BUILD=1
LD_LIBRARY_PATH="/root/cufinufft/lib:$LD_LIBRARY_PATH"
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS: all
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
CIBW_REPAIR_WHEEL_COMMAND: auditwheel repair -w {dest_dir} {wheel} --exclude libcuda.so.1 $(.github/build_tools/repair_exclude_cuda.sh)
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL_LINUX: >
cd ${HOME} &&
yum install -y openblas-openmp fftw-devel wget hdf5-devel &&
wget --quiet -O cuda_install.run ${{ matrix.package.cuda_url }} &&
chmod +x cuda_install.run &&
./cuda_install.run --silent --override --toolkit &&
bash {project}/.github/build_tools/install_neonufft_cuda.sh
run: |
bash .github/build_tools/build_wheels.sh
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package.name }}-cibw-wheels-cp${{ matrix.python }}-${{ matrix.platform_id }}
path: wheelhouse/*.whl
# Upload cuda 12x wheels
pypi-publish-12x:
name: Upload bipp-cuda12x release to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
runs-on: ubuntu-latest
environment:
name: pypi
needs: [build_cuda_wheels]
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: bipp-cuda12x-cibw*
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
# Upload cuda 11x wheels
# pypi-publish-11x:
# name: Upload bipp-cuda11x release to PyPI
# if: github.event_name == 'release' && github.event.action == 'created'
# runs-on: ubuntu-latest
# environment:
# name: pypi
# needs: [build_cuda_wheels]
# permissions:
# id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# pattern: bipp-cuda11x-cibw*
# path: dist
# merge-multiple: true
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# print-hash: true