Skip to content

Commit

Permalink
Test upgrade scikit-build-core to 0.9.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Jun 18, 2024
1 parent 08f6b54 commit f76632b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 322 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/apply-clang-format.yml

This file was deleted.

165 changes: 0 additions & 165 deletions .github/workflows/build-test-cxx-cuda.yml

This file was deleted.

118 changes: 4 additions & 114 deletions .github/workflows/build-test-package-python-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push,pull_request]

env:
itk-wheel-tag: 'v5.4.0'
itk-python-package-tag: '26495c927f31ea20616efe2b2bad05e9275ea3a5'
itk-python-package-tag: '11ece15e4932554656aa3d96cf812d4540b1ea50'
itk-python-package-org: 'SimonRit'
itk-module-deps: "RTKConsortium/ITKCudaCommon@v1.1.0"

Expand All @@ -14,9 +14,9 @@ jobs:
strategy:
max-parallel: 2
matrix:
python3-minor-version: ["8","9","10","11"]
manylinux-platform: ["_2_28-x64","2014-x64"]
cuda-version: ["116","121"]
python3-minor-version: ["8"]
manylinux-platform: ["_2_28-x64"]
cuda-version: ["121"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -97,113 +97,3 @@ jobs:
with:
name: LinuxWheel3${{ matrix.python3-minor-version }}${{ matrix.manylinux-platform }}-cuda${{ matrix.cuda-version }}
path: dist/*.whl

build-windows-cuda-python-packages:
runs-on: self-hosted-windows
strategy:
max-parallel: 2
matrix:
python3-minor-version: ["8","9","10","11"]
cuda-version: ["116","121"]

steps:
- uses: actions/checkout@v4
with:
path: "im"

- name: 'Reduce source path length'
shell: bash
run: |
# Move ITKPythonBuilds archive to the checked-out source
if test -f ../../im/ITKPythonBuilds-windows.zip; then
mv ../../im/*.zip im
fi
rm -fr ../../im
# Move checked-out source to a shorter path to avoid Windows path length issues
mv im ../../
- name: 'Fetch build script'
shell: pwsh
run: |
cd ../../im
$ITKPYTHONPACKAGE_TAG = "${{ env.itk-python-package-tag }}"
$ITKPYTHONPACKAGE_ORG = "${{ env.itk-python-package-org }}"
$SCRIPT_UPSTREAM = "https://raw.githubusercontent.com/$ITKPYTHONPACKAGE_ORG/ITKPythonPackage/$ITKPYTHONPACKAGE_TAG/scripts/windows-download-cache-and-build-module-wheels.ps1"
echo "Fetching $SCRIPT_UPSTREAM"
(new-object net.webclient).DownloadString($SCRIPT_UPSTREAM) > windows-download-cache-and-build-module-wheels.ps1
- name: 'Build 🐍 Python 📦 package'
shell: pwsh
run: |
if (Test-Path dist) { rm dist -r -fo }
cd ../../im
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64 -SkipAutomaticLocation
$env:CC="cl.exe"
$env:CXX="cl.exe"
$env:ITK_PACKAGE_VERSION = "${{ env.itk-wheel-tag }}"
$env:ITKPYTHONPACKAGE_TAG = "${{ env.itk-python-package-tag }}"
$env:ITKPYTHONPACKAGE_ORG = "${{ env.itk-python-package-org }}"
$env:ITK_MODULE_PREQ = "${{ env.itk-module-deps }}"
$CUDA_VERSION = "${{ matrix.cuda-version }}"
$CUDA_VERSION_MAJOR=$CUDA_VERSION.substring(0,2)
$CUDA_VERSION_MINOR=$CUDA_VERSION.substring(2,$CUDA_VERSION.Length-2)
$env:CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}"
$env:CUDACXX = "$env:CUDA_PATH\bin\nvcc.exe"
$env:Path = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}\bin;" + $env:Path
$LIBCUDART= (Get-Item "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}\bin\cudart64*dll" ).Name
$LIBCUBLAS= (Get-Item "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}\bin\cublas64*dll" ).Name
$LIBCUBLASLT= (Get-Item "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}\bin\cublasLt64*dll" ).Name
$LIBCUFFT= (Get-Item "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}\bin\cufft64*dll" ).Name
((Get-Content -Path pyproject.toml) -replace "itk-rtk","itk-rtk-cuda${CUDA_VERSION}") | Set-Content -Path pyproject.toml
((Get-Content -Path pyproject.toml) -replace "dependencies = \[","dependencies = [""itk-cudacommon-cuda${CUDA_VERSION} == 1.1.*"",") | Set-Content -Path pyproject.toml
./windows-download-cache-and-build-module-wheels.ps1 "${{ matrix.python3-minor-version }}" -setup_options "--lib-paths ""C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}/bin"" --exclude-libs ""nvcuda.dll;concrt140.dll;${LIBCUDART};${LIBCUBLAS};${LIBCUBLASLT};${LIBCUFFT}""" -cmake_options """-DRTK_CUDA_VERSION=${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}"" ""-DRTK_BUILD_APPLICATIONS:BOOL=OFF"""
mkdir -p '${{ github.workspace }}\dist'
cp 'dist\*.whl' '${{ github.workspace }}\dist'
- name: Validate build output
shell: pwsh
run: |
python -m pip install twine
ls dist/
$WHEEL_PATTERN = "dist/itk_*cp3${{ matrix.python3-minor-version }}*win*.whl"
echo "Searching for wheels matching pattern ${WHEEL_PATTERN}"
python -m twine check ${WHEEL_PATTERN}
- name: Publish Python package as GitHub Artifact
uses: actions/upload-artifact@v4
with:
name: WindowsWheel3${{ matrix.python3-minor-version }}-cuda${{ matrix.cuda-version }}
path: dist/*.whl

publish-python-packages-to-pypi:
needs:
- build-linux-cuda-python-packages
- build-windows-cuda-python-packages
runs-on: ubuntu-22.04

steps:
- name: Download Python Packages
uses: actions/download-artifact@v4

- name: Prepare packages for upload
run: |
ls -R
for d in */; do
mv ${d}/*.whl .
done
mkdir dist
mv *.whl dist/
ls dist
- name: Publish 🐍 Python 📦 package to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
skip_existing: true
user: __token__
password: ${{ secrets.pypi_password }}
16 changes: 0 additions & 16 deletions .github/workflows/build-test-package.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/clang-format-linter.yml

This file was deleted.

0 comments on commit f76632b

Please sign in to comment.