Skip to content

Commit

Permalink
Bump minimum Go version to v1.20 (#65)
Browse files Browse the repository at this point in the history
* Fix lints

Signed-off-by: Thane Thomson <[email protected]>

* Bump minimum Go version to 1.20

Signed-off-by: Thane Thomson <[email protected]>

* Install gcc 11

---------

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: lasarojc <[email protected]>
  • Loading branch information
thanethomson and lasarojc authored Jun 16, 2023
1 parent 6473b40 commit 134011f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
- uses: golangci/[email protected]
with:
args: --timeout 10m
version: v1.51.2
version: latest
github-token: ${{ secrets.github_token }}
19 changes: 19 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,22 @@ issues:
linters-settings:
errcheck:
check-blank: true
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/cometbft
- github.com/syndtr/goleveldb/leveldb
- github.com/google/btree
test:
files:
- $test
allow:
- $gostd
- github.com/cometbft
- github.com/syndtr/goleveldb/leveldb
- github.com/stretchr/testify
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test-all-with-coverage:

lint:
@echo "--> Running linter"
@golangci-lint run
@go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run
@go mod verify
.PHONY: lint

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ recommend depending on this library for new projects.

### Minimum Go Version

Go 1.19+
Go 1.20+

## Supported Database Backends

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cometbft/cometbft-db

go 1.19
go 1.20

require (
github.com/dgraph-io/badger/v2 v2.2007.4
Expand Down
7 changes: 5 additions & 2 deletions tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
# updates here, merge the changes here first and let the image get updated (or
# push a new version manually) before PRs that depend on them.

FROM golang:1.19-bullseye AS build
FROM golang:1.20 AS build

ENV LD_LIBRARY_PATH=/usr/local/lib

RUN apt-get update && apt-get install -y --no-install-recommends \
libbz2-dev libgflags-dev libsnappy-dev libzstd-dev zlib1g-dev \
make tar wget
make tar wget build-essential gcc-11 g++-11

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11

FROM build AS install
ARG LEVELDB=1.20
Expand Down

0 comments on commit 134011f

Please sign in to comment.