-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Ability to have "slim" installs with release only libraries #143
Comments
The reasoning for always deploying debug builds is that they are on the same order of size as the release builds, so by dropping them you decrease the total deployment by somewhere around half for non-header-only-libraries. I'm skeptical that halving the space used here is worthwhile, because if that made a difference then you'd run into the limit again once you double the number of libraries depended upon. Do you have a concrete case where this would be really invaluable (with some target disk footprints)? Another avenue that could decrease space usage by far more on CI servers is to clean out the Some numbers from
Similar numbers for
A feature we have not implemented yet but intend to look into is hardlinking files between the Apologies for the wall of text, we've thought about this issue before so we had some evidence at hand :). Please feel free to continue discussing, we may have overlooked something. |
Check protobuf for what I am getting at. The libraries alone are 166MB for the debug (all 3 combined) but only 23MB for the release (combined again. This only becomes truly useful for caching the install libraries on a CI platform that limits cache size such as appveyor (200MB limit). |
I see, that could be a significant amount of savings if the difference here can't be reduced. According to https://www.appveyor.com/docs/build-cache/, I'm seeing a 100MB or 1GB limit for free plans and that the archives are compressed. Testing with
So it looks like the debug libraries (while bloated on disk) are very compressible and should have a total impact of ~2x in the specific case of AppVeyor. |
Yes but adding up over 20 libraries it could become a make or break. This sort of feature doesn't seem like it would break anything and could perhaps be part of a triplet setting? |
it seems to me that doing both release and debug builds is going to increase the build time by ~1.5-2x (debug builds may be faster than release). I don't really mind this too much when I'm installing a package for my own use but when writing package files it gets super annoying. It would be really nice to be able to test only the debug mode while iterating on a package. |
Hmm, we could do this through a triplet setting without impacting the reproducibility of the system. Would you want this to also eliminate PDBs? |
pdb tend to be optional for release builds, so yes I would think that is
fine.
|
Sorry to revive this one. Was there any updates on this? I'm setting up a CI in appveyor and I was interested in limiting the installation process of dependencies to release versions only, in order to cut down on the build times. |
No problem, thanks for chiming in! I've definitely seen more people requesting this, so I've checked in an initial set of changes towards this goal. If you add set(VCPKG_BUILD_TYPE release) to a triplet file, most ports will avoid building the debug version. This is certainly going to have holes in it, but I'd be happy to accept PRs fixing those when they do arise. |
It worked pretty good, thanks for the pro tip 👍 On a side note, I wonder how scalable this triplet file approach is. Under a very simplistic assumption of 2^n combinations with n being the number of parameters, things can go quickly into a lot of files. So far there's target platform, desktop/windows store, static/dynamic linkage, with the addition of release/debug at some point. Well... you can see where this is going 😅 . Thanks for the tip ;) |
No problem :) The triplet system is directly designed to combat that problem, actually. There's such an incredibly large space of possibilities, but you actually only ever want a small number (perhaps different per individual though). That's why we record those settings in a file and give them a nice name so they don't get lost 😄! We obviously won't be adding |
I updated the appveyor documentation to show how to easily cache vcpkg
installs.
|
Implemented as part of #2120. |
Edit: Ignore this guys. I made a dumb mistake and was passing "Release" instead of "release"
set(VCPKG_BUILD_TYPE release)
# cache:
# - c:\tools\vcpkg\installed\
configuration: Release
environment:
VCPKG_DIR: C:\Tools\vcpkg
matrix:
- generator: "Visual Studio 14 2015"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
Platform: x86
- generator: "Visual Studio 14 2015 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
Platform: x64
# #Uncoment this block once MSVC2017 is patched.
# - generator: "Visual Studio 15 2017"
# APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
# Platform: x86
# - generator: "Visual Studio 15 2017 Win64"
# APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
# Platform: x64
# Runs before cache setup
init:
- cd %VCPKG_DIR%
- git pull
# - git checkout 94bd9dd66e9db88f965c8b270ea58f927685a317
- echo.set(VCPKG_BUILD_TYPE %CONFIGURATION%)>> %VCPKG_DIR%\triplets\%PLATFORM%-windows.cmake
- .\bootstrap-vcpkg.bat
- vcpkg version
- cd %APPVEYOR_BUILD_FOLDER%
install:
- vcpkg install boost:%PLATFORM%-windows
eigen3:%PLATFORM%-windows
flann:%PLATFORM%-windows
qhull:%PLATFORM%-windows
build:
parallel: true
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- mkdir build
- cd build
- cmake -G"%GENERATOR%"
-DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON
-DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON
-DPCL_NO_PRECOMPILE=ON
-DBUILD_simulation=ON
-DBUILD_global_tests=OFF
-DBUILD_examples=OFF
-DBUILD_tools=OFF
-DBUILD_apps=OFF
..
- cmake --build . --config %CONFIGURATION% |
even better would be nice to have a CLI option flag like |
I currently call this on my CI machine before first find ./vcpkg/triplets/* -type f -exec sh -c "echo \"\nset(VCPKG_BUILD_TYPE release)\n\" >> {}" \; Would be nice to have a CLI flag though. |
Kinetic devel
…_3__2_4 2.4 - Update libdjinterop to version 0.20.3
As the title suggests the ability to install only release libraries instead of debug and release we be very useful for CI caching and systems that have limited storage.
The text was updated successfully, but these errors were encountered: