install protoc #10
Workflow file for this run
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
name: Release build | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- releases | |
env: | |
LSPD_GO_VERSION: 1.21.0 | |
LND_GO_VERSION: 1.21.0 | |
LND_REF: 0c939786ced78a981bd77c7da628bfcf86ada568 | |
CLN_REF: v23.11.2 | |
jobs: | |
lspd: | |
name: Release lspd | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ | |
linux, | |
darwin, | |
] | |
arch: [ | |
arm64, | |
amd64, | |
] | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: setup go ${{ env.LSPD_GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '${{ env.LSPD_GO_VERSION }}' | |
- name: get commit id | |
run: | |
echo "COMMIT=$(git describe --tags --dirty)" >> $GITHUB_ENV | |
- name: build lspd | |
env: | |
GOOS: ${{ matrix.os }} | |
GOARCH: ${{ matrix.arch }} | |
PKG: github.com/breez/lspd | |
run: | | |
go get ${PKG} | |
go build -v -trimpath -o lspd -ldflags "-s -w -X ${PKG}/build.Commit=${COMMIT}" ${PKG} | |
- name: build cln plugin | |
env: | |
GOOS: ${{ matrix.os }} | |
GOARCH: ${{ matrix.arch }} | |
PKG: github.com/breez/lspd | |
run: | | |
go get ${PKG}/cln_plugin/cmd | |
go build -v -trimpath -o lspd_cln_plugin -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT}" ${PKG}/cln_plugin/cmd | |
- name: upload lspd artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lspd-${{ matrix.os }}-${{ matrix.arch }} | |
path: | | |
lspd | |
lspd_cln_plugin | |
lnd: | |
name: Release lnd | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ | |
linux, | |
darwin, | |
] | |
arch: [ | |
arm64, | |
amd64, | |
] | |
steps: | |
- name: Checkout LND for LSP | |
uses: actions/checkout@v4 | |
with: | |
repository: breez/lnd | |
ref: ${{ env.LND_REF }} | |
- name: setup go ${{ env.LND_GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '${{ env.LND_GO_VERSION }}' | |
- name: get commit id | |
run: | | |
echo "COMMIT=$(git describe --tags --dirty)" >> $GITHUB_ENV | |
- name: build lnd release | |
env: | |
GOEXPERIMENT: loopvar | |
CGO_ENABLED: 0 | |
GOARCH: ${{ matrix.arch }} | |
GOOS: ${{ matrix.os }} | |
PKG: github.com/lightningnetwork/lnd | |
run: | | |
go get ${PKG}/cmd/lnd | |
go get ${PKG}/cmd/lncli | |
go build -v -trimpath -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT}" -tags="submarineswaprpc chanreservedynamic routerrpc walletrpc chainrpc signrpc invoicesrpc" ${PKG}/cmd/lnd | |
go build -v -trimpath -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT}" -tags="submarineswaprpc chanreservedynamic routerrpc walletrpc chainrpc signrpc invoicesrpc" ${PKG}/cmd/lncli | |
- name: upload lnd artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lnd-${{ matrix.os }}-${{ matrix.arch }} | |
path: | | |
lnd | |
lncli | |
cln-macos: | |
name: Release lightningd | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ | |
macos-13, | |
macos-13-arm64, | |
] | |
steps: | |
- name: Checkout CLN for LSP | |
uses: actions/checkout@v4 | |
with: | |
repository: ElementsProject/lightning | |
ref: ${{ env.CLN_REF }} | |
- name: Install dependencies | |
run: brew install autoconf automake libtool gnu-sed gettext libsodium | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
with: | |
version: "23.4" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Silicon env variables | |
# if: ${{ matrix.os == 'macos-13-arm64' }} | |
# run: | | |
# echo "CPATH=/opt/homebrew/include" >> $GITHUB_ENV | |
# echo "LIBRARY_PATH=/opt/homebrew/lib" >> $GITHUB_ENV | |
- name: Setup Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install Python dependencies | |
run: | | |
pip3 install --upgrade pip | |
pip3 install poetry mako | |
- name: Build lightningd | |
# env: | |
# LDFLAGS: '-L/usr/local/opt/sqlite/lib' | |
# CPPFLAGS: '-I/usr/local/opt/sqlite/include' | |
run: | | |
poetry install | |
./configure | |
poetry run make -j$(nproc) | |
- name: upload cln artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cln-${{ matrix.os }} | |
path: | | |
lightningd/lightningd | |
cli/lightning-cli |