diff --git a/bob/devtools/data/gitlab-ci.yaml b/bob/devtools/data/gitlab-ci.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35e963dbd80c29a5192e70ad1b136fe4440972f6 --- /dev/null +++ b/bob/devtools/data/gitlab-ci.yaml @@ -0,0 +1,138 @@ +# This YAML file contains descriptions for the CI of most of our Bob/BEAT/BATL +# packages - do **not** modify it unless you know what you're doing (and up +# to!) + +# Definition of global variables (all stages) +variables: + CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda" + + +# Definition of our build pipeline order +stages: + - build + - deploy + - pypi + + +# Build targets +.build_template: &build_job + stage: build + before_script: + - curl --silent "${BOOTSTRAP}" --output "bootstrap.py" + - python3 bootstrap.py channel bdt + script: + - source ${CONDA_ROOT}/etc/profile.d/conda.sh + - conda activate bdt + - bdt ci build -vv + - bdt ci clean -vv + 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: + expire_in: 1 week + paths: + - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2 + cache: + <<: *build_caches + key: "linux-cache" + + +.build_macosx_template: &macosx_build_job + <<: *build_job + tags: + - macosx + artifacts: + expire_in: 1 week + paths: + - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2 + cache: + <<: *build_caches + key: "macosx-cache" + + +build_linux_36: + <<: *linux_build_job + variables: + PYTHON_VERSION: "3.6" + BUILD_EGG: "true" + artifacts: + expire_in: 1 week + paths: + - dist/*.zip + - sphinx + - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2 + + +build_macosx_36: + <<: *macosx_build_job + variables: + PYTHON_VERSION: "3.6" + + +# Deploy targets +.deploy_template: &deploy_job + stage: deploy + before_script: + - curl --silent "${BOOTSTRAP}" --output "bootstrap.py" + - python3 bootstrap.py channel bdt + script: + - source ${CONDA_ROOT}/etc/profile.d/conda.sh + - conda activate bdt + - bdt ci deploy -vv + - bdt ci clean -vv + dependencies: + - build_linux_36 + - build_macosx_36 + tags: + - docker + cache: &build_caches + paths: + - miniconda.sh + - ${CONDA_ROOT}/pkgs/*.tar.bz2 + - ${CONDA_ROOT}/pkgs/urls.txt + + +deploy_beta: + <<: *deploy_job + environment: beta + only: + - master + + +deploy_stable: + <<: *deploy_job + environment: stable + only: + - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) + except: + - branches + + +pypi: + stage: pypi + environment: pypi + only: + - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) + except: + - branches + before_script: + - curl --silent "${BOOTSTRAP}" --output "bootstrap.py" + - python3 bootstrap.py channel bdt + script: + - source ${CONDA_ROOT}/etc/profile.d/conda.sh + - conda activate bdt + - bdt ci pypi -vv + dependencies: + - build_linux_36 + - build_macosx_36 + tags: + - docker