-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #921 from CounterpartyXCP/develop
9.55.0
- Loading branch information
Showing
74 changed files
with
9,747 additions
and
5,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,56 @@ | ||
language: python | ||
python: | ||
- "3.4" | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install python-coveralls | ||
- python setup.py install --with-serpent | ||
script: cd counterpartylib; py.test --skiptestbook=all --cov-config=../.coveragerc --cov-report=term-missing --cov=./ | ||
notifications: | ||
slack: | ||
secure: cl0G5fWZNnIK5VQ6BPZ4RtwVO2/nfvX/zjhljfF6cQ20OKyvyiJHq+e67fl2pkCKDlqlEqSWaQJ6G52YzUpDQmf+o7qpH6YnkFxSqYp5h4YF1hJw4sCHJ7bVSLrjogWxU8QaNvH7YpL4YkGe+WOau2FgoIZOcMt6hhKrvWclfuc= | ||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
env: | ||
global: | ||
# define DOCKER_USERNAME and DOCKER_PASSWORD | ||
- secure: "NZZCFpX/ubtrMHxU3C6+HkV+mrSUIAqRLXKySBiUJeiKaOsiVUl1AMd1cKQOrDp59dIFmjMvH+HGFbAKt3QvTcTImx0yye09bsXNKUKIQbVElnoZvkP6pZSxXAFcmjZdUGTfMSMkLukrXHgLb5ob2ziBCinJBoG57tgcUJnoZTc=" | ||
- secure: "d4TXRnQ4QffUFILVN6Hn7DA55unGDk0H6vZsmDRxP3ucLrUC/j8ko3Tm9jDeHZvVxGUe/e0dNXQ1WjaialCpB/h+rrnCEFExk9+oeUhhzn9GVOp488jqoiIwQxYM8cEh5I8Fh8lztBwaLnaI/MgRougFuOs3Ocf3v2IhBgvcwGs=" | ||
|
||
before_install: | ||
- sudo apt-get -qq update | ||
# add coveralls | ||
- sudo apt-get -y install python3 python3-pip | ||
- sudo pip3 install coveralls | ||
# upgrade docker, for build argument support | ||
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine | ||
- docker version | ||
- docker ps -a | ||
# get the current PR and branch name | ||
- sudo apt-get -y install jq | ||
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST | ||
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi) | ||
- echo $PR | ||
- echo $BRANCH | ||
# determine the docker image tag name ("nopush" being a placeholder to signify the image will not be pushed to dockerhub) | ||
- export DOCKER_TAG="nopush" | ||
- | | ||
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | ||
if [ "$BRANCH" == "master" ]; then export DOCKER_TAG="latest"; fi | ||
if [ "$BRANCH" == "develop" ]; then export DOCKER_TAG="develop"; fi | ||
fi | ||
- echo $DOCKER_TAG | ||
# try to check out the same branch for counterparty-lib (if it exists), and fallback to the develop branch if not | ||
- if curl --output /dev/null --silent --head --fail "https://github.com/CounterpartyXCP/counterparty-cli/tree/$BRANCH"; then export DOCKERFILE_CLI_BRANCH="$BRANCH"; else export DOCKERFILE_CLI_BRANCH="develop"; fi | ||
- echo $DOCKERFILE_CLI_BRANCH | ||
# build docker image | ||
- docker build -t counterparty/counterparty-server:$DOCKER_TAG --build-arg CLI_BRANCH="$DOCKERFILE_CLI_BRANCH" . | ||
|
||
script: | ||
# run the test suite in the docker container we just made | ||
- docker run --entrypoint=/bin/bash counterparty/counterparty-server:$DOCKER_TAG -c "cd /counterparty-lib/counterpartylib; py.test --verbose --skiptestbook=all --cov-config=../.coveragerc --cov-report=term-missing --cov=./" | ||
|
||
after_success: | ||
- coveralls | ||
# if it's master or develop, then push the appropirately tagged docker image (otherwise don't push anything) | ||
- | | ||
if [ "$DOCKER_TAG" != "nopush" ]; then | ||
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; | ||
docker push counterparty/counterparty-server:$DOCKER_TAG; | ||
fi | ||
sudo: required | ||
notifications: | ||
slack: | ||
secure: cl0G5fWZNnIK5VQ6BPZ4RtwVO2/nfvX/zjhljfF6cQ20OKyvyiJHq+e67fl2pkCKDlqlEqSWaQJ6G52YzUpDQmf+o7qpH6YnkFxSqYp5h4YF1hJw4sCHJ7bVSLrjogWxU8QaNvH7YpL4YkGe+WOau2FgoIZOcMt6hhKrvWclfuc= |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM counterparty/base | ||
|
||
MAINTAINER Counterparty Developers <[email protected]> | ||
|
||
# Install counterparty-lib | ||
COPY . /counterparty-lib | ||
WORKDIR /counterparty-lib | ||
RUN pip3 install -r requirements.txt | ||
RUN python3 setup.py develop | ||
RUN python3 setup.py install_apsw | ||
RUN python3 setup.py install_serpent | ||
|
||
# Install counterparty-cli | ||
# NOTE: By default, check out the counterparty-cli master branch. You can override the BRANCH build arg for a different | ||
# branch (as you should check out the same branch as what you have with counterparty-lib, or a compatible one) | ||
# NOTE2: In the future, counterparty-lib and counterparty-cli will go back to being one repo... | ||
ARG CLI_BRANCH=master | ||
ENV CLI_BRANCH ${CLI_BRANCH} | ||
RUN git clone -b ${CLI_BRANCH} https://github.com/CounterpartyXCP/counterparty-cli.git /counterparty-cli | ||
WORKDIR /counterparty-cli | ||
RUN pip3 install -r requirements.txt | ||
RUN python3 setup.py develop | ||
|
||
# Additional setup | ||
COPY docker/server.conf /root/.config/counterparty/server.conf | ||
COPY docker/start.sh /usr/local/bin/start.sh | ||
RUN chmod a+x /usr/local/bin/start.sh | ||
WORKDIR / | ||
|
||
# Pull the mainnet and testnet DB boostraps | ||
RUN counterparty-server bootstrap --quiet | ||
RUN counterparty-server --testnet bootstrap --quiet | ||
|
||
EXPOSE 4000 14000 | ||
|
||
# NOTE: Defaults to running on mainnet, specify -e TESTNET=1 to start up on testnet | ||
ENTRYPOINT ["start.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
# Keep this as non-docker for now, to give some variety to our test configurations, as travis builds with docker | ||
dependencies: | ||
override: | ||
- rm -rf /home/ubuntu/virtualenvs/venv-*/bin/serpent | ||
- rm -rf /home/ubuntu/virtualenvs/venv-*/lib/python3.4/site-packages/apsw* | ||
- pip install -r requirements.txt | ||
- python setup.py install --with-serpent | ||
- python -c "import apsw; print(apsw.apswversion())" | ||
test: | ||
override: | ||
- cd counterpartylib; py.test --verbose --capture=no --cov-config=../.coveragerc --cov-report=term-missing --cov=./ | ||
- py.test --verbose --capture=no counterpartylib/test/unit_test.py | ||
- py.test --verbose --capture=no counterpartylib/test/parse_block_test.py | ||
- py.test --verbose --capture=no --skiptestbook=all counterpartylib/test/integration_test.py | ||
- py.test --verbose --capture=no counterpartylib/test/contracts_test.py | ||
- py.test --verbose --capture=no --skiptestbook=mainnet -k test_book counterpartylib/test/reparse_test.py | ||
- py.test --verbose --capture=no --skiptestbook=testnet -k test_book counterpartylib/test/reparse_test.py | ||
- py.test --verbose --capture=no counterpartylib/test/database_version_test.py | ||
machine: | ||
pre: | ||
- mkdir -p ~/.local/share/counterparty | ||
- cd ~/.local/share/counterparty; wget https://s3.amazonaws.com/counterparty-bootstrap/counterparty-db.latest.tar.gz; tar xvzf counterparty-db.latest.tar.gz; | ||
- cd ~/.local/share/counterparty; wget https://s3.amazonaws.com/counterparty-bootstrap/counterparty-db-testnet.latest.tar.gz; tar xvzf counterparty-db-testnet.latest.tar.gz; | ||
- mkdir -p ~/.local/share/counterparty; | ||
- wget https://s3.amazonaws.com/counterparty-bootstrap/counterparty-db-testnet.latest.tar.gz -O ~/.local/share/counterparty/counterparty-db-testnet.latest.tar.gz; | ||
- tar -C ~/.local/share/counterparty -xvzf ~/.local/share/counterparty/counterparty-db-testnet.latest.tar.gz; | ||
- wget https://s3.amazonaws.com/counterparty-bootstrap/counterparty-db.latest.tar.gz -O ~/.local/share/counterparty/counterparty-db.latest.tar.gz; | ||
- tar -C ~/.local/share/counterparty -xvzf ~/.local/share/counterparty/counterparty-db.latest.tar.gz; | ||
python: | ||
version: 3.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.