ci: Enable CPack NuGet generator tests in a nightly job on Windows

Drop the environment-based heuristic.
This commit is contained in:
Brad King
2024-05-14 14:43:39 -04:00
parent 0d44d2ea1a
commit b9ea0d9f12
3 changed files with 4 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "")
if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "")
set(CMake_TEST_CPACK_INNOSETUP "ON" CACHE STRING "")
set(CMake_TEST_CPACK_NUGET "ON" CACHE STRING "")
set(CMake_TEST_ISPC "ON" CACHE STRING "")
set(CMake_TEST_Swift "ON" CACHE STRING "")
endif()

View File

@@ -1,6 +1,7 @@
if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
. ".gitlab/ci/innosetup-env.ps1"
. ".gitlab/ci/ispc-env.ps1"
. ".gitlab/ci/nuget-env.ps1"
. ".gitlab/ci/swift-env.ps1"
}

View File

@@ -167,10 +167,7 @@ if(BUILD_TESTING)
set(CPACK_BINARY_DEB OFF)
endif()
# Look for NuGet to use for tests.
find_program(NUGET_EXECUTABLE NAMES NuGet nuget)
if(NUGET_EXECUTABLE)
if(CMake_TEST_CPACK_NUGET)
set(CPACK_BINARY_NUGET ON)
else()
set(CPACK_BINARY_NUGET OFF)
@@ -1115,9 +1112,7 @@ if(BUILD_TESTING)
if(CPACK_BINARY_DEB)
list(APPEND ACTIVE_CPACK_GENERATORS DEB)
endif()
# Check whether if NuGet command is found
# before adding NuGet tests
if(CPACK_BINARY_NUGET)
if(CMake_TEST_CPACK_NUGET)
list(APPEND ACTIVE_CPACK_GENERATORS NUGET)
set(CPACK_GENERATOR_STRING_NUGET NuGet)
endif()