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

[question] How to detect we're running on c3i? #5429

Closed
madebr opened this issue May 4, 2021 · 7 comments
Closed

[question] How to detect we're running on c3i? #5429

madebr opened this issue May 4, 2021 · 7 comments
Labels
infrastructure Waiting on tools or services belonging to the infra question Further information is requested

Comments

@madebr
Copy link
Contributor

madebr commented May 4, 2021

We're having a lot of problems with building boost packages on c3i.
See e.g. #5420

Often the boost build fails because the test_package is built with a too high parallelism.
The logs contain the line:

MSBUILD : error MSB4166: Child node "6" exited prematurely. Shutting down. Diagnostic information may be found in files in "C:\J\w\BuildSingleReference@7\10837\d953e04c-152c-463f-8164-f2a7e5bf2b0f\" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
  locale.cpp

I think it would be useful to detect we're running on c3i/ci and if so, lower the level of parallelism.
e.g.

cmake = CMake(self)
cmake.configure()
if tools.get_env("CI_C3I"):
    cmake.parallel = False
cmake.build()

What do you think?

@madebr madebr added the question Further information is requested label May 4, 2021
@jgsogo
Copy link
Contributor

jgsogo commented May 18, 2021

I would vote to hide this in the config.yml file instead of modifying the recipe.

What about...?

config.yml

versions:
    1.69.0:
      folder: all
    1.70.0:
      folder: all
config:
  env:
     CPU_COUNT: 1  # Will translate to CONAN_CPU_COUNT

or

versions:
    1.69.0:
      folder: all
      env:
        CPU_COUNT: 1  # Will translate to CONAN_CPU_COUNT
    1.70.0:
      folder: all 
      env:
        CPU_COUNT: 1  # Will translate to CONAN_CPU_COUNT
  • It will require to develop this feature in the c3i library (not so complicated)
  • Probably we need to filter variables that are available and values, just in case.

ping @danimtb

@jgsogo jgsogo added the infrastructure Waiting on tools or services belonging to the infra label May 18, 2021
@uilianries
Copy link
Member

Why not default Conan env vars, like CONAN_CPU_COUNT? So we don't need to parse, only forward. Of course, we would need a filter to allow only specific env vars, otherwise people can do a mess in CCI.

@madebr
Copy link
Contributor Author

madebr commented May 18, 2021

Building boost in parallel is not causing problems, only the test_package.
So it would be nice to lower the parallelism only there.

@jgsogo
Copy link
Contributor

jgsogo commented May 18, 2021

@uilianries , yes, before thinking about filtering, I thought about pretending always CONAN_ so people cannot set random environment variables. I will update my message so it is not misleading.

@jgsogo
Copy link
Contributor

jgsogo commented May 18, 2021

@madebr , if it is only for the test_package, why not avoiding parallelism always? It shouldn't take much more to build.

@madebr
Copy link
Contributor Author

madebr commented May 18, 2021

That is what I've done in #5420.
Since then, the builds are failing much less.
I was wondering whether that was the correct approach.

@uilianries
Copy link
Member

Closing this issue due the new redesigned ConanCenterIndex CI service.

Please, read #25772 for further information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Waiting on tools or services belonging to the infra question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants