conan-io / conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
MIT License
165 stars 70 forks source link

Feature: Add support for build profile #555

Closed ghost closed 2 years ago

ghost commented 3 years ago

Changelog: (Feature): Add support for build profile

The build profile is passed to cpt.packager.run() using the base_profile_build_name parameter.

Issue #550

When running in Docker the complete build profile is passed to the container using an environment variable and will there be stored in a temporary file.

Unfortunately the current implementation does not allow passing additional options, settings or environment variables to the build profile like it is done for 'normal' profiles. This feature is not yet supported by cpt.packager.ConanMultipackager.add(). But maybe this is a start for a discussion on how to implement this feature.

Host profiles could be added in a similar way.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

datalogics-kam commented 3 years ago

This PR would greatly benefit us as we could use the build profile for building the standard matrix of our packages. Is there anything holding up it being merged?

uilianries commented 3 years ago

Hello! It's a great add indeed, but this PR is still missing functional test. I'll check later to add some tests.

ghost commented 3 years ago

Good to get some feedback. I'll try to add some unit tests in the next week. I would also like to rename some of the variables I added to keep them aligned with the existing ones.

uilianries commented 3 years ago

Yesterday I did an upgrade on develop branch, please, don't forget to rebase your changes.

uilianries commented 2 years ago

@smartSBA I did some changes in your PR, including new tests, so we can merge it soon. I want to release a new version this week.

codecov-commenter commented 2 years ago

Codecov Report

Merging #555 (a4733f2) into develop (4afb982) will increase coverage by 0.10%. The diff coverage is 90.16%.

:exclamation: Current head a4733f2 differs from pull request most recent head 033c00d. Consider uploading reports for the commit 033c00d to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #555      +/-   ##
===========================================
+ Coverage    79.76%   79.87%   +0.10%     
===========================================
  Files           41       42       +1     
  Lines         5021     5078      +57     
===========================================
+ Hits          4005     4056      +51     
- Misses        1016     1022       +6     
Impacted Files Coverage Δ
cpt/run_in_docker.py 0.00% <0.00%> (ø)
cpt/runner.py 90.19% <91.66%> (+0.03%) :arrow_up:
cpt/packager.py 87.24% <92.85%> (+0.08%) :arrow_up:
cpt/test/integration/docker_test.py 91.97% <100.00%> (+0.70%) :arrow_up:
cpt/test/integration/profile_test.py 100.00% <100.00%> (ø)
cpt/ci_manager.py 92.46% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4afb982...033c00d. Read the comment docs.

uilianries commented 2 years ago

I'll merge it tomorrow, in case you want to comment something before.

ghost commented 2 years ago

Thanks for cleaning up the code and adding those tests. There will be no more changes from my side. Looking forward to the new version.