diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-12 15:58:43 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-12 15:58:43 (GMT) |
commit | dc50726e5a523372a93900def63a4f00357aebec (patch) | |
tree | 61cb952f3065b8042c499c3f83436f27b0875c37 | |
parent | 81ebf2a55a0f8ab2bd89415b090ce3fb6a9a81c1 (diff) | |
download | Doxygen-dc50726e5a523372a93900def63a4f00357aebec.zip Doxygen-dc50726e5a523372a93900def63a4f00357aebec.tar.gz Doxygen-dc50726e5a523372a93900def63a4f00357aebec.tar.bz2 |
More fixes
-rw-r--r-- | .github/workflows/build_cmake.yml | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 2573ac6..6706130 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -24,15 +24,15 @@ jobs: set(ENV{CC} ${{ matrix.config.cc }}) set(ENV{CXX} ${{ matrix.config.cxx }}) - file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/ninja" ninja_program) - execute_process( - COMMAND ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake - -S . - -B build - -D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }} - -G Ninja - -D CMAKE_MAKE_PROGRAM=${ninja_program} + COMMAND cmake + -S . + -B build + -D CMAKE_BUILD_TYPE=$ENV{BUILD_TYPE} + -G Ninja + -D CMAKE_MAKE_PROGRAM=ninja + -D CMAKE_C_COMPILER_LAUNCHER=ccache + -D CMAKE_CXX_COMPILER_LAUNCHER=ccache RESULT_VARIABLE result ) if (NOT result EQUAL 0) @@ -45,11 +45,17 @@ jobs: set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ") execute_process( - COMMAND ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake --build build + COMMAND cmake --build build RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output + ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE ) if (NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") + string(REGEX MATCH "FAILED:.*$" error_message "${output}") + string(REPLACE "\n" "%0A" error_message "${error_message}") + message("::error::${error_message}") + message(FATAL_ERROR "Build failed") endif() - name: Run tests @@ -58,10 +64,15 @@ jobs: include(ProcessorCount) ProcessorCount(N) + set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON") + execute_process( - COMMAND ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/ctest -j ${N} + COMMAND ctest -j ${N} WORKING_DIRECTORY build RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output + ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE ) if (NOT result EQUAL 0) message(FATAL_ERROR "Running tests failed!") |