From e446cfc99470505fc2ed6daf4022ac51c5e6d1f1 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Fri, 22 Sep 2017 16:35:43 +0200 Subject: [PATCH] Add a template file --- templates/README.md | 8 +++--- templates/gitlab-ci.yml | 2 +- templates/meta.yaml | 56 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 templates/meta.yaml diff --git a/templates/README.md b/templates/README.md index 0fa1a14..52e1226 100644 --- a/templates/README.md +++ b/templates/README.md @@ -46,10 +46,10 @@ You also need to enable the following options on your project: 1. In the project "Settings" page, make sure builds are enabled 2. If you have a private project, check the package settings and make sure that - the "Deploy Keys" for our builders (all `conda-*` related servers) are - enabled -3. Visit the "Runners" section of your package settings and enable all conda - runners, for linux and macosx variants + the "Deploy Keys" for our builders (`runner/beat-macosx ` and `bpr- + facedemo`) are enabled. +3. Visit the "Runners" section of your package settings and enable all runners + with the `docker` and `macosx` tags. 4. Go into the "Variables" section of your package setup and **add common variables** corresponding to the usernames and passwords for uploading wheels and documentation tar balls to our (web DAV) server, as well as PyPI diff --git a/templates/gitlab-ci.yml b/templates/gitlab-ci.yml index 1dd17ef..1d7d795 100644 --- a/templates/gitlab-ci.yml +++ b/templates/gitlab-ci.yml @@ -55,7 +55,7 @@ stages: - _ci/ - ${CONDA_ENVS_PATH}/osx-64/*.tar.bz2 tags: - - conda-macosx + - macosx variables: &macosx_variables CONDA_FOLDER: "${CI_PROJECT_DIR}/${CONDA_ENVS_PATH}" cache: diff --git a/templates/meta.yaml b/templates/meta.yaml new file mode 100644 index 0000000..b31997e --- /dev/null +++ b/templates/meta.yaml @@ -0,0 +1,56 @@ +{% set name = environ.get('CI_PROJECT_NAME', '<PACKAGE>') %} + +package: + name: {{ name }} + version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }} + +build: + number: {{ environ.get('BOB_BUILD_NUMBER', 0) }} + script: + - cd {{ environ.get('CI_PROJECT_DIR', environ.get('RECIPE_DIR') + '/..') }} + {% if environ.get('BUILD_EGG') %} + - python setup.py sdist --formats=zip + {% endif %} + - pip install . + - sphinx-build -W doc $PREFIX/docs/{{ name }} + +requirements: + build: + - python + - setuptools + - toolchain {{ toolchain }} + - sphinx + - sphinx_rtd_theme + # place extra build dependencies below this line: + - <BUILD_DEPS> + run: + - python + - setuptools + # place runtime dependencies below this line: + - <RUN_DEPS> + + +test: + imports: + - {{ name }} + + commands: + - nosetests --with-coverage -sv {{ name }} + # The doctests will run only if "CI_PROJECT_DIR" is available as an + # environment variable. If you are testing locally, you can set it to the + # root of your project. + - sphinx-build -b doctest {{ environ.get('CI_PROJECT_DIR') }}/doc sphinx + + requires: + - nose + - coverage + - sphinx + - sphinx_rtd_theme + # place extra test requirements below this line: + - <TEST_DEPS> + +about: + home: https://www.idiap.ch/software/bob/ + license: <LICENSE> + summary: <SHORT_DESCRIPTION> + license_family: <LICENSE_FAMILY> -- GitLab