From 00e6ca8a87dcb23c423e088bec2057dcf5158f49 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 26 May 2019 12:11:09 +0100 Subject: fix travis builds see issue #1395 --- .travis.yml | 133 ++++++++++++++++++++++++------------------------------------ 1 file changed, 54 insertions(+), 79 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 9dafeb5d..55a0f114 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,8 @@ language: python sudo: True - -# Cache pip objects to speed up next build -cache: - pip: True - ccache: True - - -# Python 3.7 is not supported in trusty dist: xenial python: - # We can add more version strings here when we support other python - # versions. - "3.5" - "3.6" - "3.7" @@ -23,31 +13,34 @@ env: - JOB=docs - JOB=tests +# Cache pip objects to speed up next build +cache: + pip: True + ccache: True + addons: apt: + sources: + - sourceline: 'ppa:xapian-backports/ppa' + - sourceline: 'ppa:notmuch/notmuch' packages: - # The notmuch libs are needed to actually run alot. But currently the - # available version is not compatible with alot, so we have to build - # from source. - #- notmuch - # Dependencies to build notmuch from source. + - dtach - libxapian-dev - - libtalloc-dev - - zlib1g-dev - libgmime-3.0-dev - - # dependencies to build the python-gpg module from source + - libtalloc-dev + - libgpgme-dev + - gpgsm - swig -# Build notmuch and the python notmuch libs manually. The versions of the -# notmuch library and the python module which are available in the 12.04 and -# 14.04 Ubuntu repos do not match and do not fullfill the version requirement -# for alot. -before_install: | - set -e - if [[ $JOB = tests ]]; then + +install: + ################################################# + ### NOTMUCH ### + ################################################# + - | + set -e # Build with ccache to speed up rebuilds. - export PATH=/usr/lib/ccache:$PATH + #export PATH=/usr/lib/ccache:$PATH # Set paths export LD_LIBRARY_PATH=$HOME/.local/lib @@ -58,79 +51,61 @@ before_install: | cd notmuch # Make and install the library. We install the library without sudo as we # might want to switch to the travis container later. - ./configure --prefix=$HOME/.local + ./configure --prefix=$HOME/.local \ + --without-bash-completion \ + --without-api-docs \ + --without-emacs \ + --without-desktop \ + --without-ruby \ + --without-zsh-completion make -j3 -l2 make install # Export the library search path. # Install the python bindings. cd bindings/python + #python setup.py install --user pip install . - # Install the coverage programs to generate a coverage report and upload - # it to codacy.com - pip install coverage codacy-coverage # Move out of the notmuch dir again. cd ../../.. - # Build GPGME since the version shipping is far too old - - # needs a newer version of gpg-errors - curl https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2 -o gpgerror.tar.bz2 - tar xvf gpgerror.tar.bz2 - pushd libgpg-error-1.27 - ./configure --prefix=$HOME/.local - make -j3 -l2 - make install - popd - - # and a newer version of libassaun - curl https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.4.3.tar.bz2 -o assuan.tar.bz2 - tar xf assuan.tar.bz2 - pushd libassuan-2.4.3 - ./configure --prefix=$HOME/.local - make -j3 -l2 - make install - popd - - curl https://gnupg.org/ftp/gcrypt/gpgme/gpgme-1.9.0.tar.bz2 -o gpgme.tar.bz2 - tar xf gpgme.tar.bz2 - pushd gpgme-1.9.0 - ./configure --prefix=$HOME/.local - make -j3 -l2 - make install - popd - fi -# Prepare a minimal config file for the test. -before_script: | - set -e - if [[ $JOB = tests ]]; then - touch ~/.notmuch-config - echo 'initial_command=call os._exit(0)' > conf - fi - -# Install or mock dependencies for alot as the package has to be imported -# during generation of the docs. -install: - # urwid needs to be installed first. The installation of urwidtrees will - # fail otherwise. - # TODO This should be fixed upstream. + ################################################# + ### PYHON DEPS ### + ################################################# - pip install urwid - # Install alot and the dependencies it declares. - - | + - pip install urwidtrees + - pip install configobj + - pip install gpg + - pip install twisted + - pip install python-magic + + - | set -e if [[ $JOB = docs ]]; then - pip install configobj twisted python-magic urwidtrees + # install sphinx (only used to build docs) + pip install sphinx # Mock all "difficult" dependencies of alot in order to be able to import # alot when rebuilding the documentation. Notmuch would have to be # installed by hand in order to get a recent enough version on travis. printf '%s = None\n' NotmuchError NullPointerError > notmuch.py touch gpg.py - # install sphinx for building the html docs - pip install sphinx else - pip install .[test] + # install alot + pip install . + # programs to generate a coverage report and upload it to codacy.com + pip install coverage codacy-coverage fi + +before_script: | + # Prepare a minimal config file for the test. + set -e + if [[ $JOB = tests ]]; then + touch ~/.notmuch-config + echo 'initial_command=call os._exit(0)' > conf + fi + + script: | set -e if [[ $JOB = docs ]]; then -- cgit v1.2.3