Commit fa17376f authored by André Anjos's avatar André Anjos 💬

[ci] Fix builds for gitlab

parent 3423997b
Pipeline #2928 failed
py27-linux:
variables:
BOB_UPLOAD_WHEEL="--python-tag py27"
script:
- git clean -ffdx
- source /idiap/group/torch5spro/conda/bin/activate `cat /idiap/group/torch5spro/conda/envs/latest-devel-2.7.txt`
- python bootstrap-buildout.py
- ./bin/buildout
- ./bin/python -c 'from bob.extension import get_config; print(get_config())'
- ./bin/coverage run --source=bob.extension ./bin/nosetests -sv
- ./bin/sphinx-build -b doctest doc sphinx
- ./bin/sphinx-build -b html doc sphinx
after_script:
- ./scripts/upload-sphinx.sh
- ./scripts/upload-wheel.sh
tags:
- lidiap2015
py34-linux:
script:
- git clean -ffdx
- source /idiap/group/torch5spro/conda/bin/activate `cat /idiap/group/torch5spro/conda/envs/latest-devel-3.4.txt`
- python bootstrap-buildout.py
- ./bin/buildout
- ./bin/python -c 'from bob.extension import get_config; print(get_config())'
- ./bin/coverage run --source=bob.extension ./bin/nosetests -sv
- ./bin/sphinx-build -b doctest doc sphinx
- ./bin/sphinx-build -b html doc sphinx
tags:
- lidiap2015
py35-linux:
variables:
BOB_DOCUMENTATION_SERVER=https://www.idiap.ch/software/bob/docs/latest/bioidiap/%s/master
BOB_UPLOAD_WHEEL="--python-tag py3"
script:
- git clean -ffdx
- source /idiap/group/torch5spro/conda/bin/activate `cat /idiap/group/torch5spro/conda/envs/latest-devel-3.5.txt`
- python bootstrap-buildout.py
- ./bin/buildout
- ./bin/python -c 'from bob.extension import get_config; print(get_config())'
- ./bin/coverage run --source=bob.extension ./bin/nosetests -sv
- ./bin/sphinx-build -b doctest doc sphinx
- ./bin/sphinx-build -b html doc sphinx
after_script:
- ./scripts/upload-wheel.sh
tags:
- lidiap2015
language: python
env:
global:
- secure: bCrXmS1k8aIOE8Ba6XuHyjUoQQPpYEC8kpTcMi9pNhyXRQyGEPLp85VgyfXga2Oxb73QcW1aW4AxGUxiR1OZjB4rBmKK2uKij2G2qq9uhcXkDqCzqqxslhtm3o8cxHEFNJWRhuSVVjS0m0RvaFuGRicdz7QdyHCLl29+Gqdkacs=
- secure: W81QkyB8I87JT6kqaW/eBYBngbtcpHXWXIQsBkjy06Z8V9gUGbUD5oWwCn6NKQ1hE1ZR/qELxsTtrfgvfiegCW9wci4qZzatq34DWvzKK20jacqn9hs0BnXCyI/+iQRf6vam1KAnvc4qmWzF/CfsuZqCku8TtU5ZtKk05D/K//0=
matrix:
include:
- python: 2.7
env:
- BOB_DOCUMENTATION_SERVER=https://www.idiap.ch/software/bob/docs/latest/bioidiap/%s/master
- BOB_UPLOAD_WHEEL="--python-tag py27"
- python: 3.3
env:
- BOB_UPLOAD_WHEEL="--python-tag py3"
- python: 3.4
- python: 3.5
before_install:
- sudo add-apt-repository -y ppa:biometrics/bob
- sudo apt-get update -qq
- sudo apt-get install -qq --force-yes libfreetype6-dev libboost-all-dev libblitz1-dev libatlas-dev libatlas-base-dev liblapack-dev texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- pip install --upgrade pip
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel sphinx nose --pre coverage==3.7.1 coveralls bob.blitz
install:
- python bootstrap-buildout.py
- ./bin/buildout buildout:prefer-final=true
script:
- ./bin/python -c 'from bob.extension import get_config; print(get_config())'
- ./bin/coverage run --source=bob.extension ./bin/nosetests -sv
- ./bin/sphinx-build -b doctest doc sphinx
- ./bin/sphinx-build -b html doc sphinx
after_success:
- coveralls
- ./scripts/upload-sphinx.sh
- ./scripts/upload-wheel.sh
.. vim: set fileencoding=utf-8 :
.. Andre Anjos <andre.anjos@idiap.ch>
.. Thu 30 Jan 08:46:53 2014 CET
.. Thu 04 Aug 2016 16:39:57 CEST
.. image:: http://img.shields.io/badge/docs-stable-yellow.png
:target: http://pythonhosted.org/bob.extension/index.html
......@@ -21,18 +20,32 @@
Python/C++ Bob Extension Building Support
===========================================
This package is part of the signal-processing and machine learning toolbox Bob_.
It provides a simple mechanism for using Bob_, or extending Bob_ by building packages using either a pure Python API, or even a mix of C++ and python.
This package is part of the signal-processing and machine learning toolbox
Bob_. It provides a simple mechanism for using Bob_, or extending Bob_ by
building packages using either a pure Python API, or even a mix of C++ and
python.
Installation
------------
To install this package -- alone or together with other `Packages of Bob <https://github.com/idiap/bob/wiki/Packages>`_ -- please read the `Installation Instructions <https://github.com/idiap/bob/wiki/Installation>`_.
For Bob_ to be able to work properly, some dependent packages are required to be installed.
Please make sure that you have read the `Dependencies <https://github.com/idiap/bob/wiki/Dependencies>`_ for your operating system.
Follow our `binary installation`_ instructions. Then, using the Python
interpreter inside that distribution, bootstrap and buildout this package::
$ python bootstrap-buildout.py
$ ./bin/buildout
Documentation
-------------
For further documentation on this package, please read the `Stable Version <http://pythonhosted.org/bob.extension/index.html>`_ or the `Latest Version <https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.extension/master/index.html>`_ of the documentation.
For a list of tutorials on this or the other packages ob Bob_, or information on submitting issues, asking questions and starting discussions, please visit its website.
For further documentation on this package, please read the `Stable Version`_ or
the `Latest Version`_ of the documentation. For a list of tutorials on this or
the other packages ob Bob_, or information on submitting issues, asking
questions and starting discussions, please visit its website.
.. Place your references here:
.. _bob: https://www.idiap.ch/software/bob
.. _binary installation: https://gitlab.idiap.ch/bob/bob/wikis/Binary-Installation
.. _stable version: http://pythonhosted.org/bob.extension/index.html
.. _latest version: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.extension/master/index.html
......@@ -7,9 +7,9 @@ GitHub and PyPI, and update the new version of the package to the given
It assumes that you are in the main directory of the package and have
successfully ran bootstrap, and that you have submitted all changes that should
go into the new version. Preferably, the build on Travis passed. For database
packages, it also assumes that the '.sql3' file has been generated (if any).
Further, it assumes that the 'stable' version has not yet been uploaded to
go into the new version. Preferably, the build on Travis passed. For database
packages, it also assumes that the '.sql3' file has been generated (if any).
Further, it assumes that the 'stable' version has not yet been uploaded to
PyPI, and that no GitHub tag with this version exists.
The 'stable' version (i.e., what will be downloadable from PyPI) can be
......@@ -18,8 +18,8 @@ current version of the package, but not lower than that.
The 'latest' version (i.e., what will be the new master branch on GitHub)
must be higher than the current and than the stable version.
By default, both versions can be automatically computed from the 'current'
version, which is read from the 'version.txt' file. In this case, the
By default, both versions can be automatically computed from the 'current'
version, which is read from the 'version.txt' file. In this case, the
'stable' version will be the 'current' version without the trailing beta
indicator, and the 'latest' version will be 1 patch level above the 'current'
version, with the beta indicator 0, for example:
......@@ -60,12 +60,12 @@ Examples:
Print out, what would be done using the '--dry-run' option:
%(prog)s -q
Do everything automatically (assumes a proper version.txt file):
%(prog)s -vv
"""
......@@ -208,12 +208,12 @@ def main(command_line_options = None):
if args.stable_version is not None and Version(args.stable_version) > Version(current_version):
print ("\nReplacing branch tag in README.rst to '%s'"%('v'+args.stable_version))
_update_readme(args.stable_version)
# update stable version on github
# update stable version on git
run_commands(args.stable_version, ['git', 'add', 'version.txt', 'README.rst'], ['git', 'commit', '-m', 'Increased stable version to %s' % args.stable_version])
else:
# assure that we have the current version
args.stable_version = current_version
# add a github tag
# add a git tag
print ("\nTagging version '%s'" % args.stable_version)
run_commands(None, ['git', 'tag', 'v%s' % args.stable_version], ['git', 'push', '--tags'])
......@@ -233,7 +233,7 @@ def main(command_line_options = None):
if 'pypi' in args.steps:
print ("\nUploading version '%s' to PyPI" % args.stable_version)
# update version on github and add a tag
# update version on git and add a tag
run_commands(None, [python_cmd, 'setup.py', 'register'], [python_cmd, 'setup.py', 'sdist', '--formats', 'zip', 'upload'])
......
......@@ -20,7 +20,7 @@ def _run(package, run_call):
if os.path.exists(local_file):
example_url = 'file://' + local_file
else:
example_url = "https://github.com/bioidiap/bob.extension/raw/master/examples/bob.example.%s.tar.bz2"%package
example_url = "https://gitlab.idiap.ch/bob/bob.extension/raw/master/examples/bob.example.%s.tar.bz2"%package
temp_dir = tempfile.mkdtemp(prefix="bob_test")
local_archive = os.path.join(temp_dir, "bob.example.%s.tar.bz2"%package)
print ("Downloading package '%s'" % example_url)
......
; vim: set fileencoding=utf-8 :
; Andre Anjos <andre.anjos@idiap.ch>
; Mon 16 Apr 08:29:18 2012 CEST
[buildout]
......
......@@ -23,7 +23,7 @@ You can check it out by:
.. code-block:: sh
$ wget https://github.com/bioidiap/bob.extension/raw/master/examples/bob.example.extension.tar.bz2
$ wget https://gitlab.idiap.ch/bo/bob.extension/raw/master/examples/bob.example.extension.tar.bz2
$ tar -xjf bob.example.extension.tar.bz2
$ cd bob.example.extension
......@@ -187,7 +187,7 @@ Again, a complete example can be downloaded via:
.. code-block:: sh
$ wget https://github.com/bioidiap/bob.extension/raw/master/examples/bob.example.library.tar.bz2
$ wget https://gitlab.idiap.ch/bob/bob.extension/raw/master/examples/bob.example.library.tar.bz2
$ tar -xjf bob.example.library.tar.bz2
$ cd bob.example.library
......@@ -259,7 +259,7 @@ No worries, if the library is not used in the extension, the linker should be ab
You can also export your Python bindings to be used in other libraries.
Unfortunately, this is an extremely tedious process and is not explained in detail here.
As an example, you might want (or maybe not) to have a look into `bob.blitz/bob/blitz/include/bob.blitz/capi.h <https://github.com/bioidiap/bob.blitz/blob/master/bob/blitz/include/bob.blitz/capi.h>`_.
As an example, you might want (or maybe not) to have a look into `bob.blitz/bob/blitz/include/bob.blitz/capi.h <https://gitlab.idiap.ch/bob/bob.blitz/blob/master/bob/blitz/include/bob.blitz/capi.h>`_.
Compiling your Library and Extension
......
......@@ -35,7 +35,7 @@ Fire-up a shell window and than do this:
.. code-block:: sh
$ wget https://github.com/bioidiap/bob.extension/raw/master/examples/bob.example.project.tar.bz2
$ wget https://gitlab.idiap.ch/bob/bob.extension/raw/master/examples/bob.example.project.tar.bz2
$ tar -xjf bob.example.project.tar.bz2
$ cd bob.example.project
......@@ -145,7 +145,7 @@ Here is how to go from nothing to everything:
If you just want to get things rolling, using ``python bootstrap-buildout.py`` will, in most cases, do the right thing.
.. note::
When you have installed an older version of |project| -- i.e. |project| v1.x, you might need to uninstall it first, see https://github.com/idiap/bob/wiki/Installation.
When you have installed an older version of |project| -- i.e. |project| v1.x, you might need to uninstall it first, see https://gitlab.idiap.ch/bob/bob/wikis/Installation.
......@@ -261,7 +261,7 @@ It can be simply set up:
.
[sources]
bob.blitz = git https://github.com/bioidiap/bob.blitz
bob.blitz = git https://gitlab.idiap.ch/bob/bob.blitz
...
......@@ -503,7 +503,7 @@ Here is a set of steps we recommend you follow when releasing a new version of y
In this fictitious representation, the ``master`` branch continue under development, but one can see older branches don't receive much attention anymore.
Here is an example for creating a branch at github (many of our satellite packages are hosted there).
Here is an example for creating a branch at gitlab (many of our satellite packages are hosted there).
Let's create a branch called ``1.1``::
.. code-block:: sh
......@@ -513,7 +513,7 @@ Here is a set of steps we recommend you follow when releasing a new version of y
$ git push origin 1.1
3. When you decide to release something publicly, we recommend you **tag** the version of the package on your repository, so you have a marker to what code you actually published on PyPI.
Tagging on github would go like this::
Tagging on gitlab would go like this::
.. code-block:: sh
......
......@@ -9,14 +9,14 @@
.. _c++: http://www2.research.att.com/~bs/C++.html
.. _distutils: http://docs.python.org/distutils/
.. _git: http://git-scm.com/
.. _github: http://github.com/
.. _gitlab: http://gitlab.idiap.ch/
.. _idiap: http://www.idiap.ch
.. _ipython: http://ipython.scipy.org
.. _nose: https://nose.readthedocs.org/en/latest/
.. _pep 386: http://www.python.org/dev/peps/pep-0386/
.. _python: http://www.python.org
.. _pypi: http://pypi.python.org
.. _satellite packages: https://github.com/idiap/bob/wiki/Packages
.. _satellite packages: https://gitlab.idiap.ch/bob/bob/wikis/Packages
.. _setuptools: http://trac.edgewall.org/wiki/setuptools
.. _sphinx: http://sphinx.pocoo.org
.. _zc.buildout: http://pypi.python.org/pypi/zc.buildout/
......
......@@ -13,16 +13,18 @@ Installation
.. note::
To follow these instructions locally you will need a local copy of this
package. For that, you can use the github tarball API to download the package::
package. For that, you can use the github tarball API to download the
package::
$ wget --no-check-certificate https://github.com/idiap/bob.project.example/tarball/master -O- | tar xz
$ wget --no-check-certificate https://gitlab.idiap.ch/bob/bob.project.example/tarball/master -O- | tar xz
$ mv idiap-bob.project* bob.project.example
Documentation and Further Information
-------------------------------------
Please refer to the latest Bob user guide, accessing from the `Bob website
<http://idiap.github.com/bob/>`_ for how to create your own packages based on
this example. In particular, the Section entitled `Organize Your Work in
Satellite Packages <http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/OrganizeYourCode.html>`_
<http://www.idiap.ch/software/bob>`_ for how to create your own packages based
on this example. In particular, the Section entitled `Organize Your Work in
Satellite Packages
<http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/OrganizeYourCode.html>`_
contains details on how to setup, build and roll out your code.
......@@ -63,7 +63,7 @@ setup(
version = version,
description = 'Example for using Bob inside a C++ extension of a buildout project',
url = 'https://www.github.com/<YourInstitution>/<YourPackage>',
url = 'https://github.com/<YourInstitution>/<YourPackage>',
license = 'GPLv3',
author = '<YourName>',
author_email='<YourEmail>',
......
......@@ -13,16 +13,18 @@ Installation
.. note::
To follow these instructions locally you will need a local copy of this
package. For that, you can use the github tarball API to download the package::
package. For that, you can use the gitlab tarball API to download the
package::
$ wget --no-check-certificate https://github.com/idiap/bob.project.example/tarball/master -O- | tar xz
$ wget --no-check-certificate https://gitlab.idiap.ch/bob/bob.project.example/tarball/master -O- | tar xz
$ mv idiap-bob.project* bob.project.example
Documentation and Further Information
-------------------------------------
Please refer to the latest Bob user guide, accessing from the `Bob website
<http://idiap.github.com/bob/>`_ for how to create your own packages based on
this example. In particular, the Section entitled `Organize Your Work in
Satellite Packages <http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/OrganizeYourCode.html>`_
<http://www.idiap.ch/software/bob>`_ for how to create your own packages based
on this example. In particular, the Section entitled `Organize Your Work in
Satellite Packages
<http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/OrganizeYourCode.html>`_
contains details on how to setup, build and roll out your code.
......@@ -61,7 +61,7 @@ setup(
version = version,
description = 'Example for using Bob inside a C++ extension of a buildout project',
url = 'https://www.github.com/<YourInstitution>/<YourPackage>',
url = 'https://github.com/<YourInstitution>/<YourPackage>',
license = 'GPLv3',
author = '<YourName>',
author_email='<YourEmail>',
......
......@@ -13,16 +13,17 @@ Installation
.. note::
To follow these instructions locally you will need a local copy of this
package. For that, you can use the github tarball API to download the package::
package. For that, you can use the gitlab tarball API to download the
package::
$ wget --no-check-certificate https://github.com/idiap/bob.project.example/tarball/master -O- | tar xz
$ wget --no-check-certificate https://gitlab.idiap.ch/bob/bob.project.example/tarball/master -O- | tar xz
$ mv idiap-bob.project* bob.project.example
Documentation and Further Information
-------------------------------------
Please refer to the latest Bob user guide, accessing from the `Bob website
<http://idiap.github.com/bob/>`_ for how to create your own packages based on
<http://www.idiap.ch/software/bob/>`_ for how to create your own packages based on
this example. In particular, the Section entitled `Organize Your Work in
Satellite Packages <http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/OrganizeYourCode.html>`_
contains details on how to setup, build and roll out your code.
......@@ -50,7 +50,7 @@ setup(
version = open("version.txt").read().rstrip(),
description = 'Example for using Bob inside a buildout project',
url = 'https://www.github.com/<YourInstitution>/<YourPackage>',
url = 'https://github.com/<YourInstitution>/<YourPackage>',
license = 'GPLv3',
author = '<YourName>',
author_email = '<YourEmail>',
......
#!/usr/bin/env bash
# some checks
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
echo "This is a pull request - not uploading documentation";
exit 0
fi
if [ -z "${DOCUSER}" ] || [ -z "${DOCPASS}" ] || [ -z "${BOB_DOCUMENTATION_SERVER}" ]; then
echo "Server username and/or password undefined - not uploading documentation";
exit 0
......@@ -20,17 +14,17 @@ fi
echo "Detected branch '$branch' to be master branch -- uploading wheel to Idiap servers"
info=sphinx/.travis.info
codename=$(basename ${TRAVIS_REPO_SLUG})-${TRAVIS_COMMIT}
info=sphinx/.gitlab-ci.info
codename=$(basename ${CI_PROJECT_NAME})-${CI_BUILD_REF}
server=https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/docs-upload/
# annotate
echo "repo=${TRAVIS_REPO_SLUG}" >> ${info}
echo "branch=${TRAVIS_BRANCH}" >> ${info}
echo "tag=${TRAVIS_TAG}" >> ${info}
echo "build=${TRAVIS_JOB_NUMBER}" >> ${info}
echo "commit=${TRAVIS_COMMIT}" >> ${info}
echo "os=${TRAVIS_OS_NAME}" >> ${info}
echo "repo=${CI_PROJECT_PATH}" >> ${info}
echo "branch=${CI_BUILD_REF_NAME}" >> ${info}
echo "tag=${CI_BUILD_TAG}" >> ${info}
echo "build=${CI_BUILD_ID}" >> ${info}
echo "commit=${CI_BUILD_REF}" >> ${info}
echo "runner=${CI_RUNNER_DESCRIPTION}" >> ${info}
# compress
tar cfj ${codename}.tar.bz2 sphinx
......
#!/usr/bin/env bash
# some checks
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
echo "This is a pull request - not uploading wheel";
exit 0
fi
if [ -z "${DOCUSER}" ] || [ -z "${DOCPASS}" ] || [ -z "${BOB_UPLOAD_WHEEL}" ]; then
echo "Server username and/or password undefined - not uploading wheel";
exit 0
......@@ -28,9 +22,9 @@ bin/python setup.py bdist_wheel -d wheel $WHEEL_OPTION
# uplaod wheel
wheel=`find wheel -name "*.whl"`
server=https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/wheels-upload/travis/
server=https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/wheels-upload/${CI_RUNNER_TAGS}/
echo -e "\n\nUploading wheel $wheel to server https://www.idiap.ch/software/bob/wheels-upload/travis/"
echo -e "\n\nUploading wheel $wheel to server https://www.idiap.ch/software/bob/wheels-upload/${CI_RUNNER_TAGS}/"
# send
curl --silent --insecure --upload-file $wheel ${server}
......@@ -11,17 +11,17 @@ from setuptools import setup, find_packages
# Define package version
version = open("version.txt").read().rstrip()
requiries = ['setuptools']
requires = ['setuptools']
import sys
if sys.version_info[0] == 2 and sys.version_info[1] <= 6:
requiries.append('importlib')
requires.append('importlib')
setup(
name="bob.extension",
version=version,
description="Building of Python/C++ extensions for Bob",
url='http://github.com/bioidiap/bob.extension',
url='http://gitlab.idiap.ch/bob/bob.extension',
license="BSD",
author='Andre Anjos',
author_email='andre.anjos@idiap.ch',
......@@ -33,7 +33,7 @@ setup(
install_requires=requiries,
install_requires=requires,
entry_points = {
'console_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