Commit 7bcc1d1a authored by André Anjos's avatar André Anjos 💬
Browse files

Merge branch 'new_ci' into 'master'

New ci



See merge request !17
parents e22a43ec ea483c46
Pipeline #3899 failed with stages
in 46 minutes and 9 seconds
......@@ -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,10 +106,9 @@ 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"
PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-linux
......@@ -169,10 +131,9 @@ 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"
PYTHON_VERSION: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-linux
......@@ -188,10 +149,9 @@ 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"
PYTHON_VERSION: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-linux
......@@ -220,6 +180,7 @@ docs_linux_35:
deploy_linux_35:
<<: *deploy_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
......@@ -228,10 +189,9 @@ 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"
PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-macosx
......@@ -247,10 +207,9 @@ 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"
PYTHON_VERSION: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-macosx
......@@ -266,10 +225,9 @@ 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"
PYTHON_VERSION: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-macosx
......
Markdown is supported
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