Skip to content

Commit b239e99

Browse files
authored
set min Go version to v1.21 (#2126)
1 parent 2827c68 commit b239e99

11 files changed

+14
-55
lines changed

.github/workflows/cd-badger.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,15 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
ref: '${{ github.event.inputs.releasetag }}'
16-
- name: Get Go Version
17-
run: |
18-
#!/bin/bash
19-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
20-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2116
- name: Set up Go
2217
uses: actions/setup-go@v5
2318
with:
24-
go-version: ${{ env.GOVERSION }}
19+
go-version-file: go.mod
2520
- name: Set Badger Release Version
2621
run: |
2722
#!/bin/bash
2823
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
29-
if [[ "$GIT_TAG_NAME" == "v"* ]];
24+
if [[ "$GIT_TAG_NAME" == "v"* ]];
3025
then
3126
echo "this is a release tag"
3227
else
@@ -57,20 +52,15 @@ jobs:
5752
- uses: actions/checkout@v4
5853
with:
5954
ref: '${{ github.event.inputs.releasetag }}'
60-
- name: Get Go Version
61-
run: |
62-
#!/bin/bash
63-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
64-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
6555
- name: Set up Go
6656
uses: actions/setup-go@v5
6757
with:
68-
go-version: ${{ env.GOVERSION }}
58+
go-version-file: go.mod
6959
- name: Set Badger Release Version
7060
run: |
7161
#!/bin/bash
7262
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
73-
if [[ "$GIT_TAG_NAME" == "v"* ]];
63+
if [[ "$GIT_TAG_NAME" == "v"* ]];
7464
then
7565
echo "this is a release tag"
7666
else

.github/workflows/ci-badger-bank-tests-nightly.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,10 @@ jobs:
1717
runs-on: warp-ubuntu-latest-x64-4x
1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Get Go Version
21-
run: |
22-
#!/bin/bash
23-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
24-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2520
- name: Setup Go
2621
uses: actions/setup-go@v5
2722
with:
28-
go-version: ${{ env.GOVERSION }}
23+
go-version-file: go.mod
2924
- name: Install Dependencies
3025
run: make dependency
3126
- name: Install jemalloc

.github/workflows/ci-badger-bank-tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@ jobs:
1515
runs-on: warp-ubuntu-latest-x64-4x
1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Get Go Version
19-
run: |
20-
#!/bin/bash
21-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
22-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2318
- name: Setup Go
2419
uses: actions/setup-go@v5
2520
with:
26-
go-version: ${{ env.GOVERSION }}
21+
go-version-file: go.mod
2722
- name: Install Dependencies
2823
run: make dependency
2924
- name: Install jemalloc

.github/workflows/ci-badger-tests-coverage.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,10 @@ jobs:
1717
- uses: actions/checkout@v4 # checkout merge commit
1818
with:
1919
ref: "refs/pull/${{ github.event.number }}/merge"
20-
- name: Get Go Version
21-
run: |
22-
#!/bin/bash
23-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
24-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2520
- name: Setup Go
2621
uses: actions/setup-go@v5
2722
with:
28-
go-version: ${{ env.GOVERSION }}
23+
go-version-file: go.mod
2924
- name: Install Dependencies
3025
run: make dependency
3126
- name: Run Badger Tests

.github/workflows/ci-badger-tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@ jobs:
1515
runs-on: warp-ubuntu-latest-x64-4x
1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Get Go Version
19-
run: |
20-
#!/bin/bash
21-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
22-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2318
- name: Setup Go
2419
uses: actions/setup-go@v5
2520
with:
26-
go-version: ${{ env.GOVERSION }}
21+
go-version-file: go.mod
2722
- name: Install Dependencies
2823
run: make dependency
2924
- name: Run Badger Tests

.github/workflows/ci-dgraph-tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ jobs:
1818
with:
1919
repository: dgraph-io/dgraph
2020
ref: main
21-
- name: Get Go Version
22-
run: |
23-
#!/bin/bash
24-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
25-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2621
- name: Set up Go
2722
uses: actions/setup-go@v5
2823
with:
29-
go-version: ${{ env.GOVERSION }}
24+
go-version-file: go.mod
3025
- name: Fetch latest Badger version
3126
run: |
3227
go get github.com/dgraph-io/badger/v4@main

.github/workflows/ci-golang-lint.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,10 @@ jobs:
1616
runs-on: warp-ubuntu-latest-x64-4x
1717
steps:
1818
- uses: actions/checkout@v4
19-
- name: Get Go Version
20-
run: |
21-
#!/bin/bash
22-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
23-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
2419
- name: Setup Go
2520
uses: actions/setup-go@v5
2621
with:
27-
go-version: ${{ env.GOVERSION }}
22+
go-version-file: go.mod
2823
- name: golang-lint
2924
uses: golangci/[email protected]
3025
with:

.go-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ For more details on our version naming schema please read [Choosing a version](#
6262
## Getting Started
6363

6464
### Installing
65-
To start using Badger, install Go 1.23 or above. Badger v3 and above needs go modules. From your project, run the following command
65+
To start using Badger, install Go 1.21 or above. Badger v3 and above needs go modules. From your project, run the following command
6666

6767
```sh
6868
$ go get github.com/dgraph-io/badger/v4

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.23.2
66

77
require (
88
github.com/cespare/xxhash/v2 v2.3.0
9-
github.com/dgraph-io/ristretto/v2 v2.0.0-rc1
9+
github.com/dgraph-io/ristretto/v2 v2.0.0
1010
github.com/dustin/go-humanize v1.0.1
1111
github.com/gogo/protobuf v1.3.2
1212
github.com/golang/protobuf v1.5.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
99
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1010
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1111
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
12-
github.com/dgraph-io/ristretto/v2 v2.0.0-rc1 h1:hdTJGtatuthLoGQDw6OtjZEL0PBxgiHZLM1wkKxEOL4=
13-
github.com/dgraph-io/ristretto/v2 v2.0.0-rc1/go.mod h1:FVFokF2dRqXyPyeMnK1YDy8Fc6aTe0IKgbcd03CYeEk=
12+
github.com/dgraph-io/ristretto/v2 v2.0.0 h1:l0yiSOtlJvc0otkqyMaDNysg8E9/F/TYZwMbxscNOAQ=
13+
github.com/dgraph-io/ristretto/v2 v2.0.0/go.mod h1:FVFokF2dRqXyPyeMnK1YDy8Fc6aTe0IKgbcd03CYeEk=
1414
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
1515
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
1616
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=

0 commit comments

Comments
 (0)