From 9cd5dfbdaab42e4b5874e6f72bd75f3523afb2ea Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sat, 13 Apr 2019 21:51:20 +0200 Subject: Move travis from Ubuntu to docker+openSUSE Travis supports only quite old Ubuntu releases. They don't ship with libsignal-protocol-c and not with a recent enough libgrcypt. We could build libsignal-protocol-c manually but for libgcrypt it's more annoying. Let us switch to Docker and use openSUSE Tumbleweed, which is rolling release) and thus have up to date libs. --- .travis.yml | 52 ++++++++-------------------------------------------- Dockerfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 44 deletions(-) create mode 100644 Dockerfile diff --git a/.travis.yml b/.travis.yml index d8862460..abdeaa98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,46 +1,10 @@ -dist: xenial sudo: required language: c -install: - - lsb_release -a - - uname -a - - sudo apt-get update - - sudo apt-get -y install libssl-dev libexpat1-dev libncursesw5-dev libglib2.0-dev libnotify-dev libcurl3-dev libxss-dev libotr5-dev libgpgme11-dev autoconf-archive expect-dev tcl-dev libtool python-dev libgtk2.0-dev libcmocka-dev - - git clone git://github.com/boothj5/libmesode.git - - cd libmesode - - mkdir m4 - - ./bootstrap.sh - - ./configure --prefix=/usr - - make - - sudo make install - - cd .. - - rm -rf libmesode - - sudo apt-get install libmicrohttpd-dev - - git clone git://github.com/boothj5/stabber.git - - cd stabber - - ./bootstrap.sh - - ./configure --prefix=/usr - - make - - sudo make install - - cd .. - - rm -rf stabber - - git clone https://github.com/signalapp/libsignal-protocol-c.git - - cd libsignal-protocol-c - - git checkout v2.3.2 - - mkdir build - - cd build - - cmake -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../ - - make - - sudo make install - - cd ../../ - - rm -rf libsignal-protocol-c - - wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.0.tar.bz2 - - tar xfv libgcrypt-1.7.0.tar.bz2 - - cd libgcrypt-1.7.0 - - ./configure --prefix=/usr - - make - - sudo make install - - cd .. - - rm -rf libgcrypt-1.7.0 - - cat /usr/include/gcrypt.h -script: ./travis-build.sh +services: + - docker + +before_install: + - docker build -f Dockerfile -t profanity . + +script: +- docker run -it profanity ./travis-build.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0da723d1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +# Build the latest openSUSE Tumbleweed image +FROM opensuse/tumbleweed + +RUN zypper --non-interactive in --no-recommends \ + git \ + gcc \ + autoconf \ + autoconf-archive \ + make \ + automake \ + libtool \ + glib2-devel \ + gtk2-devel \ + libXss-devel \ + libcurl-devel \ + libexpat-devel \ + libgpgme-devel \ + libmesode-devel \ + libnotify-devel \ + libotr-devel \ + libuuid-devel \ + libcmocka-devel \ + ncurses-devel \ + python3-devel \ + python3 \ + python-devel \ + python \ + readline-devel \ + libsignal-protocol-c-devel \ + libgcrypt-devel \ + libmicrohttpd-devel + +RUN mkdir -p /usr/src +WORKDIR /usr/src + +RUN mkdir -p /usr/src/stabber +RUN git clone git://github.com/boothj5/stabber.git +WORKDIR /usr/src/stabber +RUN ./bootstrap.sh +RUN ./configure --prefix=/usr --disable-dependency-tracking +RUN make +RUN make install + +RUN mkdir -p /usr/src/profanity +WORKDIR /usr/src/profanity +COPY . /usr/src/profanity -- cgit 1.4.1-2-gfad0