question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for cmake/ninja --install

See original GitHub issue

Hi,

I am currently using the action to build my project and everything works fine. However, my project does not only contain source files that need to be build, but rather uses install to put everything in place (e.g. raw files, artifacts, headers, etc.). It would be quite convenient, if run-cmake could be configured to automatically run ninja install or cmake --install after a successful build. For ninja, the install directory is stored in the CMakeSettings.json file. The action could treat it just as it does with the buildRoot directory (i.e. ignore and set to a default; maybe make it configurable).

Do you think this is possible?

Thanks and regards, Carsten.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
garyttierneycommented, Dec 9, 2020

FWIW, you can accomplish this using the run-cmake action by specifying the build target:

    - name: 'Build with CMake'
      uses: lukka/run-cmake@v3
      with:
        cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
        buildWithCMakeArgs: '--target install'
2reactions
lukkacommented, Jul 28, 2020

@Aschratt yes, it make sense to add a option similar to buildWithCMake, called installWithCMake, with default set to false. For the time being, the solution is to run cmake --install in a run step, assuming the cwd is the right one e.g.:

- name: Install with CMake
    run: cmake --install
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ninja — CMake 3.25.1 Documentation
Generates build.ninja files. A build.ninja file is generated into the build tree. Use the ninja program to build the project through the all...
Read more >
The Ninja build system
A widely used meta-build system that can generate Ninja files on Linux as of CMake version 2.8.8. Newer versions of CMake support generating...
Read more >
CMake Ninja Combo: The Gist
Install the latest version of Python and open a Visual Studio x64 native tools command prompt. Issue the above two commands, the first...
Read more >
Add support for the Ninja CMake generator · Issue #8
Hm, build seems to be able to saturate 16 threads (make -j16), don't think there is too much to gain there. Switching to...
Read more >
Integrate custom C/C++ build systems using Ninja ...
Learn about experimental C/C++ Ninja build system support. ... CMake can generate projects for Android, iOS, and other platforms from a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found