workflow draft #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build cuFINUFFT wheels | |
# testing only should be commented out in the final version | |
on: [push, pull_request] | |
# this is the release version | |
#on: | |
# push: | |
# tags: | |
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, windows-2019] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
include: | |
- os: ubuntu-22.04 | |
toolchain: gcc-10 | |
arch_flags: "-march=x86-64" # probably -march=x86-64_v2 is safe | |
- os: windows-2019 | |
toolchain: msvc | |
arch_flags: "/arch:SSE2" # Windows11 requires avx2 so this should be fine | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: ${{ matrix.toolchain }} | |
vcvarsall: ${{ contains(matrix.os, 'windows') }} | |
cmake: true | |
ninja: true | |
vcpkg: false | |
cppcheck: false | |
clangtidy: false | |
- name: Install cuda | |
uses: Jimver/[email protected] | |
with: | |
cuda: '11.4.0' | |
use-github-cache: 'false' | |
use-local-cache: 'false' | |
log-file-suffix: '${{ matrix.os }}-${{ matrix.python-version }}' | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Build cufinufft wheels | |
shell: bash | |
run: | | |
python -m pip wheel python/cufinufft/ --wheel-dir=wheelhouse \ | |
-C cmake.define.CMAKE_BUILD_TYPE=Release \ | |
-C cmake.define.FINUFFT_ARCH_FLAGS=${{ matrix.arch_flags }} \ | |
-C cmake.define.FINUFFT_USE_DUCC0=OFF \ | |
-C cmake.define.CMAKE_GENERATOR=Ninja \ | |
-C cmake.define.CMAKE_GENERATOR_PLATFORM= \ | |
-C cmake.define.FINUFFT_CUDA_ARCHITECTURES="50;60;70;80" | |
- name: Delete unnecessary wheels | |
shell: bash | |
run: | | |
rm -f wheelhouse/*numpy*.whl | |
rm -f wheelhouse/*packaging*.whl | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |