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
enable vcpkg for all platforms on CI #242
base: main
Are you sure you want to change the base?
Conversation
eefa921
to
bc654da
Compare
91ca41d
to
fbb72d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update README instructions to use VCPKG on Linux ? Good job otherwise
.github/workflows/build.yml
Outdated
- name: Install Linux dependencies | ||
if: ${{ matrix.os.preset == 'linux' }} | ||
run: | | ||
sudo apt update | ||
sudo apt install -y --no-install-recommends \ | ||
ninja-build cmake g++ libgtest-dev libsdl1.2-dev libsdl-image1.2-dev libncurses-dev zlib1g-dev | ||
ninja-build cmake g++ libgtest-dev libsdl1.2-dev libsdl-image1.2-dev libncurses-dev zlib1g-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need all those packages when using VCPKG ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not, but if I remove them the current build will fail until we actually remove SDL1 from the source :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark those concerned for deletion (ie on a separate line with a comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind against using vcpkg on Linux and macOS, but most likely Linux distributions will force using system libraries like SDL2 or spdlog from their repositories, so we must provide them ability to do so (again, proposed changes allows that, so OK from me).
Was hoping you could help me with that :D. I had a change where I basically added the same line as on Windows, but it seems macOS and Linux have very specific instructions, so in the same vein maybe we can provide exact instructions. If you can try to install vcpkg and tell me the proper paths I can add them. |
Well, this is just for building, I think people can use whatever they want for running, but specifying what they need for building is something I think we can do, and in this case it can be "vcpkg is required". That said, I can wait until Ryan's PR is merged, then I add all of this on top of his stuff, and basically fallback to the system one if it cannot find the |
On a fresh ubuntu:latest docker image, I can build using the following commands (first line is new VCPKG requirements):
However, I'm not sure about recommending this approach to anyone wanting to build on Linux. It has much more requirements in order to bulid the VCPKG packages, and the build is way longer. In addition, VCPKG errors can be obscure and harder to debug (it's not just written plainly "Missing package X") |
To be honest, those packages you'll need anyway for any kind of development, and the build is longer only the very first time, which is not a useful metric when we have cache IMHO. On the CI agents I had to add none, but I'm not sure that's a useful metric either. About the errors, I'll need an example to know why you think they are hard to understand, but vcpkg only calls CMake under the hood, and it clearly states where the log with the errors is. Finally, if you think this is not useful let's just close and maybe remove |
@JeodC what you just did makes no sense. You don't "supersede" by manually copying these changes into new commits you just create, you create your changes on top (or rebase) if you're going to add them. I've reopened this and closed yours. |
I did not expect #284 to be abruptly closed as it was. I tried to reopen it but the branch it originated from was force-pushed or recreated so the button is blank. |
|
True, only the first build is slower.
I lost my terminal session since then, but the 2 layers VCPKG, and CMake under the hood did help obscure the real error.
Maybe it's just me. I think we can continue with these changes to the CI, it's an important step towards SDL2. We'll just need a rebase and we can merge |
87d7d58
to
0845cb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok to merge when README instructions are updated for Linux (maybe mac?) using the new package requirements for VCPKG builds (see my message above)
- name: Install Linux dependencies | ||
if: ${{ matrix.os.preset == 'linux' }} | ||
run: | | ||
sudo apt update | ||
sudo apt install -y --no-install-recommends \ | ||
ninja-build cmake g++ libgtest-dev libsdl2-dev libncurses-dev zlib1g-dev libspdlog-dev | ||
ninja-build cmake g++ libgtest-dev libsdl2-dev libncurses-dev zlib1g-dev libspdlog-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember if I asked before but libsdl2-dev, zlib & spdlog should now be provided by VCPKG ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, they should. I can change those when I update the PR to add the README
Pull Request Type
Description
Enable vcpkg on all platforms, include & link SDL2 for all of them as well
Related Issues
Relates to #241
Screenshots (if applicable)
Checklist
Additional Comments