Skip to content

Commit 2ba604c

Browse files
authored
Merge pull request InsightSoftwareConsortium#5961 from hjmjohnson/ci-memory-and-parallelism
ENH: Set CI memory size and parallelism to match runner resources
2 parents 2a1ebd4 + 3d8ae8b commit 2ba604c

9 files changed

Lines changed: 27 additions & 11 deletions

.github/workflows/arm.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,42 @@ jobs:
4747
cmake-build-type: "Release"
4848
cmake-generator: "Ninja"
4949
python-version: ""
50+
parallel-level: 4
5051
ctest-cache: |
5152
BUILD_SHARED_LIBS:BOOL=OFF
5253
BUILD_EXAMPLES:BOOL=OFF
5354
ITK_WRAP_PYTHON:BOOL=OFF
5455
ITK_USE_CLANG_FORMAT:BOOL=OFF
56+
ITK_COMPUTER_MEMORY_SIZE:STRING=11
5557
ctest-options: ""
5658

5759
- os: macos-15
5860
name: "x86_64-rosetta"
5961
cmake-build-type: "Release"
6062
cmake-generator: "Ninja"
6163
python-version: ""
64+
parallel-level: 3
6265
ctest-cache: |
6366
BUILD_SHARED_LIBS:BOOL=OFF
6467
BUILD_EXAMPLES:BOOL=OFF
6568
ITK_WRAP_PYTHON:BOOL=OFF
6669
ITK_USE_CLANG_FORMAT:BOOL=OFF
6770
CMAKE_OSX_ARCHITECTURES:STRING=x86_64
71+
ITK_COMPUTER_MEMORY_SIZE:STRING=11
6872
ctest-options: ""
6973

7074
- os: macos-15
7175
name: "Python"
7276
cmake-build-type: "Release"
7377
cmake-generator: "Ninja"
7478
python-version: "3.11"
79+
parallel-level: 3
7580
ctest-cache: |
7681
BUILD_SHARED_LIBS:BOOL=OFF
7782
BUILD_EXAMPLES:BOOL=OFF
7883
ITK_WRAP_PYTHON:BOOL=ON
7984
ITK_USE_CLANG_FORMAT:BOOL=OFF
85+
ITK_COMPUTER_MEMORY_SIZE:STRING=11
8086
ctest-options: "-E itkPyBufferMemoryLeakTest"
8187

8288
name: ARMBUILD-${{ matrix.name }}
@@ -168,7 +174,7 @@ jobs:
168174
c++ --version
169175
cmake --version
170176
171-
ctest -S ${{ github.workspace }}/ITK-dashboard/dashboard.cmake -VV -j 4 ${{ matrix.ctest-options }}
177+
ctest -S ${{ github.workspace }}/ITK-dashboard/dashboard.cmake -VV -j ${{ matrix.parallel-level }} ${{ matrix.ctest-options }}
172178
env:
173179
CTEST_OUTPUT_ON_FAILURE: 1
174180
- name: Save compiler cache

Testing/ContinuousIntegration/AzurePipelinesBatch.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
ITK_USE_CCACHE:BOOL=ON
9393
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
9494
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
95+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
9596
")
9697
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
9798
EOF
@@ -102,7 +103,7 @@ jobs:
102103
- script: |
103104
cmake --version
104105
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
105-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
106+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2
106107
displayName: 'Build and test'
107108
env:
108109
CTEST_OUTPUT_ON_FAILURE: 1

Testing/ContinuousIntegration/AzurePipelinesLinux.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
ITK_USE_CCACHE:BOOL=ON
9797
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
9898
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
99+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
99100
")
100101
set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space
101102
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
@@ -110,7 +111,7 @@ jobs:
110111
c++ --version
111112
cmake --version
112113
113-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
114+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2
114115
displayName: 'Build and test'
115116
env:
116117
CTEST_OUTPUT_ON_FAILURE: 1
@@ -186,6 +187,7 @@ jobs:
186187
ITK_WRAP_PYTHON:BOOL=OFF
187188
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
188189
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
190+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
189191
")
190192
set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space
191193
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
@@ -200,7 +202,7 @@ jobs:
200202
c++ --version
201203
cmake --version
202204
203-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
205+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2
204206
displayName: 'Build and test'
205207
env:
206208
CTEST_OUTPUT_ON_FAILURE: 1
@@ -277,6 +279,7 @@ jobs:
277279
ITK_WRAP_PYTHON:BOOL=OFF
278280
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
279281
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
282+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
280283
")
281284
set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space
282285
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
@@ -288,7 +291,7 @@ jobs:
288291
set -x
289292
c++ --version
290293
cmake --version
291-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
294+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2
292295
displayName: "Build and test"
293296
env:
294297
CTEST_OUTPUT_ON_FAILURE: 1

Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
ITK_USE_CCACHE:BOOL=ON
105105
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
106106
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
107+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
107108
")
108109
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
109110
EOF
@@ -117,7 +118,7 @@ jobs:
117118
c++ --version
118119
cmake --version
119120
120-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4 -L Python -E "(PythonExtrasTest)|(PythonFastMarching)|(PythonLazyLoadingImage)|(PythonThresholdSegmentationLevelSetWhiteMatterTest)|(PythonVerifyTTypeAPIConsistency)|(PythonWatershedSegmentation1Test)"
121+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2 -L Python -E "(PythonExtrasTest)|(PythonFastMarching)|(PythonLazyLoadingImage)|(PythonThresholdSegmentationLevelSetWhiteMatterTest)|(PythonVerifyTTypeAPIConsistency)|(PythonWatershedSegmentation1Test)"
121122
displayName: 'Build and test'
122123
env:
123124
CTEST_OUTPUT_ON_FAILURE: 1

Testing/ContinuousIntegration/AzurePipelinesMacOS.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
ITK_USE_CCACHE:BOOL=ON
9797
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
9898
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
99+
ITK_COMPUTER_MEMORY_SIZE:STRING=11
99100
")
100101
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
101102
EOF
@@ -109,7 +110,7 @@ jobs:
109110
c++ --version
110111
cmake --version
111112
112-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
113+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 3
113114
displayName: 'Build and test'
114115
env:
115116
CTEST_OUTPUT_ON_FAILURE: 1

Testing/ContinuousIntegration/AzurePipelinesMacOSPython.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
ITK_USE_CCACHE:BOOL=ON
106106
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
107107
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
108+
ITK_COMPUTER_MEMORY_SIZE:STRING=11
108109
")
109110
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
110111
EOF
@@ -118,7 +119,7 @@ jobs:
118119
c++ --version
119120
cmake --version
120121
121-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
122+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 3
122123
displayName: 'Build and test'
123124
env:
124125
CTEST_OUTPUT_ON_FAILURE: 1

Testing/ContinuousIntegration/AzurePipelinesWindows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
ITK_USE_CCACHE:BOOL=ON
9494
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
9595
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
96+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
9697
")
9798
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
9899
EOF
@@ -103,7 +104,7 @@ jobs:
103104
- script: |
104105
cmake --version
105106
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
106-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4
107+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2
107108
displayName: 'Build and test'
108109
env:
109110
CTEST_OUTPUT_ON_FAILURE: 1

Testing/ContinuousIntegration/AzurePipelinesWindowsPython.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ jobs:
103103
ITK_USE_CCACHE:BOOL=ON
104104
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
105105
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
106+
ITK_COMPUTER_MEMORY_SIZE:STRING=4.5
106107
")
107108
include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake)
108109
EOF
@@ -113,7 +114,7 @@ jobs:
113114
- script: |
114115
cmake --version
115116
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
116-
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 4 -L Python
117+
ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -VV -j 2 -L Python
117118
displayName: 'Build and test'
118119
env:
119120
CTEST_OUTPUT_ON_FAILURE: 1

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ cmd = '''cmake
5151
-DBUILD_TESTING:BOOL=ON
5252
-DITK_USE_CCACHE:BOOL=ON
5353
-DCMAKE_C_COMPILER_LAUNCHER:STRING=ccache
54-
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache'''
54+
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
55+
-DITK_COMPUTER_MEMORY_SIZE:STRING=11'''
5556
description = "Configure ITK for CI (with ccache compiler launcher)"
5657
outputs = ["build/CMakeFiles/"]
5758

0 commit comments

Comments
 (0)