Commit 0a40ce39 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[build] use mambabuild instead of conda-build

parent ad19e9c7
Pipeline #54652 failed with stage
in 2 minutes and 5 seconds
......@@ -222,10 +222,20 @@ def get_output_path(metadata, config):
return conda_build.api.get_output_file_paths(metadata, config=config)
def use_mambabuild():
"""Will inject mamba solver to conda build API to speed up resolves"""
# only importing this module will do the job.
from boa.cli.mambabuild import prepare
prepare()
def get_rendered_metadata(recipe_dir, config):
"""Renders the recipe and returns the interpreted YAML file."""
with root_logger_protection():
# use mambabuild instead
use_mambabuild()
return conda_build.api.render(recipe_dir, config=config)
......@@ -697,6 +707,7 @@ def base_build(
# if you get to this point, just builds the package(s)
logger.info("Building %s", recipe_dir)
with root_logger_protection():
use_mambabuild()
return conda_build.api.build(recipe_dir, config=conda_config)
......
......@@ -20,6 +20,7 @@ from ..build import (
next_build_number,
root_logger_protection,
should_skip_build,
use_mambabuild,
)
from ..constants import (
BASE_CONDARC,
......@@ -264,9 +265,9 @@ def build(
rendered_recipe = get_parsed_recipe(metadata)
logger.debug("Printing rendered recipe")
logger.debug("\n" + yaml.dump(rendered_recipe))
logger.debug("Finished printing rendered recipe")
logger.info("Printing rendered recipe")
logger.info("\n" + yaml.dump(rendered_recipe))
logger.info("Finished printing rendered recipe")
path = get_output_path(metadata, conda_config)[0]
# gets the next build number
......@@ -288,6 +289,7 @@ def build(
# get it right
set_environment("BOB_BUILD_NUMBER", str(build_number))
with root_logger_protection():
use_mambabuild()
paths = conda_build.api.build(
d, config=conda_config, notest=no_test
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment