New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is a GitHub action really necessary to build a C++ based project? #41
Comments
This toolchain comes from vcpkg, right? |
@vadi2 yes! I added a link to the vcpkg toolchain file, and added more thoughts on this as well. |
I definitely see how this will solve a problem and it looks really good. That said something not mentioned is that in the real world not everything is available in vcpkg - and something you don't want to be in vcpkg, like header-only boost which vcpkg insists on building (15-20mins). So it would need to allow for custom scripts. See https://github.com/Mudlet/Mudlet/blob/development/.github/workflows/build-mudlet.yml#L80 where we have per-platform Otherwise, it would be a dream to be able to use the same setup as CI on the desktop 👍 |
How does https://github.com/TheLartians/CPM.cmake relate to this issue? |
Looks like CPM.cmake is another way to install the dependencies by means of CMake itself, which is good as this would allow to have same workflow locally and on CI server. Interestingly it reminded me of another project very similar in nature and name, i.e. cpm. @vadi2 if there any special feature or consideration about this project which would relate to this, let me know |
I've checked out the roadmap but I don't see their plans for a standalone binary - at most, it'll be included inside Visual Studio/MSVC which we don't use on Windows - we use MingGW. We support Clang and GCC and dealing with two compilers is enough, MSVC is notorious for having incompatibilities with the other two. That adds a bit of a problem to these plans. |
Created a project template that documents how to use a pure and a non-pure workflow: https://github.com/lukka/CppCMakeVcpkgTemplate |
Introduction
In an ideal world, a mature ecosystem around the 30 years old C++ language would have standard and multi platform tools handling the dependency management, the building, the testing and so forth. Such as:
Ideally those exact commands would be run locally on the developer machine, or remotely on the build/test machines, in order to obtain a perfectly reproducible software development process that can be run anywhere without any difference and no surprises.
Reality is that (I can speak for Azure DevOps or GitHub workflows) server side workflows require Tasks or Actions, which are essentially something the developer cannot run locally on the development machine.
In short, the problem is the lack of 100% reproducible software development processes: the build/test process run by the developer on the local machine is not exactly identical to the one run on the server side workflow.
Let's create a reproducible workflow, not polluted with code the developer cannot run!
In this pure workflow, it is presented how to create a workflow that is as close as possible to what the developer would run locally on the development machine.
The final intention is to give the developer the power to:
The pure workflow is based on:
Developers must own the knowledge and the choices
This information must be provided to the users in the
readme.md
files ofrun-vcpkg
andrun-cmake
: users must own the knowledge and take a conscious decision about whether any GitHub action is necessary.The future is even brighter
Added values of a GitHub Action
There are still useful features provided by the actions that cannot be covered by tools, e.g.:
The text was updated successfully, but these errors were encountered: