diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 5961b2f..f060a79 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -59,7 +59,7 @@ jobs: install_system_dependencies: true - name: Install dependencies and build unit test - run: conan build . -o enable_testing=True -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv + run: conan build . -o enable_testing=True -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=false - name: Run Unit Test id: run-test diff --git a/conanfile.py b/conanfile.py index 1a52e5d..b66d599 100644 --- a/conanfile.py +++ b/conanfile.py @@ -26,13 +26,11 @@ class SavitarConan(ConanFile): options = { "shared": [True, False], - "fPIC": [True, False], - "enable_testing": [True, False] + "fPIC": [True, False] } default_options = { "shared": True, - "fPIC": True, - "enable_testing": False + "fPIC": True } def set_version(self): @@ -86,7 +84,7 @@ def validate(self): def build_requirements(self): self.test_requires("standardprojectsettings/[>=0.2.0]@ultimaker/cura_11622") # FIXME: use stable after merge - if self.options.enable_testing: + if not self.conf.get("tools.build:skip_test", False, check_type=bool): self.test_requires("gtest/1.14.0") def config_options(self): @@ -102,7 +100,7 @@ def generate(self): if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.variables["ENABLE_TESTING"] = self.options.enable_testing + tc.variables["ENABLE_TESTING"] = not self.conf.get("tools.build:skip_test", False, check_type=bool) tc.generate() tc = CMakeDeps(self)