-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature/vcpkg linux #2078
Feature/vcpkg linux #2078
Conversation
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
- name: Cache vcpkg binary dir | ||
if: always() |
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.
Even in the case of build errors ?
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.
Good question :
I think it makes sense:
- if the dependencies build works and the project build fails, we need to keep the dependencies to not rebuild them in a later workflow
- if it's the build of a dependency which fails, I think it is still better to save the cache because other dependencies may have succeeded. Also, because we restore the previous cache, this should keep previously cached items which have not been rebuilt (like the ones that would have been rebuilt after the dependency that failed)
To be checked before merging: I am not sure the windows artifact will be complete now, because with the default triplet "x64-windows", dependencies are built as DLLs, which will include zlib and minizip. Currently, they are linked statically. I would propose to introduce custom triplets for this, and also to avoid building debug artifacts of dependencies. |
- link statically with chosen libraries - build only release artifacts on CI Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: Sylvain Leclerc <[email protected]>
src/triplets/x64-linux-antares.cmake
Outdated
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.
remove ?
Signed-off-by: Sylvain Leclerc <[email protected]>
path: ${{ env.VCPKG_CACHE_DIR }} | ||
key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} | ||
# Allows to restore a cache when deps have only partially changed (like adding a dependency) | ||
restore-keys: vcpkg-cache-centos7- |
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.
wow! i would recommend to place the "install vcpkg and the restore cache" jobs in dedicated file
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.
Unfortunately it does not seem so easy, because we cannot have "post actions" in composite github actions :(
See actions/runner#1478
I wanted to have the 3 steps "install VCPKG", "restore cache" and "save cache" in the same action, but it's not possible.
If we keep the save step separate, it will be messy because you need to know "internal details" of the other steps (the cahce key basically).
So I'm afraid I will leave it this way for now ...
else () | ||
find_dependency(minizip) | ||
if (NOT minizip_FOUND) | ||
message (FATAL_ERROR "Minizip dependency (minizip or minizip-ng) not found.") |
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.
specify minimal version? according to this commit, at least v 3.0.7 and back are incompatible with Simulator.
minizip target is confusing it actually refers to minizip-ng and not the "original" project
@@ -8,7 +8,7 @@ target_link_libraries(test-writer | |||
Boost::unit_test_framework | |||
Antares::result_writer | |||
test_utils_unit | |||
MINIZIP::minizip | |||
MINIZIP::minizip-ng |
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.
is this works with the "minizip" target ?
- name: Install cmake 3.28 | ||
run: pip3 install cmake==3.28.4 | ||
|
||
- name: Install 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.
For a v2 maybe use https://github.com/lukka/run-vcpkg
- Define minimal version for boost and minizip - remove BOOST_TEST_DYN_LINK --------- Co-authored-by: Florian OMNES <[email protected]>
Quality Gate passedIssues Measures |
**Description** Continues the work of #2078 (which should be merged before in feature branch feature/vcpkg-dependencies), to push further the use of VCPKG, and in particular remove the need for the home-made antares-deps repository. Hence, this includes: - Addition of sirius-solver "overlay" port to install sirius with VCPKG - Removal of antares-deps and associated code --------- Signed-off-by: Sylvain Leclerc <[email protected]>
Continuing work on VCPKG for Linux, basically trying to simplify workflows from #2049 and using manifest mode.
Status
Overall strategy
Merge this in feature branch
feature/vcpkg-dependencies
first.The whole feature branch will be merged only once it brings sufficient added value to existing mechanisms.
In particular, when we are able to remove the use of
antares-deps
in favor of using vcpkg would be a good time to do so.Documentation should be updated in
feature/vcpkg-dependencies
when the developer workflow is clear.