Commit 709b4780 authored by André Anjos's avatar André Anjos 💬
Browse files

Try our new CI

parent b8dc5795
Pipeline #6182 failed
py27-linux:
script:
- git clean -ffdx
- export TMPDIR=/var/tmp
- /idiap/project/beat/environments/staging/usr/bin/python bootstrap-buildout.py --setuptools-version=`/idiap/project/beat/environments/staging/usr/bin/python -c 'import setuptools; print(setuptools.__version__)'`
- ./bin/buildout
- ./bin/python --version
- unset TMPDIR
- export NOSE_WITH_COVERAGE=1
- export NOSE_COVER_PACKAGE=beat.core
- ./bin/nosetests -sv
- ./bin/sphinx-apidoc --separate -d 2 --output=doc/api beat
- ./bin/sphinx-build doc html
tags:
- lidiap2015
stages:
- build
variables:
- PREFIX: /opt/beat.env.web-${CI_BUILD_REF_NAME}/usr
py27-macosx:
build:
stage: build
before_script:
- ${PREFIX}/bin/python --version
- docker info
script:
- git clean -ffdx
- /Users/buildbot/work/environments/beat/py27/bin/python bootstrap-buildout.py --setuptools-version=`/Users/buildbot/work/environments/beat/py27/bin/python -c 'import setuptools; print(setuptools.__version__)'`
- ${PREFIX}/bin/python bootstrap-buildout.py
- ./bin/buildout
- ./bin/python --version
- export NOSE_WITH_COVERAGE=1
- export NOSE_COVER_PACKAGE=beat.core
- ./bin/nosetests -sv
- ./bin/sphinx-apidoc --separate -d 2 --output=doc/api beat
- ./bin/sphinx-build doc html
- ./bin/python ${PREFIX}/bin/coverage run --source=${CI_PROJECT_NAME} ${PREFIX}/bin/nosetests -sv ${CI_PROJECT_NAME}
- ./bin/python ${PREFIX}/bin/coverage report
- ./bin/python ${PREFIX}/bin/sphinx-apidoc --separate -d 2 --output=doc/api ${CI_PROJECT_NAMESPACE}
- ./bin/python ${PREFIX}/bin/sphinx-build doc sphinx
tags:
- beat-macosx
- docker
......@@ -28,6 +28,7 @@
This package contains the source code for the core components of the BEAT
platform.
Installation
------------
......@@ -50,26 +51,17 @@ get you a fully operational test and development environment.
package instead. It contains the same setup deployed at the final BEAT
machinery.
Cpulimit
========
Make sure the program ``cpulimit`` is available on your system or by the side
of the python interpreter you bootstrapped as per instructions above. The BEAT
platform uses this program to control slot usage on the scheduling/worker
level::
$ cpulimit -h
Docker
======
If that is not the case, then you need to install it. Either install a package
that is native to your system (e.g. on Debian or Ubuntu platforms) or compile
the checked-out version available at ``src/cpulimit``::
This package depends on Docker_ and uses it to run user algorithms in a
container with the required software stack. You must install the Docker_ engine
and make sure the user running tests has access to it.
$ cd src/cpulimit;
$ make
$ ./src/cpulimit -h #to test it
$ cd ../../bin #go back to the root of beat.web and the into the `bin' dir
$ ln -s ../src/cpulimit/src/cpulimit
$ cd .. #go back to the root of beat.web
In particular, this package controls memory and CPU utilisation of the
containers it launches. You must make sure to enable those functionalities on
your installation.
Docker Setup
============
......@@ -151,9 +143,8 @@ Development
Indentation
===========
You can enforce `PEP8 <https://www.python.org/dev/peps/pep-0008/>` compliance
using the application ``autopep8``. For example, to enforce compliance on a
single file and edit it in place, do::
You can enforce PEP8_ compliance using the application ``autopep8``. For
example, to enforce compliance on a single file and edit it in place, do::
$ ./bin/autopep8 --indent-size=2 --in-place beat/core/utils.py
......@@ -177,3 +168,8 @@ in different ways using another command::
This will allow you to dump and print the profiling statistics as you may find
fit.
.. References go here
.. _pep8: https://www.python.org/dev/peps/pep-0008/
.. _docker: https://www.docker.com/
[buildout]
index = https://pypi.org/simple
parts = scripts cpulimit cxx_integers_echo_algorithm
parts = scripts cxx_integers_echo_algorithm
extensions = mr.developer
auto-checkout = *
develop = .
......@@ -8,20 +8,11 @@ newest = false
eggs = beat.core
beat.backend.python
ipdb
coverage
[sources]
beat.backend.python = git https://gitlab.idiap.ch/beat/beat.backend.python
cpulimit = git https://github.com/opsengine/cpulimit rev=v0.2 egg=false
[cpulimit]
recipe = collective.recipe.cmd
cmds = make -C src/cpulimit
cd bin && ln -sf ../src/cpulimit/src/cpulimit && cd ..
uninstall_cmds = rm -f bin/cpulimit
on_install = true
on_update = true
[scripts]
recipe = bob.buildout:scripts
......
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