Commit 23ee3fbe authored by André Anjos's avatar André Anjos 💬

[ci] New CI infrastructure

parent dc10643b
Pipeline #26054 failed
......@@ -17,15 +17,13 @@ stages:
.build_template: &build_job
stage: build
before_script:
- mkdir _ci
- curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- chmod 755 _ci/install.sh
- ./_ci/install.sh _ci master #installs ci support scripts
- ./_ci/before_build.sh
- [ -z "${CI_COMMIT_TAG}" ] && stability="beta" || stability="stable"
- curl --silent "${BOOTSTRAP}" --output "bootstrap.py"
- python3 bootstrap.py "${stability}" myenv
script:
- ./_ci/build.sh
after_script:
- ./_ci/after_build.sh
- source ${CONDA_ROOT}/etc/profile.d/conda.sh
- conda activate myenv
- bdt ci build -vv
cache: &build_caches
paths:
- miniconda.sh
......@@ -85,19 +83,27 @@ build_macosx_36:
# Deploy targets
.deploy_template: &deploy_job
stage: deploy
before_script:
- ./_ci/install.sh _ci master #updates ci support scripts
script:
- ./_ci/deploy.sh
- source ${CONDA_ROOT}/etc/profile.d/conda.sh
- conda activate myenv
- bdt ci deploy -vv
dependencies:
- build_linux_36
- build_macosx_36
tags:
- deployer
- docker
cache: &build_caches
paths:
- miniconda.sh
- ${CONDA_ROOT}/pkgs/*.tar.bz2
- ${CONDA_ROOT}/pkgs/urls.txt
deploy_beta:
<<: *deploy_job
before_script:
- curl --silent "${BOOTSTRAP}" --output "bootstrap.py"
- python3 bootstrap.py beta myenv
environment: beta
only:
- master
......@@ -105,6 +111,9 @@ deploy_beta:
deploy_stable:
<<: *deploy_job
before_script:
- curl --silent "${BOOTSTRAP}" --output "bootstrap.py"
- python3 bootstrap.py stable myenv
environment: stable
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
......@@ -120,10 +129,14 @@ pypi:
except:
- branches
before_script:
- ./_ci/install.sh _ci master #updates ci support scripts
- curl --silent "${BOOTSTRAP}" --output "bootstrap.py"
- python3 bootstrap.py stable myenv
script:
- ./_ci/pypi.sh
- source ${CONDA_ROOT}/etc/profile.d/conda.sh
- conda activate myenv
- bdt ci pypi -vv
dependencies:
- build_linux_36
- build_macosx_36
tags:
- deployer
- docker
......@@ -15,6 +15,12 @@ build:
- python setup.py sdist --formats=zip
{% endif %}
- python setup.py install --single-version-externally-managed --record record.txt
# installs the documentation source, readme and license to share/doc
# so it is available during test time
- install -d ${PREFIX}/share/doc/{{ name }}
- install -m 644 -D README.rst ${PREFIX}/share/doc/{{ name }}
- install -m 644 -D LICENSE ${PREFIX}/share/doc/{{ name }}
- find doc -type f -exec install -m 644 -D "{}" "${PREFIX}/share/doc/{{ name }}/{}" \;
requirements:
host:
......@@ -36,8 +42,8 @@ test:
- {{ name }}
commands:
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }}
- sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
- sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest ${PREFIX}/share/doc/{{ name }}/doc sphinx
- conda inspect linkages -p $PREFIX {{ name }} # [not win]
- conda inspect objects -p $PREFIX {{ name }} # [osx]
requires:
......
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