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

refactor: Use environments to install Conan #10127

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

heliocastro
Copy link
Contributor

  • Move previous conan/conan2 naming approach to Python environment solution. A wrapper that detects CONAN_SERIES environment var switchis between the two release series. Defaults to CONAN_SERIES=2.

  • Enable profile creation support by default Passing environment var CONAN_CREATE_PROFILE=false will prevent to generate a default profile.

This is somehow how it works:

Kapture 2025-04-03 at 15 48 52

Comment on lines +181 to +191
RUN eval "$(pyenv init - bash)" \
&& eval "$(pyenv virtualenv-init -)" \
&& pyenv virtualenv conan \
&& pyenv activate conan \
&& pip install conan==${CONAN_VERSION} \
&& pyenv deactivate \
&& pyenv virtualenv conan2 \
&& pyenv activate conan2 \
&& pip install conan==${CONAN2_VERSION} \
&& pyenv deactivate \
&& sudo chmod +x ${PYENV_ROOT}/bin/conan

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: pipCommand not pinned by hash
Click Remediation section below to solve this issue
Comment on lines +181 to +191
RUN eval "$(pyenv init - bash)" \
&& eval "$(pyenv virtualenv-init -)" \
&& pyenv virtualenv conan \
&& pyenv activate conan \
&& pip install conan==${CONAN_VERSION} \
&& pyenv deactivate \
&& pyenv virtualenv conan2 \
&& pyenv activate conan2 \
&& pip install conan==${CONAN2_VERSION} \
&& pyenv deactivate \
&& sudo chmod +x ${PYENV_ROOT}/bin/conan

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: pipCommand not pinned by hash
Click Remediation section below to solve this issue
@heliocastro heliocastro force-pushed the feat/one_conan_to_rule_then_all branch from aa2e6e1 to 17e8541 Compare April 3, 2025 14:40
@heliocastro heliocastro self-assigned this Apr 3, 2025
@heliocastro heliocastro added the docker About Docker topics label Apr 3, 2025
@heliocastro heliocastro requested a review from nnobelis April 3, 2025 14:41
@heliocastro heliocastro force-pushed the feat/one_conan_to_rule_then_all branch from 17e8541 to 6953358 Compare April 3, 2025 14:59
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.59%. Comparing base (f105df0) to head (d95e56a).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #10127   +/-   ##
=========================================
  Coverage     69.59%   69.59%           
  Complexity     1454     1454           
=========================================
  Files           270      270           
  Lines          9670     9670           
  Branches       1029     1029           
=========================================
  Hits           6730     6730           
  Misses         2488     2488           
  Partials        452      452           
Flag Coverage Δ
funTest-non-docker 33.32% <ø> (ø)
test-ubuntu-24.04 39.13% <ø> (ø)
test-windows-2022 39.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@heliocastro heliocastro force-pushed the feat/one_conan_to_rule_then_all branch 2 times, most recently from 9a52c9c to 7ecc19b Compare April 4, 2025 06:22
@nnobelis nnobelis force-pushed the feat/one_conan_to_rule_then_all branch 2 times, most recently from c4ad09c to 5976150 Compare April 10, 2025 11:20
@nnobelis
Copy link
Member

@heliocastro I did the changes. Could you please have a look ?

Among other, I removed the echos in the script, as it broke the integration (ORT parses the output of the Conan command).
I also put a recursivity protection, as I crashed my laptop 3 times running out of processes 😆

@sschuberth Is it normal the commits are marked as "unverified" ? There are both Helio's and my signature in the commit messages.

@nnobelis nnobelis force-pushed the feat/one_conan_to_rule_then_all branch from 5976150 to d98bb1e Compare April 10, 2025 11:33
heliocastro and others added 4 commits April 10, 2025 13:37
- Move previous conan/conan2 naming approach to Python environment
  solution.
  A wrapper that detects CONAN_SERIES environment var switchis between the
  two release series. Defaults to CONAN_SERIES=2.

- Enable profile creation support by default
  Passing environment var CONAN_CREATE_PROFILE=false will prevent to
  generate a default profile.

Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Nicolas Nobelis <[email protected]>
…efault

This new profile is created with `-detect` therefore it will contains the
compilation flags. This is cleaner as it allows to remove the passing of
the compilation flags from the package manager. It also fix the usage of
Conan on non-Linux plaforms.

Signed-off-by: Nicolas Nobelis <[email protected]>
- Remove DUMMY_COMPILER_SETTINGS from plugin code as breaks any
  non-linux systems.

Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Nicolas Nobelis <[email protected]>
@nnobelis nnobelis force-pushed the feat/one_conan_to_rule_then_all branch from d98bb1e to d95e56a Compare April 10, 2025 11:37
@sschuberth
Copy link
Member

@sschuberth Is it normal the commits are marked as "unverified" ? There are both Helio's and my signature in the commit messages.

Yes, it's normal, as "unverified" refers to cryptographically signing commits, not the Signed-off-by footer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker About Docker topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants