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
10270e4e
Commit
10270e4e
authored
3 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts.ci] Fix nightly checks
parent
b54ffbe0
No related branches found
No related tags found
No related merge requests found
Pipeline
#53049
passed
3 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/devtools/ci.py
+25
-0
25 additions, 0 deletions
bob/devtools/ci.py
bob/devtools/data/gitlab-ci/nightlies.yaml
+5
-2
5 additions, 2 deletions
bob/devtools/data/gitlab-ci/nightlies.yaml
bob/devtools/scripts/ci.py
+4
-2
4 additions, 2 deletions
bob/devtools/scripts/ci.py
with
34 additions
and
4 deletions
bob/devtools/ci.py
+
25
−
0
View file @
10270e4e
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
"""
Tools to help CI-based builds and artifact deployment.
"""
"""
Tools to help CI-based builds and artifact deployment.
"""
import
contextlib
import
distutils.version
import
distutils.version
import
os
import
git
import
git
...
@@ -295,3 +297,26 @@ def cleanup(dry_run, username, password, includes):
...
@@ -295,3 +297,26 @@ def cleanup(dry_run, username, password, includes):
pyver
=
True
,
pyver
=
True
,
includes
=
includes
,
includes
=
includes
,
)
)
@contextlib.contextmanager
def
temporary_cwd
(
path
):
"""
Temporarily changes the working directory to a given path
A context manager that temporarily changes the path to the given directory.
The working directory changes the working directory back to the starting
directory when it exits.
Args:
path: The directory to temporarily change to
"""
oldpwd
=
os
.
getcwd
()
os
.
chdir
(
path
)
try
:
yield
finally
:
os
.
chdir
(
oldpwd
)
This diff is collapsed.
Click to expand it.
bob/devtools/data/gitlab-ci/nightlies.yaml
+
5
−
2
View file @
10270e4e
...
@@ -6,7 +6,8 @@ variables:
...
@@ -6,7 +6,8 @@ variables:
PYTHONUNBUFFERED
:
"
1"
PYTHONUNBUFFERED
:
"
1"
CONDA_ROOT
:
"
${CI_PROJECT_DIR}/miniconda"
CONDA_ROOT
:
"
${CI_PROJECT_DIR}/miniconda"
BOOTSTRAP
:
"
https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/bootstrap.py"
BOOTSTRAP
:
"
https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/bootstrap.py"
TORCH_HOME
:
"
${CI_PROJECT_DIR}/torch"
TORCH_HOME
:
"
${CI_PROJECT_DIR}/.cache/torch"
PRE_COMMIT_HOME
:
"
${CI_PROJECT_DIR}/.cache/pre-commit"
# Definition of our build pipeline order
# Definition of our build pipeline order
...
@@ -26,7 +27,9 @@ stages:
...
@@ -26,7 +27,9 @@ stages:
-
conda activate base
-
conda activate base
cache
:
cache
:
paths
:
paths
:
-
torch
-
miniconda.sh
-
${TORCH_HOME}
-
${PRE_COMMIT_HOME}
# Build targets
# Build targets
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
4
−
2
View file @
10270e4e
...
@@ -19,6 +19,7 @@ from ..ci import (
...
@@ -19,6 +19,7 @@ from ..ci import (
select_conda_build_config
,
select_conda_build_config
,
select_conda_recipe_append
,
select_conda_recipe_append
,
select_user_condarc
,
select_user_condarc
,
temporary_cwd
,
)
)
from
..constants
import
BASE_CONDARC
,
SERVER
from
..constants
import
BASE_CONDARC
,
SERVER
from
..deploy
import
deploy_conda_package
,
deploy_documentation
from
..deploy
import
deploy_conda_package
,
deploy_documentation
...
@@ -730,8 +731,9 @@ def nightlies(ctx, order, dry_run):
...
@@ -730,8 +731,9 @@ def nightlies(ctx, order, dry_run):
)
)
logger
.
info
(
"
Conda build recipe-append file: %s
"
,
append_file
)
logger
.
info
(
"
Conda build recipe-append file: %s
"
,
append_file
)
logger
.
info
(
"
Running checks
"
)
logger
.
info
(
"
Running checks...
"
)
ctx
.
invoke
(
check
,
root
=
clone_to
)
with
temporary_cwd
(
clone_to
):
ctx
.
invoke
(
check
)
logger
.
info
(
"
Building
"
)
logger
.
info
(
"
Building
"
)
ctx
.
invoke
(
ctx
.
invoke
(
...
...
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