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
@@ -3,6 +3,7 @@ set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "")
if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "")
set(CMake_TEST_CPACK_INNOSETUP "ON" CACHE STRING "") 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_ISPC "ON" CACHE STRING "")
set(CMake_TEST_Swift "ON" CACHE STRING "") set(CMake_TEST_Swift "ON" CACHE STRING "")
endif() endif()
@@ -1,6 +1,7 @@
if ("$env:CMAKE_CI_NIGHTLY" -eq "true") { if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
. ".gitlab/ci/innosetup-env.ps1" . ".gitlab/ci/innosetup-env.ps1"
. ".gitlab/ci/ispc-env.ps1" . ".gitlab/ci/ispc-env.ps1"
. ".gitlab/ci/nuget-env.ps1"
. ".gitlab/ci/swift-env.ps1" . ".gitlab/ci/swift-env.ps1"
} }
+2 -7
View File
@@ -167,10 +167,7 @@ if(BUILD_TESTING)
set(CPACK_BINARY_DEB OFF) set(CPACK_BINARY_DEB OFF)
endif() endif()
# Look for NuGet to use for tests. if(CMake_TEST_CPACK_NUGET)
find_program(NUGET_EXECUTABLE NAMES NuGet nuget)
if(NUGET_EXECUTABLE)
set(CPACK_BINARY_NUGET ON) set(CPACK_BINARY_NUGET ON)
else() else()
set(CPACK_BINARY_NUGET OFF) set(CPACK_BINARY_NUGET OFF)
@@ -1115,9 +1112,7 @@ if(BUILD_TESTING)
if(CPACK_BINARY_DEB) if(CPACK_BINARY_DEB)
list(APPEND ACTIVE_CPACK_GENERATORS DEB) list(APPEND ACTIVE_CPACK_GENERATORS DEB)
endif() endif()
# Check whether if NuGet command is found if(CMake_TEST_CPACK_NUGET)
# before adding NuGet tests
if(CPACK_BINARY_NUGET)
list(APPEND ACTIVE_CPACK_GENERATORS NUGET) list(APPEND ACTIVE_CPACK_GENERATORS NUGET)
set(CPACK_GENERATOR_STRING_NUGET NuGet) set(CPACK_GENERATOR_STRING_NUGET NuGet)
endif() endif()