Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
0a40ce39
Commit
0a40ce39
authored
3 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
[build] use mambabuild instead of conda-build
parent
ad19e9c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!249
Use Mamba and Boa in the CI
Pipeline
#54652
failed
3 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/build.py
+11
-0
11 additions, 0 deletions
bob/devtools/build.py
bob/devtools/scripts/build.py
+5
-3
5 additions, 3 deletions
bob/devtools/scripts/build.py
with
16 additions
and
3 deletions
bob/devtools/build.py
+
11
−
0
View file @
0a40ce39
...
@@ -222,10 +222,20 @@ def get_output_path(metadata, config):
...
@@ -222,10 +222,20 @@ def get_output_path(metadata, config):
return
conda_build
.
api
.
get_output_file_paths
(
metadata
,
config
=
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
):
def
get_rendered_metadata
(
recipe_dir
,
config
):
"""
Renders the recipe and returns the interpreted YAML file.
"""
"""
Renders the recipe and returns the interpreted YAML file.
"""
with
root_logger_protection
():
with
root_logger_protection
():
# use mambabuild instead
use_mambabuild
()
return
conda_build
.
api
.
render
(
recipe_dir
,
config
=
config
)
return
conda_build
.
api
.
render
(
recipe_dir
,
config
=
config
)
...
@@ -697,6 +707,7 @@ def base_build(
...
@@ -697,6 +707,7 @@ def base_build(
# if you get to this point, just builds the package(s)
# if you get to this point, just builds the package(s)
logger
.
info
(
"
Building %s
"
,
recipe_dir
)
logger
.
info
(
"
Building %s
"
,
recipe_dir
)
with
root_logger_protection
():
with
root_logger_protection
():
use_mambabuild
()
return
conda_build
.
api
.
build
(
recipe_dir
,
config
=
conda_config
)
return
conda_build
.
api
.
build
(
recipe_dir
,
config
=
conda_config
)
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/build.py
+
5
−
3
View file @
0a40ce39
...
@@ -20,6 +20,7 @@ from ..build import (
...
@@ -20,6 +20,7 @@ from ..build import (
next_build_number
,
next_build_number
,
root_logger_protection
,
root_logger_protection
,
should_skip_build
,
should_skip_build
,
use_mambabuild
,
)
)
from
..constants
import
(
from
..constants
import
(
BASE_CONDARC
,
BASE_CONDARC
,
...
@@ -264,9 +265,9 @@ def build(
...
@@ -264,9 +265,9 @@ def build(
rendered_recipe
=
get_parsed_recipe
(
metadata
)
rendered_recipe
=
get_parsed_recipe
(
metadata
)
logger
.
debug
(
"
Printing rendered recipe
"
)
logger
.
info
(
"
Printing rendered recipe
"
)
logger
.
debug
(
"
\n
"
+
yaml
.
dump
(
rendered_recipe
))
logger
.
info
(
"
\n
"
+
yaml
.
dump
(
rendered_recipe
))
logger
.
debug
(
"
Finished printing rendered recipe
"
)
logger
.
info
(
"
Finished printing rendered recipe
"
)
path
=
get_output_path
(
metadata
,
conda_config
)[
0
]
path
=
get_output_path
(
metadata
,
conda_config
)[
0
]
# gets the next build number
# gets the next build number
...
@@ -288,6 +289,7 @@ def build(
...
@@ -288,6 +289,7 @@ def build(
# get it right
# get it right
set_environment
(
"
BOB_BUILD_NUMBER
"
,
str
(
build_number
))
set_environment
(
"
BOB_BUILD_NUMBER
"
,
str
(
build_number
))
with
root_logger_protection
():
with
root_logger_protection
():
use_mambabuild
()
paths
=
conda_build
.
api
.
build
(
paths
=
conda_build
.
api
.
build
(
d
,
config
=
conda_config
,
notest
=
no_test
d
,
config
=
conda_config
,
notest
=
no_test
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment