diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0825bfc741f4d67b38ee054bc34033c41553842..9b52a92ebd6bc340610d2d25216c199f06ef255a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,125 +1,43 @@ -# This build file is defined in two parts: 1) a generic set of instructions you -# probably **don't** need to change and 2) a part you may have to tune to your -# project. It heavily uses template features from YAML to help you in only -# changing a minimal part of it and avoid code duplication to a maximum while -# still providing a nice pipeline display on your package. +# This build file heavily uses template features from YAML so it is generic +# enough for any Bob project. Don't modify it unless you know what you're +# doing. -# 1) Generic instructions (only change if you know what you're doing) -# ------------------------------------------------------------------- - # Definition of our build pipeline stages: - - build-bob - - -# Global variables -variables: - CONDA_PREFIX: env + - buildbob +# --------- +# Templates +# --------- # Template for the build stage # Needs to run on all supported architectures, platforms and python versions -.build_bob: &build_job - stage: build-bob +.build_template: &build_job + stage: buildbob before_script: - - git clean -ffdx - - chmod 755 ci/install.sh - - ./ci/install.sh ci #updates - - ./ci/before_build.sh 0 + - git clean -ffdx + - chmod 755 ci/install.sh + - ./ci/install.sh ci #updates + - ./ci/before_build.sh 0 script: - - ./ci/build.sh + - ./ci/build.sh buildout-bob.cfg after_script: - - ./ci/after_build.sh + - ./ci/after_build.sh artifacts: - expire_in: 1 day + expire_in: 1 week paths: - dist/ -# Template for building on a Linux machine -.build_linux_template: &linux_build_job - <<: *build_job - variables: &linux_build_variables - <<: *build_variables - CONDA_FOLDER: "/local/conda" - CFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -coverage" - CXXFLAGS: "-D_GLIBCXX_USE_CXX11_ABI=0 -coverage" - - -# Template for building on a Mac OSX machine -.build_mac_template: &macosx_build_job - <<: *build_job - variables: &macosx_build_variables - <<: *build_variables - CONDA_FOLDER: "/opt/conda" - MACOSX_DEPLOYMENT_TARGET: "10.9" - CFLAGS: "-pthread -coverage" - CXXFLAGS: "-pthread -coverage" - LDFLAGS: "-lpthread" - - +# ------------- +# Build Targets +# ------------- - -# 2) Package specific instructions (you may tune this if needed) -# -------------------------------------------------------------- - -# Linux + Python 2.7: Builds and tests +# Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed) build_linux_27: - <<: *linux_build_job + <<: *build_job variables: &linux_27_build_variables - <<: *linux_build_variables - PYTHON_VER: "2.7" - WHEEL_TAG: "py27" + PYTHON_VERSION: "2.7" tags: - conda-linux - -# Linux + Python 3.4: Builds and tests -build_linux_34: - <<: *linux_build_job - variables: &linux_34_build_variables - <<: *linux_build_variables - PYTHON_VER: "3.4" - WHEEL_TAG: "py3" - tags: - - conda-linux - -# Linux + Python 3.5: Builds and tests -build_linux_35: - <<: *linux_build_job - variables: &linux_35_build_variables - <<: *linux_build_variables - PYTHON_VER: "3.5" - WHEEL_TAG: "py3" - tags: - - conda-linux - -# Mac OSX + Python 2.7: Builds, tests and uploads the wheel -build_macosx_27: - <<: *macosx_build_job - variables: &macosx_27_build_variables - <<: *macosx_build_variables - PYTHON_VER: "2.7" - WHEEL_TAG: "py27" - tags: - - conda-macosx - -# Mac OSX + Python 3.4: Builds and tests -build_macosx_34: - <<: *macosx_build_job - variables: &macosx_34_build_variables - <<: *macosx_build_variables - PYTHON_VER: "3.4" - WHEEL_TAG: "py3" - tags: - - conda-macosx - -# Mac OSX + Python 3.5: Builds, tests, uploads the wheel and the latest docs -build_macosx_35: - <<: *macosx_build_job - variables: &macosx_35_build_variables - <<: *macosx_build_variables - PYTHON_VER: "3.5" - WHEEL_TAG: "py3" - tags: - - conda-macosx diff --git a/ci/build.sh b/ci/build.sh index 32ac88cac0748f64b70dce4d6a6a987c7967d81b..7d0ae3e190dfe7681c4dec2bd0962e1d7c0e54bf 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -3,7 +3,7 @@ source $(dirname ${0})/functions.sh -run_cmd ./bin/buildout +run_cmd ./bin/buildout -c ${1} if [ -x ./bin/bob_dbmanage.py ]; then run_cmd ./bin/bob_dbmanage.py all download --force;