From 4b362ac6b3cd46efa564b10b0291ffa62a2cec5f Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Sat, 16 Sep 2023 09:32:01 +0200 Subject: [PATCH] ENH: Upgrade CI to ITK v5.4rc01 --- .github/workflows/build-test-cxx-cuda.yml | 2 +- .../build-test-package-python-cuda.yml | 45 +++++++++++++++---- setup.py | 2 +- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-test-cxx-cuda.yml b/.github/workflows/build-test-cxx-cuda.yml index a5180aa..5592395 100644 --- a/.github/workflows/build-test-cxx-cuda.yml +++ b/.github/workflows/build-test-cxx-cuda.yml @@ -3,7 +3,7 @@ name: 'Build, Test ITKCudaCommon with CUDA' on: [push,pull_request] env: - itk-git-tag: "v5.3.0" + itk-git-tag: "v5.4rc01" jobs: build-test-cxx: diff --git a/.github/workflows/build-test-package-python-cuda.yml b/.github/workflows/build-test-package-python-cuda.yml index 9625b28..12292b9 100644 --- a/.github/workflows/build-test-package-python-cuda.yml +++ b/.github/workflows/build-test-package-python-cuda.yml @@ -4,8 +4,8 @@ on: [push,pull_request] env: cmake-options: '-DCUDACOMMON_CUDA_VERSION=11.6' - itk-wheel-tag: 'v5.3.0' - itk-python-package-tag: 'dc6a18600233ac69a8f42b7489e4edf6a5d8883a' + itk-wheel-tag: 'v5.4rc01' + itk-python-package-tag: '5ad02309321621cdc7269b9b68a35013c912271c' itk-python-package-org: 'InsightSoftwareConsortium' jobs: @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: ["37", "38", "39", "310", "311"] + python3-minor-versions: ["7", "8", "9", "10", "11"] manylinux-platform: ["_2_28-x64","2014-x64"] steps: @@ -48,13 +48,31 @@ jobs: export TARGET_ARCH=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 2)` export ITK_MODULE_NO_CLEANUP=TRUE echo "Building for manylinux specialization ${MANYLINUX_VERSION} and target architecture ${TARGET_ARCH}" - ./dockcross-manylinux-download-cache-and-build-module-wheels.sh "${CMAKE_OPTIONS[@]}" -x "libcuda.so;libcuda.so.1;libcudart.so;libcudart.so.11.0;libcublas.so;libcublas.so.11;libcublasLt.so;libcublasLt.so.11;libcufft.so;libcufft.so.10" cp${{ matrix.python-version }} + + ./dockcross-manylinux-download-cache-and-build-module-wheels.sh "${CMAKE_OPTIONS[@]}" -x "libcuda.so;libcuda.so.1;libcudart.so;libcudart.so.11.0;libcublas.so;libcublas.so.11;libcublasLt.so;libcublasLt.so.11;libcufft.so;libcufft.so.10" cp3${{ matrix.python3-minor-versions }} mv *zst ../.. + - name: Validate build output + shell: bash + run: | + /home/srit/miniconda3/envs/py310/bin/python -m pip install twine + ls dist/ + + MANYLINUX_PLATFORM=${{ matrix.manylinux-platform }} + MANYLINUX_VERSION=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 1)` + TARGET_ARCH_NAME=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 2)` + if [[ ${TARGET_ARCH_NAME} == "x64" ]]; then + TARGET_ARCH_NAME="x86_64" # Match auditwheel naming convention + fi + WHEEL_PATTERN="dist/itk_*cp3${{ matrix.python3-minor-version }}*manylinux${MANYLINUX_VERSION}*${TARGET_ARCH_NAME}.whl" + + echo "Searching for wheels matching pattern ${WHEEL_PATTERN}" + /home/srit/miniconda3/envs/py310/bin/python -m twine check ${WHEEL_PATTERN} + - name: Publish Python package as GitHub Artifact uses: actions/upload-artifact@v3 with: - name: LinuxWheel${{ matrix.python-version }}-cuda116 + name: LinuxWheel3${{ matrix.python3-minor-versions }}-cuda116 path: dist/*.whl build-windows-cuda-python-packages: @@ -62,7 +80,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version-minor: ["7", "8", "9", "10", "11"] + python3-minor-version: ["7", "8", "9", "10", "11"] steps: - uses: actions/checkout@v3 @@ -104,15 +122,26 @@ jobs: $env:ITKPYTHONPACKAGE_TAG = "${{ env.itk-python-package-tag }}" $env:ITKPYTHONPACKAGE_ORG = "${{ env.itk-python-package-org }}" $env:ITK_MODULE_PREQ = "${{ env.itk-module-deps }}" - ./windows-download-cache-and-build-module-wheels.ps1 "${{ matrix.python-version-minor }}" -setup_options "--lib-paths ""C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.6/bin"" --exclude-libs ""nvcuda.dll;cudart64_110.dll""" -cmake_options "${{ env.cmake-options }}" + ./windows-download-cache-and-build-module-wheels.ps1 "${{ matrix.python3-minor-version }}" -setup_options "--lib-paths ""C:/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.6/bin"" --exclude-libs ""nvcuda.dll;cudart64_110.dll""" -cmake_options "${{ env.cmake-options }}" 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@v3 with: - name: WindowsWheel3.${{ matrix.python-version-minor }}-cuda116 + name: WindowsWheel3${{ matrix.python3-minor-version }}-cuda116 path: dist/*.whl publish-python-packages-to-pypi: diff --git a/setup.py b/setup.py index c894a85..d935e87 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,6 @@ license='Apache', url=r'https://github.com/RTKConsortium/ITKCudaCommon', install_requires=[ - r'itk>=5.3rc04' + r'itk>=5.4rc1' ] )