lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
176 stars 19 forks source link

Print output log on failure #42

Closed vadi2 closed 3 years ago

vadi2 commented 3 years ago

Sometimes you mess up while developing your cmake file and you get this:

2021-02-18T05:37:47.6190770Z -- Configuring incomplete, errors occurred!
2021-02-18T05:37:47.6191890Z See also "/Users/runner/work/Mudlet/b/ninja/CMakeFiles/CMakeOutput.log".
2021-02-18T05:37:47.6194760Z ##[endgroup]
2021-02-18T05:37:47.6195870Z ⏱ elapsed: 44.722 seconds
2021-02-18T05:37:47.6202480Z Error: "CMake failed with error code: '1'.
2021-02-18T05:37:47.6204080Z     at CMakeRunner.<anonymous> (/Users/runner/work/_actions/lukka/run-cmake/v3/dist/index.js:3452:31)
2021-02-18T05:37:47.6205650Z     at Generator.next (<anonymous>)
2021-02-18T05:37:47.6207090Z     at fulfilled (/Users/runner/work/_actions/lukka/run-cmake/v3/dist/index.js:3263:58)
2021-02-18T05:37:47.6208100Z     at runMicrotasks (<anonymous>)
2021-02-18T05:37:47.6209140Z     at processTicksAndRejections (internal/process/task_queues.js:93:5)
2021-02-18T05:37:47.6213000Z ##[error]run-cmake action execution failed: 'Error: "CMake failed with error code: '1'.'

You then have to edit your build config to show the cmake error in /Users/runner/work/Mudlet/b/ninja/CMakeFiles/CMakeOutput.log.

It would be nice if run-cmake automatically printed that file for this particular kind of failure.

lukka commented 3 years ago

implemented in run-vcpkg@v7.3 and run-cmake@v3.4