Commit 80031cdd authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Update the CI template [skip ci]

parent 2a222bef
Pipeline #16499 skipped
# This build file heavily uses template features from YAML so it is generic # This build file uses template features from YAML so it is generic enough for
# enough for any Bob project. Don't modify it unless you know what you're # any Bob project. Don't modify it unless you know what you're doing.
# doing.
# Definition of global variables (all stages)
variables:
CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
# Definition of our build pipeline
# Definition of our build pipeline order
stages: stages:
- build - build
- test
- docs
- wheels
- deploy - deploy
- pypi
# --------- # Build targets
# Templates
# ---------
# Template for the build stage
# Needs to run on all supported architectures, platforms and python versions
.build_template: &build_job .build_template: &build_job
stage: build stage: build
before_script: before_script:
- git clean -ffdx
- mkdir _ci - mkdir _ci
- curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- chmod 755 _ci/install.sh - chmod 755 _ci/install.sh
- ./_ci/install.sh _ci #updates - ./_ci/install.sh _ci master #installs ci support scripts
- ./_ci/before_build.sh - ./_ci/before_build.sh
script: script:
- ./_ci/build.sh - ./_ci/build.sh
after_script: after_script:
- ./_ci/after_build.sh - ./_ci/after_build.sh
cache: &build_caches
paths:
- miniconda.sh
- ${CONDA_ROOT}/pkgs/*.tar.bz2
- ${CONDA_ROOT}/pkgs/urls.txt
.build_linux_template: &linux_build_job
<<: *build_job
tags:
- docker
image: continuumio/conda-concourse-ci
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- _ci/ - _ci/
- dist/ - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
- sphinx/ cache:
<<: *build_caches
key: "linux-cache"
# Template for the test stage - re-installs from uploaded wheels .build_macosx_template: &macosx_build_job
# Needs to run on all supported architectures, platforms and python versions <<: *build_job
.test_template: &test_job tags:
stage: test - macosx
before_script: artifacts:
- ./_ci/install.sh _ci #updates expire_in: 1 week
- ./_ci/before_test.sh paths:
script: - _ci/
- ./_ci/test.sh - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
after_script: cache:
- ./_ci/after_test.sh <<: *build_caches
key: "macosx-cache"
# Template for the wheel uploading stage build_linux_27:
# Needs to run against one supported architecture, platform and python version <<: *linux_build_job
.wheels_template: &wheels_job variables:
stage: wheels PYTHON_VERSION: "2.7"
environment: intranet
only:
- master
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_wheels.sh
script:
- ./_ci/wheels.sh
after_script:
- ./_ci/after_wheels.sh
# Template for (latest) documentation upload stage build_linux_36:
# Only one real job needs to do this <<: *linux_build_job
.docs_template: &docs_job variables:
stage: docs PYTHON_VERSION: "3.6"
environment: intranet BUILD_EGG: "true"
only: artifacts:
- master expire_in: 1 week
before_script: paths:
- ./_ci/install.sh _ci #updates - _ci/
- ./_ci/before_docs.sh - dist/*.zip
script: - sphinx
- ./_ci/docs.sh - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
after_script:
- ./_ci/after_docs.sh
build_macosx_27:
<<: *macosx_build_job
variables:
PYTHON_VERSION: "2.7"
build_macosx_36:
<<: *macosx_build_job
variables:
PYTHON_VERSION: "3.6"
# Template for the deployment stage - re-installs from uploaded wheels
# Needs to run on a single architecture only # Deploy targets
# Will deploy your package to PyPI and other required services
# Only runs for tags
.deploy_template: &deploy_job .deploy_template: &deploy_job
stage: deploy stage: deploy
environment: internet
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
before_script: before_script:
- ./_ci/install.sh _ci #updates - ./_ci/install.sh _ci master #updates ci support scripts
- ./_ci/before_deploy.sh
script: script:
- ./_ci/deploy.sh - ./_ci/deploy.sh
after_script:
- ./_ci/after_deploy.sh
# -------------
# Build Targets
# -------------
# Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed)
build_linux_27:
<<: *build_job
variables: &linux_27_build_variables
PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-linux
test_linux_27:
<<: *test_job
variables: *linux_27_build_variables
dependencies: dependencies:
- build_linux_27 - build_linux_27
- build_linux_36
- build_macosx_27
- build_macosx_36
tags: tags:
- conda-linux - deployer
wheels_linux_27:
<<: *wheels_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
deploy_linux_27: deploy_beta:
<<: *deploy_job <<: *deploy_job
variables: *linux_27_build_variables environment: beta
dependencies: only:
- build_linux_27 - master
tags:
- conda-linux
# Linux + Python 3.5: Builds, tests and uploads wheel
build_linux_35:
<<: *build_job
variables: &linux_35_build_variables
PYTHON_VERSION: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_35:
<<: *test_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
wheels_linux_35:
<<: *wheels_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
docs_linux_35:
<<: *docs_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
deploy_stable:
<<: *deploy_job
environment: stable
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
# Linux + Python 3.6: Builds and tests
build_linux_36:
<<: *build_job
variables: &linux_36_build_variables
PYTHON_VERSION: "3.6"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_36: pypi:
<<: *test_job stage: pypi
variables: *linux_36_build_variables environment: pypi
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
before_script:
- ./_ci/install.sh _ci master #updates ci support scripts
script:
- ./_ci/pypi.sh
dependencies: dependencies:
- build_linux_36 - build_linux_36
tags: tags:
- conda-linux - deployer
\ No newline at end of file
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