From 65eed5339f7a7cac7e15868ec13a3a5869b9d5b7 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Wed, 1 Mar 2023 17:26:59 +0300 Subject: [PATCH] vcmi: actually enable unit tests --- .github/workflows/github.yml | 8 +++--- CMakePresets.json | 49 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 4b1a4d876..0f580dec5 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -70,12 +70,12 @@ jobs: include: - platform: linux-qt6 os: ubuntu-22.04 - test: 0 - preset: linux-clang-release + test: 1 + preset: linux-clang-test - platform: linux os: ubuntu-20.04 - test: 0 - preset: linux-gcc-release + test: 1 + preset: linux-gcc-test - platform: mac-intel os: macos-12 test: 0 diff --git a/CMakePresets.json b/CMakePresets.json index 15df70d7b..460875373 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -45,6 +45,15 @@ "CMAKE_INSTALL_PREFIX" : "/usr/local" } }, + { + "name": "linux-test", + "inherits": "linux-release", + "hidden": true, + "cacheVariables": { + "ENABLE_TEST": "ON", + "ENABLE_LUA": "ON" + } + }, { "name": "linux-clang-release", "displayName": "Clang x86_64-pc-linux-gnu", @@ -67,6 +76,26 @@ "CMAKE_CXX_COMPILER": "/usr/bin/g++" } }, + { + "name": "linux-clang-test", + "displayName": "Clang x86_64-pc-linux-gnu with unit testing", + "description": "VCMI Linux Clang", + "inherits": "linux-test", + "cacheVariables": { + "CMAKE_C_COMPILER": "/usr/bin/clang", + "CMAKE_CXX_COMPILER": "/usr/bin/clang++" + } + }, + { + "name": "linux-gcc-test", + "displayName": "GCC x86_64-pc-linux-gnu with unit testing", + "description": "VCMI Linux GCC", + "inherits": "linux-test", + "cacheVariables": { + "CMAKE_C_COMPILER": "/usr/bin/gcc", + "CMAKE_CXX_COMPILER": "/usr/bin/g++" + } + }, { "name": "windows-msvc-release", "displayName": "Windows x64 RelWithDebInfo", @@ -213,6 +242,16 @@ "configurePreset": "linux-clang-release", "inherits": "default-release" }, + { + "name": "linux-clang-test", + "configurePreset": "linux-clang-test", + "inherits": "default-release" + }, + { + "name": "linux-gcc-test", + "configurePreset": "linux-gcc-test", + "inherits": "default-release" + }, { "name": "linux-gcc-release", "configurePreset": "linux-gcc-release", @@ -295,6 +334,16 @@ "configurePreset": "linux-gcc-release", "inherits": "default-release" }, + { + "name": "linux-clang-test", + "configurePreset": "linux-clang-test", + "inherits": "default-release" + }, + { + "name": "linux-gcc-test", + "configurePreset": "linux-gcc-test", + "inherits": "default-release" + }, { "name": "macos-xcode-release", "configurePreset": "macos-xcode-release",