Skip to content

Commit

Permalink
set min Go version to v1.21 (#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 authored Nov 11, 2024
1 parent 2827c68 commit b239e99
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 55 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/cd-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@ jobs:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Set Badger Release Version
run: |
#!/bin/bash
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
if [[ "$GIT_TAG_NAME" == "v"* ]];
if [[ "$GIT_TAG_NAME" == "v"* ]];
then
echo "this is a release tag"
else
Expand Down Expand Up @@ -57,20 +52,15 @@ jobs:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Set Badger Release Version
run: |
#!/bin/bash
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
if [[ "$GIT_TAG_NAME" == "v"* ]];
if [[ "$GIT_TAG_NAME" == "v"* ]];
then
echo "this is a release tag"
else
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-badger-bank-tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ jobs:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Install Dependencies
run: make dependency
- name: Install jemalloc
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-badger-bank-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ jobs:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Install Dependencies
run: make dependency
- name: Install jemalloc
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-badger-tests-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ jobs:
- uses: actions/checkout@v4 # checkout merge commit
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Install Dependencies
run: make dependency
- name: Run Badger Tests
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-badger-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ jobs:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Install Dependencies
run: make dependency
- name: Run Badger Tests
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-dgraph-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ jobs:
with:
repository: dgraph-io/dgraph
ref: main
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: Fetch latest Badger version
run: |
go get github.com/dgraph-io/badger/v4@main
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-golang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@ jobs:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
go-version-file: go.mod
- name: golang-lint
uses: golangci/[email protected]
with:
Expand Down
1 change: 0 additions & 1 deletion .go-version

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For more details on our version naming schema please read [Choosing a version](#
## Getting Started

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

```sh
$ go get github.com/dgraph-io/badger/v4
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.23.2

require (
github.com/cespare/xxhash/v2 v2.3.0
github.com/dgraph-io/ristretto/v2 v2.0.0-rc1
github.com/dgraph-io/ristretto/v2 v2.0.0
github.com/dustin/go-humanize v1.0.1
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgraph-io/ristretto/v2 v2.0.0-rc1 h1:hdTJGtatuthLoGQDw6OtjZEL0PBxgiHZLM1wkKxEOL4=
github.com/dgraph-io/ristretto/v2 v2.0.0-rc1/go.mod h1:FVFokF2dRqXyPyeMnK1YDy8Fc6aTe0IKgbcd03CYeEk=
github.com/dgraph-io/ristretto/v2 v2.0.0 h1:l0yiSOtlJvc0otkqyMaDNysg8E9/F/TYZwMbxscNOAQ=
github.com/dgraph-io/ristretto/v2 v2.0.0/go.mod h1:FVFokF2dRqXyPyeMnK1YDy8Fc6aTe0IKgbcd03CYeEk=
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
Expand Down

0 comments on commit b239e99

Please sign in to comment.