go_1.18 on CI and in Docker (#3843)

This commit is contained in:
Alex Sharov 2022-04-21 14:51:30 +07:00 committed by GitHub
parent 1d1282f3c0
commit 667125bc65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -20,7 +20,7 @@ jobs:
- run: git submodule update --init --recursive --force
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
@ -34,6 +34,7 @@ jobs:
- run: make all
- name: Reproducible build test
run: |
make erigon
shasum -a256 ./build/bin/erigon > erigon1.sha256
make erigon
shasum -a256 ./build/bin/erigon > erigon2.sha256
@ -60,7 +61,7 @@ jobs:
- run: git submodule update --init --recursive --force
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- run: choco upgrade mingw cmake -y --no-progress
- name: Build
run: |

View File

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM docker.io/library/golang:1.17-alpine3.15 AS builder
FROM docker.io/library/golang:1.18-alpine3.15 AS builder
RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++

View File

@ -1,6 +1,6 @@
GO = go
GOBIN = $(CURDIR)/build/bin
GOTEST = GODEBUG=cgocheck=0 $(GO) test -tags nosqlite,noboltdb -trimpath ./... -p 2
GOTEST = GODEBUG=cgocheck=0 $(GO) test -tags nosqlite,noboltdb -buildvcs=false -trimpath ./... -p 2
GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
@ -11,8 +11,8 @@ CGO_CFLAGS += -DMDBX_FORCE_ASSERTIONS=1 # Enable MDBX's asserts by default in 'd
CGO_CFLAGS := CGO_CFLAGS="$(CGO_CFLAGS)"
DBG_CGO_CFLAGS += -DMDBX_DEBUG=1
GOBUILD = $(CGO_CFLAGS) $(GO) build -tags nosqlite,noboltdb -trimpath -ldflags "-X github.com/ledgerwatch/erigon/params.GitCommit=${GIT_COMMIT} -X github.com/ledgerwatch/erigon/params.GitBranch=${GIT_BRANCH} -X github.com/ledgerwatch/erigon/params.GitTag=${GIT_TAG}"
GO_DBG_BUILD = $(DBG_CGO_CFLAGS) $(GO) build -tags nosqlite,noboltdb -trimpath -tags=debug -ldflags "-X github.com/ledgerwatch/erigon/params.GitCommit=${GIT_COMMIT} -X github.com/ledgerwatch/erigon/params.GitBranch=${GIT_BRANCH} -X github.com/ledgerwatch/erigon/params.GitTag=${GIT_TAG}" -gcflags=all="-N -l" # see delve docs
GOBUILD = $(CGO_CFLAGS) $(GO) build -tags nosqlite,noboltdb -buildvcs=false -trimpath -ldflags "-X github.com/ledgerwatch/erigon/params.GitCommit=${GIT_COMMIT} -X github.com/ledgerwatch/erigon/params.GitBranch=${GIT_BRANCH} -X github.com/ledgerwatch/erigon/params.GitTag=${GIT_TAG}"
GO_DBG_BUILD = $(DBG_CGO_CFLAGS) $(GO) build -tags nosqlite,noboltdb,debug -buildvcs=false -trimpath -ldflags "-X github.com/ledgerwatch/erigon/params.GitCommit=${GIT_COMMIT} -X github.com/ledgerwatch/erigon/params.GitBranch=${GIT_BRANCH} -X github.com/ledgerwatch/erigon/params.GitTag=${GIT_TAG}" -gcflags=all="-N -l" # see delve docs
GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)