-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a730eeb
commit 9534f7b
Showing
140 changed files
with
46,771 additions
and
3,295 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
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,4 @@ | ||
*.so | ||
*.a | ||
vendor | ||
bin |
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,37 +1,50 @@ | ||
name: CI | ||
|
||
on: [ push, pull_request ] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: CI | ||
|
||
strategy: | ||
matrix: | ||
platform: [ ubuntu-latest ] | ||
go-version: [ 1.20.x ] | ||
platform: [ubuntu-latest] | ||
go-version: [1.21.x] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fetch dependencies | ||
run: go mod vendor | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Test | ||
- name: Setup Regtest | ||
run: | | ||
git clone https://github.com/BoltzExchange/legend-regtest-enviroment.git ~/regtest -b remove-mempool | ||
sudo chmod -R 777 ~/regtest | ||
cd ~/regtest | ||
chmod +x ./regtest | ||
./regtest | ||
sudo chmod -R a+rwx . | ||
- name: Unit Tests | ||
run: make unit | ||
|
||
- name: Integration Tests | ||
run: make integration | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: 'latest' | ||
version: "latest" |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "go-secp256k1-zkp"] | ||
path = go-secp256k1-zkp | ||
url = https://github.com/vulpemventures/go-secp256k1-zkp | ||
branch = v1.1.6 |
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,31 +1,37 @@ | ||
FROM golang:1.20.2-alpine3.17 as builder | ||
FROM golang:1.21-alpine as go | ||
FROM michael1011/gdk-ubuntu-builder:0.68.2 as builder | ||
|
||
# Install dependencies. | ||
RUN apk add --no-cache --update \ | ||
alpine-sdk \ | ||
git \ | ||
make \ | ||
gcc | ||
ARG GDK_ARGS | ||
RUN git clone https://github.com/Blockstream/gdk --depth 1 --branch release_0.68.2 | ||
RUN export PATH="/root/.cargo/bin:$PATH" && cd gdk && ./tools/build.sh --gcc --buildtype release --no-deps-rebuild --external-deps-dir /prebuild/gcc ${GDK_ARGS} | ||
|
||
# Shallow clone project. | ||
RUN git clone --depth=1 https://github.com/BoltzExchange/boltz-lnd /go/src/github.com/BoltzExchange/boltz-lnd | ||
COPY --from=go /usr/local/go /usr/local/go | ||
ENV PATH="/usr/local/go/bin:$PATH" | ||
|
||
WORKDIR /boltz-client | ||
|
||
COPY . ./ | ||
RUN cp /root/gdk/gdk/build-gcc/libgreenaddress_full.a /boltz-client/onchain/wallet/lib/ | ||
|
||
# Build the binaries. | ||
RUN cd /go/src/github.com/BoltzExchange/boltz-lnd \ | ||
&& go mod vendor \ | ||
&& make build | ||
RUN make deps static | ||
|
||
FROM scratch AS binaries | ||
|
||
COPY --from=builder /boltz-client/boltzd / | ||
COPY --from=builder /boltz-client/boltzcli / | ||
|
||
# Start a new, final image. | ||
FROM alpine:3.17 as final | ||
FROM ubuntu:jammy as final | ||
|
||
# Root volume for data persistence. | ||
VOLUME /root/.boltz-lnd | ||
VOLUME /root/.boltz | ||
|
||
# Copy binaries. | ||
COPY --from=builder /go/src/github.com/BoltzExchange/boltz-lnd/boltzd /bin/ | ||
COPY --from=builder /go/src/github.com/BoltzExchange/boltz-lnd/boltzcli /bin/ | ||
COPY --from=builder /boltz-client/boltzd /bin/ | ||
COPY --from=builder /boltz-client/boltzcli /bin/ | ||
|
||
# gRPC and REST ports | ||
EXPOSE 9002 9003 | ||
|
||
ENTRYPOINT ["boltzd"] | ||
CMD ["boltzd"] |
Oops, something went wrong.