Browse Source

Merge pull request #143 from rustyrussell/travis

Travis
ppa-0.6.1
Christian Decker 8 years ago
committed by GitHub
parent
commit
d934e730c3
  1. 7
      .travis.yml
  2. 13
      INSTALL.md
  3. 32
      tools/travis.sh

7
.travis.yml

@ -0,0 +1,7 @@
language: c
dist: trusty
sudo: true
# Trusty (aka 14.04) is way way too old, so run in docker...
script:
- tools/travis.sh

13
INSTALL.md

@ -6,7 +6,11 @@ You will need several development libraries:
* protobuf-c: version 1.1.0 or above.
* libsqlite3: for database support.
* libgmp: for secp256k1
* asciidoc: for formatting the man page (if you change them)
For actually doing development and running the tests, you will also need:
* pip3: to install python-bitcoinlib
* asciidoc: for formatting the man pages (if you change them)
* valgrind: for extra debugging checks
You will also need a version of bitcoind with segregated witness support,
such as the 0.13 or above.
@ -16,7 +20,12 @@ To Build on Ubuntu 16.04
Get dependencies:
```
sudo apt-get install autoconf libtool libprotobuf-c-dev libsqlite3-dev libgmp-dev libsqlite3-dev asciidoc
sudo apt-get install autoconf libtool libprotobuf-c-dev libsqlite3-dev libgmp-dev libsqlite3-dev
```
For development or running tests, get additional dependencies:
```
sudo apt-get asciidoc valgrind pip3 && pip3 install python-bitcoinlib
```
Clone lightning:

32
tools/travis.sh

@ -0,0 +1,32 @@
#!/bin/bash
# This build script is for running the Travis builds using docker.
# Stolen from: https://github.com/shenki/openbmc-build-scripts/blob/master/linux-openbmc-build.sh
# Trace bash processing
set -ex
# Build the docker container
docker build -t ubuntu - <<EOF
FROM ubuntu:16.10
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -yy eatmydata software-properties-common && \
eatmydata add-apt-repository -y ppa:bitcoin/bitcoin && \
eatmydata apt-get update && \
eatmydata apt-get install -yy \
build-essential autoconf libtool libprotobuf-c-dev libsqlite3-dev libgmp-dev libsqlite3-dev git python3 python valgrind net-tools bitcoind python3-pip && \
pip3 install python-bitcoinlib
RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}
RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
USER ${USER}
ENV HOME ${HOME}
RUN /bin/bash
EOF
# Run the docker container, execute the build script we just built
docker run --rm=true --user="${USER}" -w "$TRAVIS_BUILD_DIR" -v "${HOME}":"${HOME}" \
-t ubuntu make -j2 check-source check
Loading…
Cancel
Save