Skip to content
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 option to run generate-conda-packages job without uploading and fix generate-conda-packages #665

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Mar 24, 2021

After merging #652, I tried to run generate-conda-packages via workflow_dispatch and it was failing due to this:

-- Saved metametadata in /home/runner/work/robotology-superbuild/robotology-superbuild/build/conda/robotology-superbuild-conda-metametadata.yaml
python: can't open file '/home/runner/work/robotology-superbuild/robotology-superbuild/conda/python/generate_conda_recipes_from_metadatadata.py': [Errno 2] No such file or directory
CMake Error at conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake:154 (message):
  Error in execution of script
  /home/runner/work/robotology-superbuild/robotology-superbuild/conda/python/generate_conda_recipes_from_metadatadata.py
Call Stack (most recent call first):
  conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake:195 (generate_conda_recipes)
  CMakeLists.txt:43 (include)

Probably some change occured doing the review that broke the build. However, this revealed the need to be able to test this github actions on PRs, but without uploading any package. For doing so, I also modified the job to have an input to the workflow_dispatch.

The actual conda package generation should be fixed by 82d4cdb, but let's try it first.

Example of invocation of a job:
workflow_dispatch

@traversaro
Copy link
Member Author

Please ignore the failure in the normal C++ job, I killed it as it is not relevant for this PR, the releant job that I triggered manually is: https://github.com/robotology/robotology-superbuild/runs/2182648284 .

@traversaro
Copy link
Member Author

The actual conda package generation should be fixed by 82d4cdb, but let's try it first.

Please ignore the failure in the normal C++ job, I killed it as it is not relevant for this PR, the relevant job that I triggered manually is: https://github.com/robotology/robotology-superbuild/runs/2182648284 .

The build completed successfully for Linux ( https://github.com/robotology/robotology-superbuild/runs/2182648284 ) and is ongoing for Windows and macOS, so I think it is safe to ask for a review now.

@@ -142,7 +142,7 @@ macro(generate_metametadata_file)
endmacro()

macro(generate_conda_recipes)
set(python_generation_script "${CMAKE_CURRENT_SOURCE_DIR}/conda/python/generate_conda_recipes_from_metadatadata.py")
set(python_generation_script "${CMAKE_CURRENT_SOURCE_DIR}/conda/python/generate_conda_recipes_from_metametadata.py")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a curiosity, why is it called metametadata? Curious about the two metas ;D

Copy link
Member Author

@traversaro traversaro Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A conda recipe contains a file meta.yaml that is supposed to contain metadata of the package being built (see https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html). In our case, this meta.yaml file is generated from a template (https://github.com/robotology/robotology-superbuild/blob/master/conda/recipe_template/meta.yaml) using Jinja2 template engine.
This template so is used to generate the meta.yaml file that contains metadata, but it does so by getting the relevant info that so contains metametadata, because it is metadata about the metadata. This memetametadata file itself is generated automatically by the CMake logic of the superbuild, for more on this feel free to refer to https://github.com/robotology/robotology-superbuild/blob/master/doc/conda-recipe-generation.md#internals . Actually I noticed a typo also there.

@traversaro traversaro merged commit 43d7584 into master Mar 24, 2021
@traversaro traversaro deleted the fix-conda-generation branch March 24, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants