-
Notifications
You must be signed in to change notification settings - Fork 56
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
Multiple build with boa #308
Comments
Hi @ffirmanff thanks for the kind words! Indeed, I have an open PR to tackle this here: #261 I haven't yet gotten around to finish it -- if you have cycles to put into this that would be awesome. You can do it today with a simple script that would change the YAML file (it's very easy to manipulate because it's proper YAML :) One reason for changing some of the logic is that conda-build is evaluating the recipes recursively which makes it really slow. However, I think we could make this jinja-variant logic work without having to go down real recursions. |
Happy to contribute @wolfv !
What is the best way to do this? (apology if I have the terms wrong)
|
Awesome, yes, I think those were exactly the problems that I was hitting. I think I was attempting to keep the un-evaluated jinja in a adapted string, and then apply it with the variant evaluation. But it feels like we need another "loop" where we first check the recipe for all used jinja variables. The easiest would be to use "regular" jinja to insert those in the "text" form of the recipe (instead of carrying them with us in that modified string. I think we can add a step where we try to find the jinja variables, then add them to the context and render the recipe as normal, execute the build, and repeat for other jinja options. |
^ That would be different from what I've attempted in #261 but maybe more straightforward to implement. |
Sorry haven't had a chance to look into this, been a bit tied up at work, but will hopefully come back next week. |
First off, hats off to @wolfv and other mamba/boa project members. This is a huge improvements in developer quality of life vs conda build.
I have a requirement to create multiple C++ builds in our pipeline using boa (e.g. build vs debug, static vs dynamic).
With
conda build
, I can specify the variants in theconda_build_config.yaml
file like such:I can reference the buildtype as a variable in
meta.yaml
file directly like so:Conda build will take the vars and update the recipe accordingly.
However, if I were to do the same in boa's
recipe.yaml
, I find that the variables from theconda_build_config.yaml
are not accessible, and really only useable as version references for packages that matched the variable name.Peeking through the codes, seems boa parses out the
recipe.yaml
alone (without using any values from the variants), and replaces non-matching jinja2 variables with blank. Only later is the variants fromconda_build_config.yaml
used to apply the versions against matching packages.The text was updated successfully, but these errors were encountered: