-
Notifications
You must be signed in to change notification settings - Fork 90
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
Install ev-cli locally and depend on templates files for generation #893
Conversation
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Hi, in general, the implementation as of now should work. |
Signed-off-by: Kai-Uwe Hermann <[email protected]>
…o depend on Signed-off-by: Kai-Uwe Hermann <[email protected]>
Fail with error messages if they could not get returned Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
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.
Great work!
I would suggest to change PATHS
to HINTS
(see below). Furthermore, I think the main CMakeLists.txt
needs to depend on everest-cmake 0.5. The additional python script could now be removed again, right?
cmake/ev-cli.cmake
Outdated
function(set_ev_cli_template_properties) | ||
message(STATUS "Setting template properties for ev-cli target") | ||
get_target_property(EVEREST_SCHEMA_DIR generate_cpp_files EVEREST_SCHEMA_DIR) | ||
|
||
execute_process( | ||
COMMAND ${EV_CLI} interface get-templates --schemas-dir "${EVEREST_SCHEMA_DIR}" | ||
OUTPUT_VARIABLE EV_CLI_INTERFACE_TEMPLATES | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
RESULT_VARIABLE | ||
EV_CLI_INTERFACE_TEMPLATES_RESULT | ||
) | ||
|
||
if(EV_CLI_INTERFACE_TEMPLATES_RESULT) | ||
message(FATAL_ERROR "Could not get interface templates from ev-cli.") | ||
endif() | ||
|
||
execute_process( | ||
COMMAND ${EV_CLI} module get-templates --schemas-dir "${EVEREST_SCHEMA_DIR}" |
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.
As this is a function, I wouldn't prefix all the variables with EV_CLI
in order to make it more readable
This way they automatically get converted into a cmake list Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
…irst Signed-off-by: Kai-Uwe Hermann <[email protected]>
…ry time Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: aw <[email protected]>
Signed-off-by: aw <[email protected]>
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.
As discussed offline
This needs EVerest/everest-cmake#14 Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: aw <[email protected]>
Signed-off-by: aw <[email protected]>
dependencies.yaml
Outdated
@@ -90,7 +90,7 @@ ext-mbedtls: | |||
# everest-testing and ev-dev-tools | |||
everest-utils: | |||
git: https://github.com/EVerest/everest-utils.git | |||
git_tag: v0.3.1 | |||
git_tag: 9d9852369354eb86ea620ec9d8059902c43853a1 |
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.
TODO: update the git_tag to a tag before merge into main
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
.ci/build-kit/scripts/compile.sh
Outdated
@@ -2,6 +2,14 @@ | |||
|
|||
set -e | |||
|
|||
|
|||
EVEREST_CMAKE_PATH=/usr/lib/cmake/everest-cmake | |||
EVEREST_CMAKE_VERSION=3aec8e3b058a9a1edb843da4fe46bb12d7aef071 |
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.
In general it is a nice feature to be able to define the used everest-cmake version.
Proposal:
Could we add everest-cmake to the dependencies.yaml
and then check it out with edm. I think there is currently not that kind of command, but I imagine having here one line (kind of)
edm single-checkout everest-cmake --workspace-config everest-core/dependencies.yaml
This way it would be more visible where to set everest-cmake
version
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.
Alternativley we could add another file like ci-workspace.yaml
and add it there since this version pinning is mainly for ci
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.
- note sure if adding everest-cmake to
dependencies.yaml
will work in the current implementation as the cmake specific edm functionevc_setup_edm
is defined in everest-cmake and you'll get an chicken-egg problem - concerning
ci-workspace.yaml
, I wouldn't try to add additional coupling of the ci to edm. First we should try to solve the problem, that the repo specific Dockerfile isn't used.
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.
note sure if adding everest-cmake to dependencies.yaml will work in the current implementation
It should work since when building with cmake it could ignore this one dependency and use the provided everest-cmake installation. But when running in ci edm can read this dependency from dependencies.yaml.
I agree that it could be confusing defining everest-cmake
in dependencies.yaml
without using it in the cmake build. This could improved by adding in line comment and set cmake_condition
to OFF
concerning ci-workspace.yaml, I wouldn't try to add additional coupling of the ci to edm.
Why not using edm in ci? It is the EVerest dependency manager which is used during build, but also as dev tool to manage the dev workspace.
The advantage I see or my motivation is to have a transparent/visible way of defining dependencies. Doing it in compile.sh
is hidden in my feeling.
Moving it into the Dockerfile
without using edm for it would also be an option.
First we should try to solve the problem, that the repo specific Dockerfile isn't used.
I am not aware of this issue, do you have an example or a log 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.
I am not aware of this issue, do you have an example or a log file?
Sorry my bad. I remember, we deactivated this for everest-core since we have this issue with running this in PRs
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.
It might work by accident, but probably with no real well defined behavior. I would not rely on that.
Concerning the coupling in the ci: I didn't mean that we should not run edm in the ci as it is run locally - but I wouldn't add an extra dependency overwrite file for the ci (as both the local build and the ci build should be similar).
Using `find_package(everest-cmake X.Y.Z) we can already express, that we need a newer version.
I totally agree, that moving it to the compile.sh
was a hack to get the ci build, but it should not be committed this way. Having it in the Dockerfile, should be the way to go - but that doesn't work currently.
Signed-off-by: Kai-Uwe Hermann <[email protected]>
This reverts commit 3f82c28. Signed-off-by: Kai-Uwe Hermann <[email protected]> # Conflicts: # .ci/build-kit/scripts/compile.sh
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
# Conflicts: # .ci/build-kit/docker/Dockerfile Signed-off-by: Kai-Uwe Hermann <[email protected]>
Describe your changes
Issue ticket number and link
Checklist before requesting a review