diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8372c06b2f02484be93c1caedce43078615c287f..77ca97b6a25ae52f0d3b8e5268fa9ca48e86d01f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,57 +12,54 @@ stages: # Build targets -.build_template: &build_job +.build_template: stage: build script: - python3 ./bob/devtools/bootstrap.py -vv build - source ${CONDA_ROOT}/etc/profile.d/conda.sh - conda activate base - python3 ./bob/devtools/build.py -vv - cache: &build_caches + artifacts: + expire_in: 1 week + cache: paths: - miniconda.sh - ${CONDA_ROOT}/pkgs/*.tar.bz2 - ${CONDA_ROOT}/pkgs/urls.txt -.build_linux_template: &linux_build_job - <<: *build_job +.build_linux_template: + extends: .build_template tags: - docker image: continuumio/conda-concourse-ci artifacts: - expire_in: 1 week paths: - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2 - ${CONDA_ROOT}/conda-bld/noarch/*.tar.bz2 cache: - <<: *build_caches key: "linux-cache" -.build_macosx_template: &macosx_build_job - <<: *build_job +.build_macosx_template: + extends: .build_template tags: - macosx artifacts: - expire_in: 1 week paths: - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2 - ${CONDA_ROOT}/conda-bld/noarch/*.tar.bz2 cache: - <<: *build_caches key: "macosx-cache" build_linux_36: - <<: *linux_build_job + extends: .build_linux_template variables: PYTHON_VERSION: "3.6" - build_linux_37: - <<: *linux_build_job + extends: .build_linux_template variables: PYTHON_VERSION: "3.7" BUILD_EGG: "true" @@ -72,28 +69,26 @@ build_linux_37: - conda activate base - python3 ./bob/devtools/build.py -vv --twine-check artifacts: - expire_in: 1 week paths: - dist/*.zip - sphinx - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2 - ${CONDA_ROOT}/conda-bld/noarch/*.tar.bz2 - build_macosx_36: - <<: *macosx_build_job + extends: .build_macosx_template variables: PYTHON_VERSION: "3.6" build_macosx_37: - <<: *macosx_build_job + extends: .build_macosx_template variables: PYTHON_VERSION: "3.7" # Deploy targets -.deploy_template: &deploy_job +.deploy_template: stage: deploy script: - python3 ./bob/devtools/bootstrap.py -vv local base @@ -109,7 +104,7 @@ build_macosx_37: - build_macosx_37 tags: - docker - cache: &build_caches + cache: paths: - miniconda.sh - ${CONDA_ROOT}/pkgs/*.tar.bz2 @@ -117,14 +112,14 @@ build_macosx_37: deploy_beta: - <<: *deploy_job + extends: .deploy_template environment: beta only: - master deploy_stable: - <<: *deploy_job + extends: .deploy_template environment: stable only: - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags) @@ -152,7 +147,7 @@ pypi: - build_macosx_37 tags: - docker - cache: &build_caches + cache: paths: - miniconda.sh - ${CONDA_ROOT}/pkgs/*.tar.bz2