mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
multi: update build system to Go 1.23
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -34,7 +34,7 @@ env:
|
|||||||
|
|
||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
GO_VERSION: 1.22.11
|
GO_VERSION: 1.23.6
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
########################
|
########################
|
||||||
|
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -12,7 +12,7 @@ defaults:
|
|||||||
env:
|
env:
|
||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
GO_VERSION: 1.22.11
|
GO_VERSION: 1.23.6
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
run:
|
run:
|
||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
go: "1.22.11"
|
go: "1.23.6"
|
||||||
|
|
||||||
# Abort after 10 minutes.
|
# Abort after 10 minutes.
|
||||||
timeout: 10m
|
timeout: 10m
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
FROM golang:1.22.11-alpine as builder
|
FROM golang:1.23.6-alpine as builder
|
||||||
|
|
||||||
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
||||||
# queries required to connect to linked containers succeed.
|
# queries required to connect to linked containers succeed.
|
||||||
|
2
Makefile
2
Makefile
@@ -35,7 +35,7 @@ endif
|
|||||||
# GO_VERSION is the Go version used for the release build, docker files, and
|
# GO_VERSION is the Go version used for the release build, docker files, and
|
||||||
# GitHub Actions. This is the reference version for the project. All other Go
|
# GitHub Actions. This is the reference version for the project. All other Go
|
||||||
# versions are checked against this version.
|
# versions are checked against this version.
|
||||||
GO_VERSION = 1.22.11
|
GO_VERSION = 1.23.6
|
||||||
|
|
||||||
GOBUILD := $(LOOPVARFIX) go build -v
|
GOBUILD := $(LOOPVARFIX) go build -v
|
||||||
GOINSTALL := $(LOOPVARFIX) go install -v
|
GOINSTALL := $(LOOPVARFIX) go install -v
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
FROM golang:1.22.11-alpine as builder
|
FROM golang:1.23.6-alpine as builder
|
||||||
|
|
||||||
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"
|
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
FROM golang:1.22.11-alpine as builder
|
FROM golang:1.23.6-alpine as builder
|
||||||
|
|
||||||
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"
|
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
FROM golang:1.22.11-bookworm
|
FROM golang:1.23.6-bookworm
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
git \
|
git \
|
||||||
|
@@ -3,28 +3,28 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Directory of the script file, independent of where it's called from.
|
# Directory of the script file, independent of where it's called from.
|
||||||
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
# golang docker image version used in this script.
|
# golang docker image version used in this script.
|
||||||
GO_IMAGE=docker.io/library/golang:1.22.11-alpine
|
GO_IMAGE=docker.io/library/golang:1.23.6-alpine
|
||||||
|
|
||||||
PROTOBUF_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \
|
PROTOBUF_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \
|
||||||
go list -f '{{.Version}}' -m google.golang.org/protobuf)
|
go list -f '{{.Version}}' -m google.golang.org/protobuf)
|
||||||
GRPC_GATEWAY_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \
|
GRPC_GATEWAY_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \
|
||||||
go list -f '{{.Version}}' -m github.com/grpc-ecosystem/grpc-gateway/v2)
|
go list -f '{{.Version}}' -m github.com/grpc-ecosystem/grpc-gateway/v2)
|
||||||
|
|
||||||
echo "Building protobuf compiler docker image..."
|
echo "Building protobuf compiler docker image..."
|
||||||
docker build -t lnd-protobuf-builder \
|
docker build -t lnd-protobuf-builder \
|
||||||
--build-arg PROTOBUF_VERSION="$PROTOBUF_VERSION" \
|
--build-arg PROTOBUF_VERSION="$PROTOBUF_VERSION" \
|
||||||
--build-arg GRPC_GATEWAY_VERSION="$GRPC_GATEWAY_VERSION" \
|
--build-arg GRPC_GATEWAY_VERSION="$GRPC_GATEWAY_VERSION" \
|
||||||
.
|
.
|
||||||
|
|
||||||
echo "Compiling and formatting *.proto files..."
|
echo "Compiling and formatting *.proto files..."
|
||||||
docker run \
|
docker run \
|
||||||
--rm \
|
--rm \
|
||||||
--user "$UID:$(id -g)" \
|
--user "$UID:$(id -g)" \
|
||||||
-e UID=$UID \
|
-e UID=$UID \
|
||||||
-e COMPILE_MOBILE \
|
-e COMPILE_MOBILE \
|
||||||
-e SUBSERVER_PREFIX \
|
-e SUBSERVER_PREFIX \
|
||||||
-v "$DIR/../:/build" \
|
-v "$DIR/../:/build" \
|
||||||
lnd-protobuf-builder
|
lnd-protobuf-builder
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# If you change this please also update GO_VERSION in Makefile (then run
|
# If you change this please also update GO_VERSION in Makefile (then run
|
||||||
# `make lint` to see where else it needs to be updated as well).
|
# `make lint` to see where else it needs to be updated as well).
|
||||||
FROM golang:1.22.11-bookworm
|
FROM golang:1.23.6-bookworm
|
||||||
|
|
||||||
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.engineering>
|
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.engineering>
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.22.11
|
FROM golang:1.23.6
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y git
|
RUN apt-get update && apt-get install -y git
|
||||||
ENV GOCACHE=/tmp/build/.cache
|
ENV GOCACHE=/tmp/build/.cache
|
||||||
|
Reference in New Issue
Block a user