Skip to content

Commit

Permalink
BUG: Building tests fails on github workflow machines (#153)
Browse files Browse the repository at this point in the history
* ENH: Revert to standard cmake settings

* ENH: Force module build to use shared libs

* BUG: Use Python3_EXECUTABLE instead of PYTHON_EXECUTABLE

* ENH: Also build static libs

* ENH: Build static libs for itk and module

* ENH: Force shared libs only

* ENH: Enable Shared in itk-module

* ENH: Test module required for development, not just testing

* ENH: ITKTest module is a top-level and test-level dependency

* ENH: testing

* ENH: Bump setup.py to 5.4rc2
  • Loading branch information
aylward authored Jan 12, 2024
1 parent 0b68ed1 commit 454586b
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 30 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ jobs:
cxx-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@3f63de316255a285b0cac4c819d3d45649738999
with:
itk-cmake-options: '-DBUILD_STATIC_LIBS:BOOL=ON'
itk-module-deps: 'MinimalPathExtraction@35dd8e83b7df2059876e6835a5741eb3d45973bf'

python-build-workflow:
Expand Down
6 changes: 5 additions & 1 deletion itk-module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ set( DOCUMENTATION
"TubeTK provides methods for extracting, registering, and quantifying the shape of tubular structures (e.g., vessels, nerves, bones, roads) in 2D and 3D images (e.g., from MRI, CT, ultrasound, or satelite imaging).")

itk_module( TubeTK
ENABLE_SHARED
DEPENDS
ITKCommon
ITKFFT
Expand All @@ -35,8 +36,9 @@ itk_module( TubeTK
ITKSmoothing
ITKStatistics
ITKSpatialObjects
ITKTransform
ITKThresholding
ITKTransform
ITKTestKernel
MinimalPathExtraction
COMPILE_DEPENDS
ITKAnisotropicSmoothing
Expand All @@ -55,6 +57,8 @@ itk_module( TubeTK
ITKPDEDeformableRegistration
ITKRegistrationCommon
ITKTestKernel
TEST_DEPENDS
ITKTestKernel
DESCRIPTION
"${DOCUMENTATION}"
EXCLUDE_FROM_DEFAULT
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
install_requires=[
r'numpy',
r'itk>=5.3.0',
r'itk>=5.4rc2',
r'itk-minimalpathextraction>=1.2.6'
]
)
6 changes: 0 additions & 6 deletions test/CompareTools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ CreateTestDriver( tubeCompareImages
"${TubeTK-Test_LIBRARIES}"
CompareImages.cxx )

add_dependencies( tubeCompareImagesTestDriver
${TubeTK_LIBRARIES} )

CreateTestDriver( tubeCompareTextFiles
"${TubeTK-Test_LIBRARIES}"
CompareTextFiles.cxx )

add_dependencies( tubeCompareTextFilesTestDriver
${TubeTK_LIBRARIES} )
6 changes: 3 additions & 3 deletions test/Filtering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#
##############################################################################

if( PYTHON_EXECUTABLE )
itk_add_test( PrintSelf-TubeTKFiltering ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
itk_add_test( PrintSelf-TubeTKFiltering ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/src/Filtering )
endif( PYTHON_EXECUTABLE )
endif( Python3_EXECUTABLE )

CreateTestDriver( tubeFilteringHeader
"${TubeTK-Test_LIBRARIES}"
Expand Down
6 changes: 3 additions & 3 deletions test/IO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#
##############################################################################

if( PYTHON_EXECUTABLE )
itk_add_test( PrintSelf-TubeTKIO ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
itk_add_test( PrintSelf-TubeTKIO ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/src/IO )
endif( PYTHON_EXECUTABLE )
endif( Python3_EXECUTABLE )

CreateTestDriver( tubeIOHeader
"${TubeTK-Test_LIBRARIES}"
Expand Down
6 changes: 3 additions & 3 deletions test/MetaIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#
##############################################################################

if( PYTHON_EXECUTABLE )
itk_add_test( PrintSelf-MetaIO ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
itk_add_test( PrintSelf-MetaIO ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/src/MetaIO )
endif( PYTHON_EXECUTABLE )
endif( Python3_EXECUTABLE )

CreateTestDriver( tubeMetaIOHeader
"${TubeTK-Test_LIBRARIES}"
Expand Down
6 changes: 3 additions & 3 deletions test/Numerics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#
##############################################################################

if( PYTHON_EXECUTABLE )
add_test( PrintSelf-Numerics ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
add_test( PrintSelf-Numerics ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/TubeTKLib/Numerics )
endif()
endif( Python3_EXECUTABLE )

set( tubeNumericsTests_SRCS
tubeNumericsPrintTest.cxx
Expand Down
6 changes: 3 additions & 3 deletions test/ObjectDocuments/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#
##############################################################################

if( PYTHON_EXECUTABLE )
itk_add_test( PrintSelf-ObjectDocuments ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
itk_add_test( PrintSelf-ObjectDocuments ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/src/ObjectDocuments )
endif( PYTHON_EXECUTABLE )
endif( Python3_EXECUTABLE )

set( tubeObjectDocumentsTests_SRCS
tubeObjectDocumentsPrintTest.cxx )
Expand Down
6 changes: 3 additions & 3 deletions test/Registration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#
##############################################################################

if( PYTHON_EXECUTABLE )
itk_add_test( PrintSelf-Registration ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
itk_add_test( PrintSelf-Registration ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/src/Registration )
endif( PYTHON_EXECUTABLE )
endif( Python3_EXECUTABLE )

CreateTestDriver( tubeRegistrationHeader
"${TubeTK-Test_LIBRARIES}"
Expand Down
6 changes: 3 additions & 3 deletions test/Segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
##############################################################################

find_package( Python )
if( PYTHON_EXECUTABLE )
itk_add_test( PrintSelf-TubeTKSegmentation ${PYTHON_EXECUTABLE}
if( Python3_EXECUTABLE )
itk_add_test( PrintSelf-TubeTKSegmentation ${Python3_EXECUTABLE}
${TubeTK_SOURCE_DIR}/CMake/PrintSelfCheck.py
${TubeTK_SOURCE_DIR}/src/Segmentation )
endif()
endif( Python3_EXECUTABLE )

CreateTestDriver( tubeSegmentationHeader
"${TubeTK-Test_LIBRARIES}"
Expand Down

0 comments on commit 454586b

Please sign in to comment.