diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..52d90feb6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,38 @@ +# This file is used to build and test `lightningd` + +# Image automatically built by https://github.com/cdecker/dockerfiles/tree/master/lightning/ci +image: cdecker/lightning-ci:latest + +build: + stage: build + before_script: + - >- + curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN" + -X POST + --data '{"state": "pending", "description": "Gitlab-CI is building the commit", "context": "gitlab-ci"}' + https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_BUILD_REF || true + script: + - make + - make -j 12 check + - make check-source + + artifacts: + paths: + - daemon/lightningd + - daemon/lightning-cli + +update-status-fail: + image: tutum/curl + stage: deploy + when: on_failure + script: + - >- + curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN" -X POST --data '{"state": "failure", "description": "Gitlab-CI build failed, please contact @cdecker for details about build #$CI_BUILD_ID.", "context": "gitlab-ci"}' https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_BUILD_REF || true + +update-status-success: + image: tutum/curl + stage: deploy + when: on_success + script: + - >- + curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN" -X POST --data '{"state": "success", "description": "Gitlab-CI build succeeded.", "context": "gitlab-ci"}' https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_BUILD_REF || true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b1b5119e9..000000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -sudo: required -dist: trusty -language: c -before_install: - - sudo add-apt-repository ppa:bitcoin/bitcoin -y - - sudo add-apt-repository ppa:ondrej/pkg-nlnetlabs -y || true # This fails due to UTF-8 in the author's name... - - sudo add-apt-repository ppa:chris-lea/libsodium -y - - sudo apt-get -qq update -install: - - sudo apt-get install -y --no-install-recommends bitcoind build-essential automake eatmydata net-tools libtool libprotobuf-c-dev libsodium-dev libsqlite3-dev valgrind protobuf-c-compiler libgmp-dev - - git clone https://github.com/luke-jr/libbase58.git libbase58; cd libbase58; ./autogen.sh; ./configure; make; sudo make install; cd .. - - git clone https://github.com/rustyrussell/lightning-rfc.git ../lightning-rfc -compiler: - - gcc -script: - - make clean - - make - - make full-check -after_failure: - - sudo killall lightningd - - sudo kill `ps aux | grep lightningd | grep -v grep | awk '{print $2}'`; - - tar -cvjf /tmp/travis-run.tar.bz2 /tmp/lightning.*.?; - - curl --upload-file /tmp/travis-run.tar.bz2 https://transfer.sh/travis-run.tar.bz2; -env: - global: - - LD_LIBRARY_PATH=/usr/local/lib