Skip to content

Commit

Permalink
COMP: Upgrade GitHub actions for building wheels against ITK v5.4rc02
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Feb 22, 2024
1 parent 6ddf14b commit 6959606
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-cxx-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push,pull_request]

env:
itk-git-tag: "v5.4rc01"
itk-module-deps: "CudaCommon@v1.0.1"
itk-module-deps: "CudaCommon@09a964504bf9be9403189502cb7e790085a62708"

jobs:
build-test-cxx:
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/build-test-package-python-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on: [push,pull_request]

env:
cmake-options: '-DRTK_BUILD_APPLICATIONS:BOOL=OFF -DRTK_CUDA_VERSION=11.6'
itk-wheel-tag: 'v5.4rc01'
itk-python-package-tag: '5ad02309321621cdc7269b9b68a35013c912271c'
itk-wheel-tag: 'v5.4rc02'
itk-python-package-tag: '8b047b05ee19c01a1744af2b3ee36f7c893ee01e'
itk-python-package-org: 'InsightSoftwareConsortium'
itk-module-deps: "RTKConsortium/ITKCudaCommon@b4f15f28fe7547f43de543b229d1a962df828e7f"
itk-module-deps: "RTKConsortium/ITKCudaCommon@09a964504bf9be9403189502cb7e790085a62708"

jobs:
build-linux-cuda-python-packages:
runs-on: self-hosted-linux
strategy:
max-parallel: 2
matrix:
python3-minor-versions: ["7", "8", "9", "10", "11"]
python3-minor-version: ["8", "9", "10", "11"]
manylinux-platform: ["_2_28-x64","2014-x64"]

steps:
Expand All @@ -32,25 +32,33 @@ jobs:
shell: bash
run: |
rm -rf dist
export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }}
export ITKPYTHONPACKAGE_TAG=${{ env.itk-python-package-tag }}
export ITKPYTHONPACKAGE_ORG=${{ env.itk-python-package-org }}
export ITK_MODULE_PREQ=${{ env.itk-module-deps }}
CMAKE_OPTIONS=(--cmake_options "${{ env.cmake-options }} -DCUDAToolkit_ROOT=/usr/lib64/cuda116 -DCMAKE_CUDA_COMPILER=/usr/lib64/cuda116/bin/nvcc")
export LD_LIBRARY_PATH="/home/srit/Downloads/cuda116:/home/srit/Downloads/cuda116/targets/x86_64-linux/lib:/home/srit/Downloads/cuda116/lib64/stubs"
# The first two are not library paths but are included to be mounted in the
# docker by dockcross-manylinux-build-module-wheels.sh
export LD_LIBRARY_PATH="/home/srit/Downloads/cuda116"
export LD_LIBRARY_PATH="/usr/lib64/libcuda.so.1:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/home/srit/Downloads/cuda116/targets/x86_64-linux/lib::$LD_LIBRARY_PATH"
if test -e ../../ITKPythonBuilds-linux-manylinux2014.tar.zst ; then
mv ../../*zst .
fi
MANYLINUX_PLATFORM=${{ matrix.manylinux-platform }}
if [[ ${MANYLINUX_PLATFORM} == "_2_28-x64" ]]; then
export IMAGE_TAG=20230106-1aeaea0
fi
echo "Manylinux platform ${MANYLINUX_PLATFORM}"
rm -rf ITKPythonPackage
export MANYLINUX_VERSION=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 1)`
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" cp3${{ matrix.python3-minor-versions }}
./dockcross-manylinux-download-cache-and-build-module-wheels.sh "${CMAKE_OPTIONS[@]}" -x "libcuda.so.1;libcudart.so.11.0;libcublas.so.11;libcublasLt.so.11;libcufft.so.10" cp3${{ matrix.python3-minor-version }}
mv *zst ../..
- name: Validate build output
Expand All @@ -73,15 +81,15 @@ jobs:
- name: Publish Python package as GitHub Artifact
uses: actions/upload-artifact@v3
with:
name: LinuxWheel3${{ matrix.python3-minor-versions }}-cuda116
name: LinuxWheel3${{ matrix.python3-minor-version }}-cuda116
path: dist/*.whl

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

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ on: [push,pull_request]

jobs:
cxx-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.0
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@2e36f0f73527ac1ac6cebe57248bae9ac2702be0

python-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.0
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@2e36f0f73527ac1ac6cebe57248bae9ac2702be0
with:
manylinux-platforms: '["_2_28-x64","2014-x64"]'
cmake-options: '-DRTK_BUILD_APPLICATIONS:BOOL=OFF'
itk-wheel-tag: 'v5.4rc02'
itk-python-package-tag: '8b047b05ee19c01a1744af2b3ee36f7c893ee01e'
itk-module-deps: "RTKConsortium/ITKCudaCommon@09a964504bf9be9403189502cb7e790085a62708"
manylinux-platforms: '["_2_28-x64","2014-x64"]'
secrets:
pypi_password: ${{ secrets.pypi_password }}

env:
IMAGE_TAG: '20230106-1aeaea0'

0 comments on commit 6959606

Please sign in to comment.