summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml78
-rw-r--r--.gitlab/ci/configure_cuda10.2_nvidia.cmake3
-rw-r--r--.gitlab/ci/configure_fedora31_makefiles.cmake2
-rw-r--r--.gitlab/ci/ctest_test_external.cmake7
-rw-r--r--.gitlab/ci/docker/cuda10.2/Dockerfile5
-rwxr-xr-x.gitlab/ci/docker/cuda10.2/install_deps.sh13
-rw-r--r--Tests/CMakeLists.txt4
-rw-r--r--Tests/Cuda/CMakeLists.txt41
-rw-r--r--Tests/CudaOnly/CMakeLists.txt39
-rw-r--r--Tests/RunCMake/CMakeLists.txt10
10 files changed, 149 insertions, 53 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c9f94f0..c4667fa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -80,6 +80,20 @@
CTEST_NO_WARNINGS_ALLOWED: 1
CMAKE_GENERATOR: "Unix Makefiles"
+.cuda10.2: &cuda
+ image: "kitware/cmake:ci-cuda10.2-x86_64-2020-06-11"
+
+ variables:
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
+ CTEST_LABELS: "CUDA"
+
+.cuda10.2_nvidia: &cuda10_2_nvidia
+ extends: .cuda10.2
+
+ variables:
+ CMAKE_CONFIGURATION: cuda10.2_nvidia
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
.macos: &macos
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci ext/$CI_CONCURRENT_ID"
@@ -169,6 +183,12 @@
- linux
- linux-3.17 # Needed to be able to load Fedora's Qt libraries.
+.linux_builder_tags_cuda: &linux_builder_tags_cuda
+ tags:
+ - cuda-rt
+ - docker
+ - linux
+
.macos_builder_tags: &macos_builder_tags
tags:
- cmake # Since this is a bare runner, pin to a project.
@@ -383,6 +403,23 @@
interruptible: true
+.cmake_test_unix_package: &cmake_test_unix_package
+ stage: test-ext
+
+ script:
+ - *before_script_unix
+ # Make the CMake package available.
+ - mkdir -p build/install
+ - tar -C build/install --strip-components=1 -xzf build/cmake-*-Linux-x86_64.tar.gz
+ - .gitlab/ci/sccache.sh
+ # Allow the server to already be running.
+ - "sccache --start-server || :"
+ - sccache --show-stats
+ - "$LAUNCHER build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake"
+ - sccache --show-stats
+
+ interruptible: true
+
.cmake_test_unix_external: &cmake_test_unix_external
stage: test-ext
@@ -439,6 +476,28 @@ build:centos6-release:
- *linux_builder_tags
rules: *manual_rules_settings
+test:fedora31-makefiles:
+ <<:
+ - *fedora31_makefiles
+ - *cmake_test_unix_package
+ - *linux_builder_tags_qt
+ rules: *rules_settings
+ dependencies:
+ - build:centos6-release
+ needs:
+ - build:centos6-release
+
+test:cuda10.2-nvidia:
+ <<:
+ - *cuda10_2_nvidia
+ - *cmake_test_unix_package
+ - *linux_builder_tags_cuda
+ rules: *rules_settings
+ dependencies:
+ - build:centos6-release
+ needs:
+ - build:centos6-release
+
build:fedora31-ninja:
<<:
- *fedora31_ninja
@@ -470,25 +529,6 @@ test:fedora31-ninja-multi:
needs:
- test:fedora31-ninja
-build:fedora31-makefiles:
- <<:
- - *fedora31_makefiles
- - *cmake_build_unix
- - *cmake_build_artifacts
- - *linux_builder_tags_qt
- rules: *manual_rules_settings
-
-test:fedora31-makefiles:
- <<:
- - *fedora31_makefiles
- - *cmake_test_unix
- - *linux_builder_tags_qt
- rules: *rules_settings
- dependencies:
- - build:fedora31-makefiles
- needs:
- - build:fedora31-makefiles
-
build:macos-ninja:
<<:
- *macos_ninja
diff --git a/.gitlab/ci/configure_cuda10.2_nvidia.cmake b/.gitlab/ci/configure_cuda10.2_nvidia.cmake
new file mode 100644
index 0000000..519699b
--- /dev/null
+++ b/.gitlab/ci/configure_cuda10.2_nvidia.cmake
@@ -0,0 +1,3 @@
+set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/configure_fedora31_makefiles.cmake b/.gitlab/ci/configure_fedora31_makefiles.cmake
index 74768b7..20863a2 100644
--- a/.gitlab/ci/configure_fedora31_makefiles.cmake
+++ b/.gitlab/ci/configure_fedora31_makefiles.cmake
@@ -1 +1 @@
-include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora31_common.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/ctest_test_external.cmake b/.gitlab/ci/ctest_test_external.cmake
index 1e61d52..d92b936 100644
--- a/.gitlab/ci/ctest_test_external.cmake
+++ b/.gitlab/ci/ctest_test_external.cmake
@@ -53,10 +53,17 @@ if ("$ENV{CTEST_NO_WARNINGS_ALLOWED}" AND num_warnings GREATER 0)
"Found ${num_warnings} warnings (treating as fatal).")
endif ()
+set(ctest_label_args)
+if (NOT "$ENV{CTEST_LABELS}" STREQUAL "")
+ list(APPEND ctest_label_args
+ INCLUDE_LABEL "$ENV{CTEST_LABELS}")
+endif ()
+
include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake")
ctest_test(
PARALLEL_LEVEL "${nproc}"
RETURN_VALUE test_result
+ ${ctest_label_args}
EXCLUDE "${test_exclusions}")
ctest_submit(PARTS Test)
diff --git a/.gitlab/ci/docker/cuda10.2/Dockerfile b/.gitlab/ci/docker/cuda10.2/Dockerfile
new file mode 100644
index 0000000..e0ea0e7
--- /dev/null
+++ b/.gitlab/ci/docker/cuda10.2/Dockerfile
@@ -0,0 +1,5 @@
+FROM nvidia/cuda:10.2-devel-ubuntu18.04
+MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
+
+COPY install_deps.sh /root/install_deps.sh
+RUN sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/cuda10.2/install_deps.sh b/.gitlab/ci/docker/cuda10.2/install_deps.sh
new file mode 100755
index 0000000..0d57cd3
--- /dev/null
+++ b/.gitlab/ci/docker/cuda10.2/install_deps.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+apt-get update
+
+# Install development tools.
+apt-get install -y \
+ g++ \
+ curl \
+ git
+
+apt-get clean
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index d7e567c..b771ff5 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -450,6 +450,8 @@ if(BUILD_TESTING)
-DCMake_TEST_CUDA:BOOL=${CMake_TEST_CUDA}
)
ADD_TEST_MACRO(ExportImport ExportImport)
+ set_property(TEST ExportImport APPEND
+ PROPERTY LABELS "CUDA")
ADD_TEST_MACRO(Unset Unset)
ADD_TEST_MACRO(PolicyScope PolicyScope)
ADD_TEST_MACRO(EmptyLibrary EmptyLibrary)
@@ -1896,6 +1898,8 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
endif()
set(MSVCRuntimeLibrary_BUILD_OPTIONS -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
ADD_TEST_MACRO(MSVCRuntimeLibrary)
+ set_property(TEST MSVCRuntimeLibrary APPEND
+ PROPERTY LABELS "CUDA")
if(CMAKE_Fortran_COMPILER)
ADD_TEST_MACRO(MSVCRuntimeLibrary.Fortran)
endif()
diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt
index 630cea2..35ceb33 100644
--- a/Tests/Cuda/CMakeLists.txt
+++ b/Tests/Cuda/CMakeLists.txt
@@ -1,30 +1,35 @@
+macro (add_cuda_test_macro name)
+ add_test_macro("${name}" ${ARGN})
+ set_property(TEST "${name}" APPEND
+ PROPERTY LABELS "CUDA")
+endmacro ()
-ADD_TEST_MACRO(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures)
-ADD_TEST_MACRO(Cuda.CXXStandardSetTwice CXXStandardSetTwice)
-ADD_TEST_MACRO(Cuda.ObjectLibrary CudaObjectLibrary)
-ADD_TEST_MACRO(Cuda.MixedStandardLevels1 MixedStandardLevels1)
-ADD_TEST_MACRO(Cuda.MixedStandardLevels2 MixedStandardLevels2)
-ADD_TEST_MACRO(Cuda.MixedStandardLevels3 MixedStandardLevels3)
-ADD_TEST_MACRO(Cuda.MixedStandardLevels4 MixedStandardLevels4)
-ADD_TEST_MACRO(Cuda.MixedStandardLevels5 MixedStandardLevels5)
-ADD_TEST_MACRO(Cuda.NotEnabled CudaNotEnabled)
-ADD_TEST_MACRO(Cuda.SeparableCompCXXOnly SeparableCompCXXOnly)
-ADD_TEST_MACRO(Cuda.Toolkit Toolkit)
-ADD_TEST_MACRO(Cuda.IncludePathNoToolkit IncludePathNoToolkit)
-ADD_TEST_MACRO(Cuda.SharedRuntimePlusToolkit SharedRuntimePlusToolkit)
+add_cuda_test_macro(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures)
+add_cuda_test_macro(Cuda.CXXStandardSetTwice CXXStandardSetTwice)
+add_cuda_test_macro(Cuda.ObjectLibrary CudaObjectLibrary)
+add_cuda_test_macro(Cuda.MixedStandardLevels1 MixedStandardLevels1)
+add_cuda_test_macro(Cuda.MixedStandardLevels2 MixedStandardLevels2)
+add_cuda_test_macro(Cuda.MixedStandardLevels3 MixedStandardLevels3)
+add_cuda_test_macro(Cuda.MixedStandardLevels4 MixedStandardLevels4)
+add_cuda_test_macro(Cuda.MixedStandardLevels5 MixedStandardLevels5)
+add_cuda_test_macro(Cuda.NotEnabled CudaNotEnabled)
+add_cuda_test_macro(Cuda.SeparableCompCXXOnly SeparableCompCXXOnly)
+add_cuda_test_macro(Cuda.Toolkit Toolkit)
+add_cuda_test_macro(Cuda.IncludePathNoToolkit IncludePathNoToolkit)
+add_cuda_test_macro(Cuda.SharedRuntimePlusToolkit SharedRuntimePlusToolkit)
# Separable compilation is currently only supported on NVCC. Disable tests
# using it for other compilers.
if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
- ADD_TEST_MACRO(Cuda.Complex CudaComplex)
- ADD_TEST_MACRO(Cuda.ProperDeviceLibraries ProperDeviceLibraries)
- ADD_TEST_MACRO(Cuda.ProperLinkFlags ProperLinkFlags)
+ add_cuda_test_macro(Cuda.Complex CudaComplex)
+ add_cuda_test_macro(Cuda.ProperDeviceLibraries ProperDeviceLibraries)
+ add_cuda_test_macro(Cuda.ProperLinkFlags ProperLinkFlags)
endif()
# The CUDA only ships the shared version of the toolkit libraries
# on windows
if(NOT WIN32)
- ADD_TEST_MACRO(Cuda.StaticRuntimePlusToolkit StaticRuntimePlusToolkit)
+ add_cuda_test_macro(Cuda.StaticRuntimePlusToolkit StaticRuntimePlusToolkit)
endif()
-ADD_TEST_MACRO(Cuda.WithC CudaWithC)
+add_cuda_test_macro(Cuda.WithC CudaWithC)
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index 8244b91..7376a73 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -1,21 +1,26 @@
+macro (add_cuda_test_macro name)
+ add_test_macro("${name}" ${ARGN})
+ set_property(TEST "${name}" APPEND
+ PROPERTY LABELS "CUDA")
+endmacro ()
-ADD_TEST_MACRO(CudaOnly.Architecture Architecture)
-ADD_TEST_MACRO(CudaOnly.CompileFlags CudaOnlyCompileFlags)
-ADD_TEST_MACRO(CudaOnly.EnableStandard CudaOnlyEnableStandard)
-ADD_TEST_MACRO(CudaOnly.ExportPTX CudaOnlyExportPTX)
-ADD_TEST_MACRO(CudaOnly.SharedRuntimePlusToolkit CudaOnlySharedRuntimePlusToolkit)
-ADD_TEST_MACRO(CudaOnly.Standard98 CudaOnlyStandard98)
-ADD_TEST_MACRO(CudaOnly.Toolkit CudaOnlyToolkit)
-ADD_TEST_MACRO(CudaOnly.WithDefs CudaOnlyWithDefs)
+add_cuda_test_macro(CudaOnly.Architecture Architecture)
+add_cuda_test_macro(CudaOnly.CompileFlags CudaOnlyCompileFlags)
+add_cuda_test_macro(CudaOnly.EnableStandard CudaOnlyEnableStandard)
+add_cuda_test_macro(CudaOnly.ExportPTX CudaOnlyExportPTX)
+add_cuda_test_macro(CudaOnly.SharedRuntimePlusToolkit CudaOnlySharedRuntimePlusToolkit)
+add_cuda_test_macro(CudaOnly.Standard98 CudaOnlyStandard98)
+add_cuda_test_macro(CudaOnly.Toolkit CudaOnlyToolkit)
+add_cuda_test_macro(CudaOnly.WithDefs CudaOnlyWithDefs)
if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
- ADD_TEST_MACRO(CudaOnly.SharedRuntimeViaCUDAFlags CudaOnlySharedRuntimeViaCUDAFlags)
+ add_cuda_test_macro(CudaOnly.SharedRuntimeViaCUDAFlags CudaOnlySharedRuntimeViaCUDAFlags)
# Separable compilation is currently only supported on NVCC. Disable tests
# using it for other compilers.
- ADD_TEST_MACRO(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine)
- ADD_TEST_MACRO(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols)
- ADD_TEST_MACRO(CudaOnly.SeparateCompilation CudaOnlySeparateCompilation)
+ add_cuda_test_macro(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine)
+ add_cuda_test_macro(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols)
+ add_cuda_test_macro(CudaOnly.SeparateCompilation CudaOnlySeparateCompilation)
add_test(NAME CudaOnly.DontResolveDeviceSymbols COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
@@ -27,19 +32,21 @@ if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
--build-options ${build_options}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+ set_property(TEST "CudaOnly.DontResolveDeviceSymbols" APPEND
+ PROPERTY LABELS "CUDA")
# Only NVCC defines __CUDACC_DEBUG__ when compiling in debug mode.
- ADD_TEST_MACRO(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag)
+ add_cuda_test_macro(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag)
endif()
# The CUDA only ships the shared version of the toolkit libraries
# on windows
if(NOT WIN32)
- ADD_TEST_MACRO(Cuda.StaticRuntimePlusToolkit StaticRuntimePlusToolkit)
+ add_cuda_test_macro(CudaOnly.StaticRuntimePlusToolkit CudaOnlyStaticRuntimePlusToolkit)
endif()
if(MSVC)
- ADD_TEST_MACRO(CudaOnly.PDB CudaOnlyPDB)
+ add_cuda_test_macro(CudaOnly.PDB CudaOnlyPDB)
endif()
add_test(NAME CudaOnly.RuntimeControls COMMAND
@@ -53,3 +60,5 @@ add_test(NAME CudaOnly.RuntimeControls COMMAND
--build-options ${build_options}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+set_property(TEST "CudaOnly.RuntimeControls" APPEND
+ PROPERTY LABELS "CUDA")
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 65d5e44..8bb1f27 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -118,6 +118,8 @@ add_RunCMake_test(CMP0081)
add_RunCMake_test(CMP0102)
if(CMake_TEST_CUDA)
add_RunCMake_test(CMP0104)
+ set_property(TEST RunCMake.CMP0104 APPEND
+ PROPERTY LABELS "CUDA")
endif()
add_RunCMake_test(CMP0106)
@@ -149,6 +151,8 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
list(APPEND NinjaMultiConfig_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
endif()
add_RunCMake_test(NinjaMultiConfig)
+ set_property(TEST RunCMake.NinjaMultiConfig APPEND
+ PROPERTY LABELS "CUDA")
endif()
add_RunCMake_test(CTest)
@@ -365,6 +369,8 @@ function(add_RunCMake_test_try_compile)
endif()
endforeach()
add_RunCMake_test(try_compile)
+ set_property(TEST RunCMake.try_compile APPEND
+ PROPERTY LABELS "CUDA")
endfunction()
add_RunCMake_test_try_compile()
@@ -481,6 +487,8 @@ add_RunCMake_test(target_link_libraries)
add_RunCMake_test(add_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
add_RunCMake_test(target_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
-DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+set_property(TEST RunCMake.target_link_options APPEND
+ PROPERTY LABELS "CUDA")
add_RunCMake_test(target_compile_definitions)
add_RunCMake_test(target_compile_features)
@@ -590,6 +598,8 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=1)
endif()
add_RunCMake_test(CompilerLauncher)
+ set_property(TEST RunCMake.CompilerLauncher APPEND
+ PROPERTY LABELS "CUDA")
add_RunCMake_test(ctest_labels_for_subprojects)
endif()