Commit 4a627b33 authored by André Anjos's avatar André Anjos 💬
Browse files

[ci] Re-use wheels at stages following build, don't rebuild

parent 57109c05
Pipeline #3036 failed with stages
in 23 minutes and 55 seconds
......@@ -33,22 +33,17 @@ variables:
variables: &build_variables
BOB_DOCUMENTATION_SERVER: "http://www.idiap.ch/software/bob/docs/latest/bob/%s/master/"
script:
- BOB_PREFIX_PATH="${CONDA_FOLDER}/envs/`cat ${CONDA_FOLDER}/envs/latest-devel-${PYTHON_VER}.txt`" ./bin/buildout
- ./bin/sphinx-build -b html doc sphinx
- ./bin/buildout
- ./bin/sphinx-build doc sphinx
- ./bin/python setup.py bdist_wheel
after_script:
- rm -rf ${CONDA_PREFIX}
artifacts:
expire_in: 1 day
paths:
- bootstrap-conda.sh
- ${CI_PROJECT_NAME}.egg-info/
- .installed.cfg
- parts/
- bin/
- eggs/
- develop-eggs/
- dist/
- sphinx/
- build/
# Template for building on a Linux machine
......@@ -70,36 +65,23 @@ variables:
CFLAGS: "-pthread -coverage"
# Template for the test stage
# 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-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
- ./bin/buildout -o
- source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX}
- pip install dist/*.whl
script:
- ./bin/python -c "from ${CI_PROJECT_NAME} import get_config; print(get_config())"
- ./bin/coverage run --source=${CI_PROJECT_NAME} ./bin/nosetests -sv ${CI_PROJECT_NAME}
- ./bin/coverage report
- ./bin/sphinx-build -b doctest doc sphinx
- python -c "from ${CI_PROJECT_NAME} import get_config; print(get_config())"
- coverage run --source=${CI_PROJECT_NAME} ./bin/nosetests -sv ${CI_PROJECT_NAME}
- coverage report
- sphinx-build -b doctest doc sphinx
after_script:
- rm -rf ${CONDA_PREFIX}
# Template for testing on a Linux machine
.test_linux_template: &linux_test_job
<<: *test_job
variables:
<<: *linux_build_variables
# Template for testing on a Mac OSX machine
.test_mac_template: &macosx_test_job
<<: *test_job
variables:
<<: *macosx_build_variables
# Template for the wheel uploading stage
# Needs to run against one combination of python 2.x and 3.x if it is a python
# only package, otherwise, needs to run in both pythons to all supported
......@@ -109,57 +91,27 @@ variables:
only:
- master
- tags
before_script:
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
- ./bin/buildout -o
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/8/raw | tr -d '\r' > upload-wheel.sh
- chmod 755 upload-wheel.sh
script:
- ./upload-wheel.sh
after_script:
- rm -rf ${CONDA_PREFIX}
# Template for making wheels on a Linux machine
.wheels_linux_template: &linux_wheels_job
<<: *wheels_job
variables:
<<: *linux_build_variables
# Template for making wheels on a Mac OSX machine
.wheels_mac_template: &macosx_wheels_job
<<: *wheels_job
variables:
<<: *macosx_build_variables
- curl --silent --insecure --upload-file dist/*.whl https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/wheels-upload/gitlab/
# Template for (latest) documentation upload stage
# Only one real job needs to do this (normally, the latest python on OSX)
# Only one real job needs to do this
.docs_template: &docs_job
stage: docs
only:
- master
before_script:
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/9/raw | tr -d '\r' > upload-sphinx.sh
- chmod 755 upload-sphinx.sh
script:
- ./upload-sphinx.sh
- echo "repo=${CI_PROJECT_PATH}" > sphinx/.gitlab-ci.info
- echo "branch=${CI_BUILD_REF_NAME}" >> sphinx/.gitlab-ci.info
- echo "tag=${CI_BUILD_TAG}" >> sphinx/.gitlab-ci.info
- echo "build=${CI_BUILD_ID}" >> sphinx/.gitlab-ci.info
- echo "commit=${CI_BUILD_REF}" >> sphinx/.gitlab-ci.info
- echo "runner=${CI_RUNNER_DESCRIPTION}" >> sphinx/.gitlab-ci.info
- tar cfj ${CI_PROJECT_NAME}-${CI_BUILD_REF}.tar.bz2 sphinx
- curl --silent --insecure --upload-file *.tar.bz2 https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/docs-upload/
# Template for uploading docs on a Linux machine
.docs_linux_template: &linux_docs_job
<<: *docs_job
variables:
<<: *linux_build_variables
# Template for uploading docs on a Mac OSX machine
.docs_mac_template: &macosx_docs_job
<<: *docs_job
variables:
<<: *macosx_build_variables
# 2) Package specific instructions (you may tune this if needed)
# --------------------------------------------------------------
......@@ -174,7 +126,7 @@ build_linux_27:
- conda-linux
test_linux_27:
<<: *linux_test_job
<<: *test_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
......@@ -182,8 +134,7 @@ test_linux_27:
- conda-linux
wheels_linux_27:
<<: *linux_wheels_job
variables: *linux_27_build_variables
<<: *wheels_job
dependencies:
- build_linux_27
tags:
......@@ -200,7 +151,7 @@ build_linux_34:
- conda-linux
test_linux_34:
<<: *linux_test_job
<<: *test_job
variables: *linux_34_build_variables
dependencies:
- build_linux_34
......@@ -208,8 +159,7 @@ test_linux_34:
- conda-linux
wheels_linux_34:
<<: *linux_wheels_job
variables: *linux_34_build_variables
<<: *wheels_job
dependencies:
- build_linux_34
tags:
......@@ -226,7 +176,7 @@ build_linux_35:
- conda-linux
test_linux_35:
<<: *linux_test_job
<<: *test_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
......@@ -234,15 +184,14 @@ test_linux_35:
- conda-linux
wheels_linux_35:
<<: *linux_wheels_job
variables: *linux_35_build_variables
<<: *wheels_job
dependencies:
- build_linux_35
tags:
- conda-linux
docs_linux_35:
<<: *linux_docs_job
<<: *docs_job
dependencies:
- build_linux_35
tags:
......@@ -259,7 +208,7 @@ build_macosx_27:
- conda-macosx
test_macosx_27:
<<: *macosx_test_job
<<: *test_job
variables: *macosx_27_build_variables
dependencies:
- build_macosx_27
......@@ -267,8 +216,7 @@ test_macosx_27:
- conda-macosx
wheels_macosx_27:
<<: *macosx_wheels_job
variables: *macosx_27_build_variables
<<: *wheels_job
dependencies:
- build_macosx_27
tags:
......@@ -285,7 +233,7 @@ build_macosx_34:
- conda-macosx
test_macosx_34:
<<: *macosx_test_job
<<: *test_job
variables: *macosx_34_build_variables
dependencies:
- build_macosx_34
......@@ -293,8 +241,7 @@ test_macosx_34:
- conda-macosx
wheels_macosx_34:
<<: *macosx_wheels_job
variables: *macosx_34_build_variables
<<: *wheels_job
dependencies:
- build_macosx_34
tags:
......@@ -311,7 +258,7 @@ build_macosx_35:
- conda-macosx
test_macosx_35:
<<: *macosx_test_job
<<: *test_job
variables: *macosx_35_build_variables
dependencies:
- build_macosx_35
......@@ -319,8 +266,7 @@ test_macosx_35:
- conda-macosx
wheels_macosx_35:
<<: *macosx_wheels_job
variables: *macosx_35_build_variables
<<: *wheels_job
dependencies:
- build_macosx_35
tags:
......
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