diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 288c996..a807dae 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -6,9 +6,6 @@ on: pull_request: branches: [ "master" ] -env: - BUILD_TYPE: Release - jobs: linux-build: runs-on: ubuntu-latest @@ -16,11 +13,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: CMake workflow + run: cmake --workflow --preset default windows-build: runs-on: windows-latest @@ -28,8 +22,5 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: CMake workflow + run: cmake --workflow --preset default diff --git a/CMakeLists.txt b/CMakeLists.txt index ddd3fec..17f026f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.13) cmake_policy(VERSION 3.13) project(refactor-test-suite) +include(CTest) set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT refactor-test-suite) @@ -11,3 +12,4 @@ add_subdirectory(TestDiffs) add_subdirectory(TestNames) add_subdirectory(TestResults) add_subdirectory(ToolSummary) +add_subdirectory(results) diff --git a/CMakePresets.json b/CMakePresets.json index 3a7ca28..53e7f55 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -35,9 +35,29 @@ "name": "default", "displayName": "default", "configurePreset": "default", + "configuration": "Debug", "output": { "outputOnFailure": true } } + ], + "workflowPresets": [ + { + "name": "default", + "steps": [ + { + "type": "configure", + "name": "default" + }, + { + "type": "build", + "name": "default" + }, + { + "type": "test", + "name": "default" + } + ] + } ] } diff --git a/results/CMakeLists.txt b/results/CMakeLists.txt new file mode 100644 index 0000000..027bd2e --- /dev/null +++ b/results/CMakeLists.txt @@ -0,0 +1,18 @@ +if(NOT BUILD_TESTING) + return() +endif() + +foreach(result + #AppleXcode + ClangTidy + #CLion + #EclipseCDT + #QtCreator + ReSharperCpp + VisualAssistX + VisualStudio + ) + add_test(NAME check-${result}-results + COMMAND test-results ${CMAKE_SOURCE_DIR}/RefactorTest ${CMAKE_CURRENT_SOURCE_DIR}/${result}Results.md + ) +endforeach()