Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.buildout
Commits
a8e7e41d
Commit
a8e7e41d
authored
Sep 22, 2016
by
André Anjos
💬
Browse files
New improved CI
parent
4a03abfd
Pipeline
#3893
failed with stages
in 40 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a8e7e41d
...
...
@@ -17,71 +17,38 @@ stages:
-
deploy
# Global variables
variables
:
CONDA_PREFIX
:
env
# Template for the build stage
# Needs to run on all supported architectures, platforms and python versions
.build_template
:
&build_job
stage
:
build
before_script
:
-
git clean -ffdx
-
curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/ci/bootstrap.sh" > bootstrap.sh
-
chmod 755 ./bootstrap.sh
-
./bootstrap.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
variables
:
&build_variables
BOB_DOCUMENTATION_SERVER
:
"
http://www.idiap.ch/software/bob/docs/latest/bob/%s/master/"
-
curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > install.sh
-
chmod 755 ./install.sh
-
./install.sh _ci
-
./_ci/before_build.sh
script
:
-
./bin/buildout
-
if [ -x ./bin/bob_dbmanage.py ]; then ./bin/bob_dbmanage.py all download --force; fi
-
./bin/sphinx-build doc sphinx
-
./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG}
-
./_ci/build.sh
after_script
:
-
rm -rf ${CONDA_PREFIX}
-
./_ci/after_build.sh
artifacts
:
expire_in
:
1 day
paths
:
-
bootstrap.sh
-
_ci/
-
dist/
-
sphinx/
# Template for building on a Linux machine
.build_linux_template
:
&linux_build_job
<<
:
*build_job
variables
:
&linux_build_variables
<<
:
*build_variables
CONDA_FOLDER
:
"
/local/conda"
CFLAGS
:
"
-D_GLIBCXX_USE_CXX11_ABI=0
-coverage"
CXXFLAGS
:
"
-D_GLIBCXX_USE_CXX11_ABI=0
-coverage"
# Template for building on a Mac OSX machine
.build_mac_template
:
&macosx_build_job
<<
:
*build_job
variables
:
&macosx_build_variables
<<
:
*build_variables
CONDA_FOLDER
:
"
/opt/conda"
# Template for the test stage - re-install from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions
.test_template
:
&test_job
stage
:
test
before_script
:
-
./bootstrap.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
-
source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX}
-
pip install --no-binary ":all:" zc.recipe.egg
-
pip install --use-wheel --no-index --pre dist/*.whl
-
./_ci/before_test.sh
script
:
-
cd ${CONDA_PREFIX}
-
coverage run --source=${CI_PROJECT_NAME} ./bin/nosetests -sv ${CI_PROJECT_NAME}
-
coverage report
-
sphinx-build -b doctest ../doc ../sphinx
-
./_ci/test.sh
after_script
:
-
rm -rf ${CONDA_PREFIX}
-
./_ci/after_test.sh
# Template for the wheel uploading stage
...
...
@@ -95,10 +62,11 @@ variables:
-
master
-
/^v\d+\.\d+\.\d+([abc]\d*)?$/
# PEP-440 compliant version (tags)
before_script
:
-
curl --silent https://gitlab.idiap.ch/bob/bob.admin/raw/master/ci/wheels.sh > wheels.sh
-
chmod 755 wheels.sh
-
./_ci/before_wheels.sh
script
:
-
./wheels.sh
-
./_ci/wheels.sh
after_script
:
-
./_ci/after_wheels.sh
# Template for (latest) documentation upload stage
...
...
@@ -109,33 +77,28 @@ variables:
only
:
-
master
before_script
:
-
curl --silent https://gitlab.idiap.ch/bob/bob.admin/raw/master/ci/docs.sh > docs.sh
-
chmod 755 docs.sh
-
./_ci/before_docs.sh
script
:
-
./docs.sh
-
./_ci/docs.sh
after_script
:
-
./_ci/after_docs.sh
# Template for the pypi stage - re-install from uploaded wheels
# Needs to run on a single architecture
.deploy_template
:
&deploy_job
stage
:
deploy
environment
:
pypi
environment
:
internet
only
:
-
/^v\d+\.\d+\.\d+([abc]\d*)?$/
# PEP-440 compliant version (tags)
except
:
-
branches
before_script
:
-
./bootstrap.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
-
source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX}
-
pip install --use-wheel --no-index --pre dist/*.whl
-
curl --silent https://gitlab.idiap.ch/bob/bob.admin/raw/master/ci/pypi.sh > pypi.sh
-
chmod 755 pypi.sh
-
./_ci/before_deploy.sh
script
:
-
source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX}
-
./pypi.sh
-
./_ci/deploy.sh
after_script
:
-
rm -rf ~/.pypirc
-
rm -rf ${CONDA_PREFIX}
-
./_ci/after_deply.sh
# 2) Package specific instructions (you may tune this if needed)
...
...
@@ -143,9 +106,8 @@ variables:
# Linux + Python 2.7: Builds, tests, uploads wheel
build_linux_27
:
<<
:
*
linux_
build_job
<<
:
*build_job
variables
:
&linux_27_build_variables
<<
:
*linux_build_variables
PYTHON_VER
:
"
2.7"
WHEEL_TAG
:
"
py27"
tags
:
...
...
@@ -169,9 +131,8 @@ wheels_linux_27:
# Linux + Python 3.4: Builds and tests
build_linux_34
:
<<
:
*
linux_
build_job
<<
:
*build_job
variables
:
&linux_34_build_variables
<<
:
*linux_build_variables
PYTHON_VER
:
"
3.4"
WHEEL_TAG
:
"
py3"
tags
:
...
...
@@ -188,9 +149,8 @@ test_linux_34:
# Linux + Python 3.5: Builds, tests, uploads wheel and deploys
build_linux_35
:
<<
:
*
linux_
build_job
<<
:
*build_job
variables
:
&linux_35_build_variables
<<
:
*linux_build_variables
PYTHON_VER
:
"
3.5"
WHEEL_TAG
:
"
py3"
tags
:
...
...
@@ -220,6 +180,7 @@ docs_linux_35:
deploy_linux_35
:
<<
:
*deploy_job
variables
:
*linux_35_build_variables
dependencies
:
-
build_linux_35
tags
:
...
...
@@ -228,9 +189,8 @@ deploy_linux_35:
# Mac OSX + Python 2.7: Builds and tests
build_macosx_27
:
<<
:
*
macosx_
build_job
<<
:
*build_job
variables
:
&macosx_27_build_variables
<<
:
*macosx_build_variables
PYTHON_VER
:
"
2.7"
WHEEL_TAG
:
"
py27"
tags
:
...
...
@@ -247,9 +207,8 @@ test_macosx_27:
# Mac OSX + Python 3.4: Builds and tests
build_macosx_34
:
<<
:
*
macosx_
build_job
<<
:
*build_job
variables
:
&macosx_34_build_variables
<<
:
*macosx_build_variables
PYTHON_VER
:
"
3.4"
WHEEL_TAG
:
"
py3"
tags
:
...
...
@@ -266,9 +225,8 @@ test_macosx_34:
# Mac OSX + Python 3.5: Builds and tests
build_macosx_35
:
<<
:
*
macosx_
build_job
<<
:
*build_job
variables
:
&macosx_35_build_variables
<<
:
*macosx_build_variables
PYTHON_VER
:
"
3.5"
WHEEL_TAG
:
"
py3"
tags
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment