-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add HFSM2 Recipe #22647
base: master
Are you sure you want to change the base?
Add HFSM2 Recipe #22647
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…duced while adding newline at end of file)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
@Jak-o-Shadows Thank your for your contribution! Please, check my review.
recipes/hfsm2/all/conandata.yml
Outdated
"2.5.0": | ||
url: "https://github.com/andrew-gresyk/HFSM2/archive/refs/tags/2.5.0.zip" | ||
sha256: "e295f8bccacc9d40eb04f08414e5abe623913453bad1d2b5b70210bf8080b309" | ||
"2.4.0": |
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 need both versions? Otherwise, I would ask adding only the latest to save the CI. In case someone asks 2.4.0, so no problem, we add it later.
recipes/hfsm2/all/conanfile.py
Outdated
from conan.tools.layout import basic_layout | ||
from conan.tools.files import get | ||
|
||
required_conan_version = ">=2.0.16" |
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.
required_conan_version = ">=2.0.16" | |
required_conan_version = ">=1.54.0" |
Conan 1.x support is still mandatory in CCI.
recipes/hfsm2/all/conanfile.py
Outdated
url = "https://github.com/conan-io/conan-center-index" | ||
|
||
package_type = "header-library" | ||
exports_sources = "include/*" |
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.
exports_sources = "include/*" |
That's only required when export from source, which means, both recipe and source are the same repository. As example: https://docs.conan.io/2/tutorial/developing_packages/local_package_development_flow.html
recipes/hfsm2/all/conanfile.py
Outdated
# This will also copy the "include" folder | ||
copy(self, os.path.join(self.exports_sources, "*.hpp"), self.source_folder, self.package_folder) |
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.
# This will also copy the "include" folder | |
copy(self, os.path.join(self.exports_sources, "*.hpp"), self.source_folder, self.package_folder) | |
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) | |
copy(self, "*.hpp", self.source_folder, self.package_folder) |
- The license must be copied to the licenses folder. The CI will send an error in case missing
- The first after of copy is reserved to pattern only. Try to keep it simple.
recipes/hfsm2/all/conanfile.py
Outdated
# For header-only packages, libdirs and bindirs are not used | ||
# so it's necessary to set those as empty. | ||
self.cpp_info.bindirs = [] | ||
self.cpp_info.libdirs = [] |
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 header-only packages, libdirs and bindirs are not used | |
# so it's necessary to set those as empty. | |
self.cpp_info.bindirs = [] | |
self.cpp_info.libdirs = [] | |
self.cpp_info.bindirs = [] | |
self.cpp_info.libdirs = [] | |
Please, add an empty line to avoid future errors with git diff. Plus, template comments are not really needed.
|
||
add_executable(example example.cpp) | ||
target_link_libraries(example PRIVATE hfsm2::hfsm2) | ||
set_property(TARGET example PROPERTY CXX_STANDARD 11) |
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.
set_property(TARGET example PROPERTY CXX_STANDARD 11) | |
set_property(TARGET example PROPERTY CXX_STANDARD 11) | |
Missing empty EOL. To the CI, it's an error.
def test(self): | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindir, "example") | ||
self.run(bin_path, env="conanrun") |
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.
self.run(bin_path, env="conanrun") | |
self.run(bin_path, env="conanrun") | |
Missing empty EOL. To the CI, it's an error.
assert(context.on == true); | ||
|
||
return 0; | ||
} |
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.
} | |
} | |
Missing empty EOL. To the CI, it's an error.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…to make CIwork, responding to feedback on PR#22647
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ❌Failure in build 4 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. Conan v2 pipeline ✔️
All green in build 3 (
|
I'm not quite sure what the issue is - the package doesnt' seem substantially different from libNPY (https://github.com/conan-io/conan-center-index/tree/master/recipes/libnpy), which built successfully. |
Specify library name and version: HFSM2/2.5.0/2.4.0
HFSM2 is a finite state machine library that supports embedded platforms. Whilst Fetch-Content works in CMake, it is nicer to have all package management under one system.