Skip to content

Commit 1a98996

Browse files
chore(ci): run jobs on release branch (#1829)
Run CI jobs on release branch.
1 parent 6310bf9 commit 1a98996

File tree

11 files changed

+149
-152
lines changed

11 files changed

+149
-152
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- main
6+
- release/v3.2103
67
schedule:
78
- cron: "0 3 * * *"
89
jobs:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ on:
33
push:
44
branches:
55
- main
6+
- release/v3.2103
67
pull_request:
78
branches:
89
- main
10+
- release/v3.2103
911
schedule:
1012
- cron: "*/30 * * * *"
1113
jobs:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ on:
33
push:
44
branches:
55
- main
6+
- release/v3.2103
67
pull_request:
78
branches:
89
- main
10+
- release/v3.2103
911
schedule:
1012
- cron: "*/30 * * * *"
1113
jobs:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ on:
33
push:
44
branches:
55
- main
6+
- release/v3.2103
67
pull_request:
78
branches:
89
- main
10+
- release/v3.2103
911
schedule:
1012
- cron: "*/30 * * * *"
1113
jobs:

.github/workflows/main.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.go-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.18

.golangci.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@ run:
33

44
linters-settings:
55
lll:
6-
line-length: 100
6+
line-length: 120
77

88
linters:
99
disable-all: true
1010
enable:
11-
- errcheck
12-
- ineffassign
13-
- gas
11+
# - errcheck
12+
# - ineffassign
13+
# - gas
1414
- gofmt
15-
- golint
15+
# - golint
1616
- gosimple
1717
- govet
1818
- lll
19-
- varcheck
20-
- unused
21-
22-
issues:
23-
exclude-rules:
24-
- linters:
25-
- gosec
26-
text: "G404: "
27-
19+
# - varcheck
20+
# - unused
21+
# - gosec

.travis.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

Makefile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Copyright 2022 Dgraph Labs, Inc. and Contributors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
USER_ID = $(shell id -u)
18+
HAS_JEMALLOC = $(shell test -f /usr/local/lib/libjemalloc.a && echo "jemalloc")
19+
JEMALLOC_URL = "https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2"
20+
21+
22+
.PHONY: all test jemalloc dependency
23+
24+
test: jemalloc
25+
@echo "Running Badger tests..."
26+
@./test.sh
27+
28+
jemalloc:
29+
@if [ -z "$(HAS_JEMALLOC)" ] ; then \
30+
mkdir -p /tmp/jemalloc-temp && cd /tmp/jemalloc-temp ; \
31+
echo "Downloading jemalloc..." ; \
32+
curl -s -L ${JEMALLOC_URL} -o jemalloc.tar.bz2 ; \
33+
tar xjf ./jemalloc.tar.bz2 ; \
34+
cd jemalloc-5.2.1 ; \
35+
./configure --with-jemalloc-prefix='je_' --with-malloc-conf='background_thread:true,metadata_thp:auto'; \
36+
make ; \
37+
if [ "$(USER_ID)" -eq "0" ]; then \
38+
make install ; \
39+
else \
40+
echo "==== Need sudo access to install jemalloc" ; \
41+
sudo make install ; \
42+
fi \
43+
fi
44+
45+
dependency:
46+
@echo "Installing dependencies..."
47+
@sudo apt-get update
48+
@sudo apt-get -y upgrade
49+
@sudo apt-get -y install \
50+
ca-certificates \
51+
curl \
52+
gnupg \
53+
lsb-release \
54+
build-essential \
55+
protobuf-compiler \

README.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# BadgerDB [![Go Reference](https://pkg.go.dev/badge/github.com/dgraph-io/badger/v3.svg)](https://pkg.go.dev/github.com/dgraph-io/badger/v3) [![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger)](https://goreportcard.com/report/github.com/dgraph-io/badger) [![Sourcegraph](https://sourcegraph.com/github.com/dgraph-io/badger/-/badge.svg)](https://sourcegraph.com/github.com/dgraph-io/badger?badge) [![Build Status](https://teamcity.dgraph.io/guestAuth/app/rest/builds/buildType:(id:Badger_UnitTests)/statusIcon.svg)](https://teamcity.dgraph.io/viewLog.html?buildTypeId=Badger_UnitTests&buildId=lastFinished&guest=1) ![Appveyor](https://ci.appveyor.com/api/projects/status/github/dgraph-io/badger?branch=master&svg=true) [![Coverage Status](https://coveralls.io/repos/github/dgraph-io/badger/badge.svg?branch=master)](https://coveralls.io/github/dgraph-io/badger?branch=master)
1+
# BadgerDB
2+
3+
[![Go Reference](https://pkg.go.dev/badge/github.com/dgraph-io/badger/v3.svg)](https://pkg.go.dev/github.com/dgraph-io/badger/v3)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/dgraph-io/badger/v3)](https://goreportcard.com/report/github.com/dgraph-io/badger/v3)
5+
[![Sourcegraph](https://sourcegraph.com/github.com/dgraph-io/badger/-/badge.svg)](https://sourcegraph.com/github.com/dgraph-io/badger?badge)
6+
[![ci-badger-tests](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-tests.yml/badge.svg)](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-tests.yml)
7+
[![ci-badger-bank-tests](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-bank-tests.yml/badge.svg)](https://github.com/dgraph-io/badger/actions/workflows/ci-badger-bank-tests.yml)
8+
[![ci-golang-lint](https://github.com/dgraph-io/badger/actions/workflows/ci-golang-lint.yml/badge.svg)](https://github.com/dgraph-io/badger/actions/workflows/ci-golang-lint.yml)
9+
210

311
![Badger mascot](images/diggy-shadow.png)
412

@@ -7,9 +15,7 @@ in pure Go. It is the underlying database for [Dgraph](https://dgraph.io), a
715
fast, distributed graph database. It's meant to be a performant alternative to
816
non-Go-based key-value stores like RocksDB.
917

10-
**Use [Discuss Issues](https://discuss.dgraph.io/c/issues/badger/37) for reporting issues about this repository.**
11-
12-
## Project Status [March 24, 2020]
18+
## Project Status
1319

1420
Badger is stable and is being used to serve data sets worth hundreds of
1521
terabytes. Badger supports concurrent ACID transactions with serializable
@@ -27,7 +33,9 @@ with v1.0 is v1.6.0.
2733
Badger v2.0 was released in Nov 2019 with a new storage format which won't
2834
be compatible with all of the v1.x. Badger v2.0 supports compression, encryption and uses a cache to speed up lookup.
2935

30-
The [Changelog] is kept fairly up-to-date.
36+
Badger v3.0 was released in January 2021. This release improves compaction performance.
37+
38+
Please consult the [Changelog] for more detailed information on releases.
3139

3240
For more details on our version naming schema please read [Choosing a version](#choosing-a-version).
3341

@@ -51,7 +59,7 @@ For more details on our version naming schema please read [Choosing a version](#
5159
## Getting Started
5260

5361
### Installing
54-
To start using Badger, install Go 1.12 or above. Badger v2 needs go modules. Run the following command to retrieve the library.
62+
To start using Badger, install Go 1.12 or above. Badger v3 needs go modules. From your project, run the following command
5563

5664
```sh
5765
$ go get github.com/dgraph-io/badger/v3
@@ -60,13 +68,14 @@ This will retrieve the library.
6068

6169
#### Installing Badger Command Line Tool
6270

63-
Download and extract the latest Badger DB release from https://github.com/dgraph-io/badger/releases and then run the following commands.
71+
Badger provides a CLI tool which can perform certain operations like offline backup/restore. To install the Badger CLI,
72+
retrieve the repository and checkout the desired version. Then run
6473

6574
```sh
66-
$ cd badger-<version>/badger
67-
$ go install
75+
$ cd badger
76+
$ go install .
6877
```
69-
This will install the badger command line utility into your $GOBIN path.
78+
This will install the badger command line utility into your $GOBIN path.
7079

7180
#### Choosing a version
7281

@@ -86,9 +95,12 @@ Following these rules:
8695
version is the same, therefore the data format on disk is compatible.
8796
- v1.6.0 and v2.0.0 are data incompatible as their major version implies, so files created with
8897
v1.6.0 will need to be converted into the new format before they can be used by v2.0.0.
98+
- v2.x.x and v3.x.x are data incompatible as their major version implies, so files created with
99+
v2.x.x will need to be converted into the new format before they can be used by v3.0.0.
100+
89101

90102
For a longer explanation on the reasons behind using a new versioning naming schema, you can read
91-
[VERSIONING.md](VERSIONING.md).
103+
[VERSIONING](VERSIONING.md).
92104

93105
## Badger Documentation
94106

@@ -99,9 +111,9 @@ Badger Documentation is available at https://dgraph.io/docs/badger
99111
### Blog Posts
100112
1. [Introducing Badger: A fast key-value store written natively in
101113
Go](https://open.dgraph.io/post/badger/)
102-
2. [Make Badger crash resilient with ALICE](https://blog.dgraph.io/post/alice/)
103-
3. [Badger vs LMDB vs BoltDB: Benchmarking key-value databases in Go](https://blog.dgraph.io/post/badger-lmdb-boltdb/)
104-
4. [Concurrent ACID Transactions in Badger](https://blog.dgraph.io/post/badger-txn/)
114+
2. [Make Badger crash resilient with ALICE](https://open.dgraph.io/post/alice/)
115+
3. [Badger vs LMDB vs BoltDB: Benchmarking key-value databases in Go](https://open.dgraph.io/post/badger-lmdb-boltdb/)
116+
4. [Concurrent ACID Transactions in Badger](https://open.dgraph.io/post/badger-txn/)
105117

106118
## Design
107119
Badger was written with these design goals in mind:
@@ -167,6 +179,7 @@ Below is a list of known projects that use Badger:
167179
* [Immudb](https://github.com/codenotary/immudb) - Lightweight, high-speed immutable database for systems and applications.
168180
* [Usenet Express](https://usenetexpress.com/) - Serving over 300TB of data with Badger.
169181
* [gorush](https://github.com/appleboy/gorush) - A push notification server written in Go.
182+
* [0-stor](https://github.com/zero-os/0-stor) - Single device object store.
170183
* [Dispatch Protocol](https://github.com/dispatchlabs/disgo) - Blockchain protocol for distributed application data analytics.
171184
* [GarageMQ](https://github.com/valinurovam/garagemq) - AMQP server written in Go.
172185
* [RedixDB](https://alash3al.github.io/redix/) - A real-time persistent key-value store with the same redis protocol.
@@ -189,15 +202,23 @@ Below is a list of known projects that use Badger:
189202
* [Terminotes](https://gitlab.com/asad-awadia/terminotes) - Self hosted notes storage and search server - storage powered by BadgerDB
190203
* [Pyroscope](https://github.com/pyroscope-io/pyroscope) - Open source confinuous profiling platform built with BadgerDB
191204
* [Veri](https://github.com/bgokden/veri) - A distributed feature store optimized for Search and Recommendation tasks.
205+
* [bIter](https://github.com/MikkelHJuul/bIter) - A library and Iterator interface for working with the `badger.Iterator`, simplifying from-to, and prefix mechanics.
206+
* [ld](https://github.com/MikkelHJuul/ld) - (Lean Database) A very simple gRPC-only key-value database, exposing BadgerDB with key-range scanning semantics.
207+
* [Souin](https://github.com/darkweak/Souin) - A RFC compliant HTTP cache with lot of other features based on Badger for the storage. Compatible with all existing reverse-proxies.
208+
* [Xuperchain](https://github.com/xuperchain/xupercore) - A highly flexible blockchain architecture with great transaction performance.
209+
* [m2](https://github.com/qichengzx/m2) - A simple http key/value store based on the raft protocol.
210+
* [chaindb](https://github.com/ChainSafe/chaindb) - A blockchain storage layer used by [Gossamer](https://chainsafe.github.io/gossamer/), a Go client for the [Polkadot Network](https://polkadot.network/).
211+
* [vxdb](https://github.com/vitalvas/vxdb) - Simple schema-less Key-Value NoSQL database with simplest API interface.
212+
* [Opacity](https://github.com/opacity/storage-node) - Backend implementation for the Opacity storage project
213+
* [Vephar](https://github.com/vaccovecrana/vephar) - A minimal key/value store using hashicorp-raft for cluster coordination and Badger for data storage.
192214

193215
If you are using Badger in a project please send a pull request to add it to the list.
194216

195217
## Contributing
196218

197-
If you're interested in contributing to Badger see [CONTRIBUTING.md](./CONTRIBUTING.md).
219+
If you're interested in contributing to Badger see [CONTRIBUTING](./CONTRIBUTING.md).
198220

199221
## Contact
200222
- Please use [discuss.dgraph.io](https://discuss.dgraph.io) for questions, feature requests and discussions.
201-
- Please use [Github issue tracker](https://github.com/dgraph-io/badger/issues) for filing bugs or feature requests.
202-
- Follow us on Twitter [@dgraphlabs](https://twitter.com/dgraphlabs).
203-
223+
- Please use [discuss.dgraph.io](https://discuss.dgraph.io) for filing bugs or feature requests.
224+
- Follow us on Twitter [@dgraphlabs](https://twitter.com/dgraphlabs).

0 commit comments

Comments
 (0)