-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
107 lines (85 loc) · 3.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
PYTEST_OPTS=--timeout=600 --timeout-method=thread -v -p no:logging
ifneq ($(PYTEST_PAR),)
PYTEST_OPTS += -n=$(PYTEST_PAR)
endif
NPROC = 4
OS=$(shell uname -s)
ifeq ($(OS),Linux)
NPROC=$(shell grep -c ^processor /proc/cpuinfo)
endif
PWD = $(shell pwd)
GO111MODULE = on
src/eclair:
git clone https://github.com/ACINQ/eclair.git src/eclair
src/lightning:
git clone --recurse-submodules https://github.com/ElementsProject/lightning.git src/lightning
src/lnd:
git clone https://github.com/lightningnetwork/lnd src/lnd
src/ptarmigan:
git clone https://github.com/nayutaco/ptarmigan.git src/ptarmigan
update-eclair: src/eclair
rm src/eclair/version || true
cd src/eclair && git stash; git pull origin master
update-clightning: src/lightning
rm src/lightning/version || true
cd src/lightning && git stash; git pull origin master
update-lnd: src/lnd
rm src/lnd/version || true
cd src/lnd && git stash; git pull origin master
update-ptarmigan: src/ptarmigan
rm src/ptarmigan/version || true
cd src/ptarmigan && git stash; git pull origin master
update: update-eclair update-clightning update-lnd update-ptarmigan
bin/eclair.jar: src/eclair
(cd src/eclair; git rev-parse HEAD) > src/eclair/version
(cd src/eclair/; mvn -T ${NPROC} package -Dmaven.test.skip=true || true)
cp src/eclair/eclair-node/target/eclair-node-*-$(shell git --git-dir=src/eclair/.git rev-parse HEAD | cut -b 1-7).jar bin/eclair.jar
bin/lightningd: src/lightning
(cd src/lightning; git rev-parse HEAD) > src/lightning/version
cd src/lightning; ./configure --enable-developer --disable-valgrind && make CC=clang -j${NPROC}
cp src/lightning/lightningd/lightningd src/lightning/lightningd/lightning_* bin
bin/ptarmd: src/ptarmigan
(cd src/ptarmigan; git rev-parse HEAD) > src/ptarmigan/version
cd src/ptarmigan; sed -i -e "s/ENABLE_DEVELOPER_MODE=0/ENABLE_DEVELOPER_MODE=1/g" options.mak
cd src/ptarmigan; sed -i -e "s/ENABLE_PLOG_TO_STDOUT_PTARMD=0/ENABLE_PLOG_TO_STDOUT_PTARMD=1/g" options.mak
cd src/ptarmigan; make full
cp src/ptarmigan/install/ptarmd bin
cp src/ptarmigan/install/showdb bin
cp src/ptarmigan/install/routing bin
bin/lnd: src/lnd
(cd src/lnd; git rev-parse HEAD) > src/lnd/version
cd src/lnd \
&& go mod vendor \
&& go build -v -mod=vendor -o lnd cmd/lnd/main.go \
&& go build -v -mod=vendor -o lncli github.com/lightningnetwork/lnd/cmd/lncli
cp src/lnd/lnd src/lnd/lncli bin/
clean:
rm src/lnd/version src/lightning/version src/eclair/version src/ptarmigan/version || true
rm bin/* || true
cd src/lightning; make clean
cd src/eclair; mvn clean
cd src/ptarmigan; make distclean
clients: bin/lightningd bin/lnd bin/eclair.jar bin/ptarmd
test: clients
# Failure is always an option
py.test -v test.py ${PYTEST_OPTS} --json=report.json || true
python cli.py postprocess
site:
rm -rf output/*; rm templates/*.json || true
cp reports/* templates/
python cli.py html
push:
cd output; \
git init;\
git config user.name "Travis CI";\
git config user.email "[email protected]";\
git add .;\
git commit --quiet -m "Deploy to GitHub Pages";\
git push --force "[email protected]:cdecker/lightning-integration.git" master:gh-pages
docker-build:
docker build --tag=lnintegration .
docker-run: docker-build
docker run lnintegration
builder:
docker build -t cdecker/lightning-integration:latest - <Dockerfile
docker push cdecker/lightning-integration:latest