From 3cb9ea41958f8a4a9eec921e4f050c2fde30d633 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 27 Mar 2025 06:53:52 -0700 Subject: [PATCH 1/2] All triggering full CI if MR label containts all-tests --- ci/test.windows.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/test.windows.gitlab-ci.yml b/ci/test.windows.gitlab-ci.yml index a7a66fa81..f107d4f49 100644 --- a/ci/test.windows.gitlab-ci.yml +++ b/ci/test.windows.gitlab-ci.yml @@ -10,7 +10,7 @@ - if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen" - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_NAMESPACE == "libeigen" && $CI_MERGE_REQUEST_LABELS =~ "/all-tests/" - tags: + tags: - eigen-runner - windows - x86-64 @@ -64,7 +64,7 @@ test:windows:x86-64:msvc-14.29:avx2:unsupported: .test:windows:x86-64:msvc-14.29:avx512dq: extends: .test:windows needs: [ build:windows:x86-64:msvc-14.29:avx512dq ] - tags: + tags: - eigen-runner - windows - x86-64 @@ -86,7 +86,7 @@ test:windows:x86-64:msvc-14.29:avx512dq:unsupported: allow_failure: true variables: EIGEN_CI_CTEST_LABEL: gpu - tags: + tags: - eigen-runner - windows - x86-64 @@ -97,12 +97,12 @@ test:windows:x86-64:msvc-14.29:avx512dq:unsupported: # test:windows:x86-64:cuda-9.2:msvc-14.16: # extends: .test:windows:cuda # needs: [ build:windows:x86-64:cuda-9.2:msvc-14.16 ] - + # MSVC 14.29 + CUDA 10.2 test:windows:x86-64:cuda-10.2:msvc-14.29: extends: .test:windows:cuda needs: [ build:windows:x86-64:cuda-10.2:msvc-14.29 ] - + # MSVC 14.29 + CUDA 11.4 test:windows:x86-64:cuda-11.4:msvc-14.29: extends: .test:windows:cuda -- GitLab From 357da477f877e90dc8de0e1c72c4900a5b8d797e Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 28 Mar 2025 21:56:00 -0700 Subject: [PATCH 2/2] Fix cmake warning and default to j0. CTest with `j0` will automatically use threads equal to number of processors (min 2), but also does some stuff related to job server integration: https://cmake.org/cmake/help/latest/manual/ctest.1.html#cmdoption-ctest-j We may as well use their defaults. --- cmake/EigenConfigureTesting.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cmake/EigenConfigureTesting.cmake b/cmake/EigenConfigureTesting.cmake index eecef2386..d72d88a02 100644 --- a/cmake/EigenConfigureTesting.cmake +++ b/cmake/EigenConfigureTesting.cmake @@ -2,7 +2,7 @@ include(EigenTesting) include(CheckCXXSourceCompiles) -# configure the "site" and "buildname" +# configure the "site" and "buildname" ei_set_sitename() # retrieve and store the build string @@ -12,11 +12,7 @@ add_custom_target(buildtests) if (NOT EIGEN_CTEST_ARGS) # By default, run tests in parallel on all available cores. - include(ProcessorCount) - ProcessorCount(NPROC) - if(NOT NPROC EQUAL 0) - set(EIGEN_CTEST_ARGS "" CACHE STRING "-j"${NPROC}) - endif() + set(EIGEN_CTEST_ARGS "" CACHE STRING "-j0") endif() add_custom_target(check COMMAND "ctest" ${EIGEN_CTEST_ARGS}) @@ -24,7 +20,7 @@ add_dependencies(check buildtests) # Convenience target for only building GPU tests. add_custom_target(buildtests_gpu) -add_custom_target(check_gpu COMMAND "ctest" "--output-on-failure" +add_custom_target(check_gpu COMMAND "ctest" "--output-on-failure" "--no-compress-output" "--build-no-clean" "-T" "test" @@ -70,7 +66,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(CTEST_CUSTOM_COVERAGE_EXCLUDE "/test/") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS}") endif() - + elseif(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS") endif() -- GitLab