-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "remove all dbs except for goleveldb + memdb"
This reverts commit 26e5cdc.
- Loading branch information
Showing
31 changed files
with
1,701 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: db-tests | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "tm2/pkg/db/**.go" | ||
- "go.sum" | ||
- ".github/workflows/db-tests.yml" | ||
push: | ||
branches: [ "master" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
# NOTE: this job uses a specific version of ubuntu as the version of grocksb | ||
# we use is related to the version of RocksDB in ubuntu's repositories. | ||
# If updating this to a later ubuntu release, update the grocksdb version | ||
# accordingly: | ||
# https://github.com/linxGnu/grocksdb/releases | ||
# https://pkgs.org/search/?q=rocksdb-dev | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
goversion: | ||
- "1.20.x" | ||
- "1.21.x" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# golang | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.goversion }} | ||
|
||
- name: install database dependencies | ||
run: sudo apt-get install -y libleveldb-dev librocksdb-dev | ||
|
||
- name: Set environment variables for debug mode | ||
if: env.ACTIONS_STEP_DEBUG == 'true' | ||
run: | | ||
export LOG_PATH_DIR=${{ runner.temp }}/logs | ||
mkdir -p $LOG_PATH_DIR | ||
echo "LOG_LEVEL=debug" >> $GITHUB_ENV | ||
echo "LOG_PATH_DIR=$LOG_PATH_DIR" >> $GITHUB_ENV | ||
# test ./pkgs/db | ||
- name: test ./tm2/pkg/db | ||
run: go test -v ./tm2/pkg/db/... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
// Package all imports all available databases. It is useful mostly in tests. | ||
// | ||
// cgo databases (rocksdb, cleveldb) will be excluded if CGO_ENABLED=0. | ||
package all | ||
|
||
import ( | ||
// Keep in sync with list of non-cgo backends. | ||
// Add cgo backends in all_cgo.go. | ||
_ "github.com/gnolang/gno/tm2/pkg/db/boltdb" | ||
_ "github.com/gnolang/gno/tm2/pkg/db/fsdb" | ||
_ "github.com/gnolang/gno/tm2/pkg/db/goleveldb" | ||
_ "github.com/gnolang/gno/tm2/pkg/db/memdb" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build cgo | ||
|
||
package all | ||
|
||
import ( | ||
// Keep in sync with list of cgo backends. | ||
// Add non-cgo backends in all.go. | ||
_ "github.com/gnolang/gno/tm2/pkg/db/cleveldb" | ||
_ "github.com/gnolang/gno/tm2/pkg/db/rocksdb" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//go:build boltdb | ||
|
||
package tags | ||
|
||
import _ "github.com/gnolang/gno/tm2/pkg/db/boltdb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//go:build cleveldb | ||
|
||
package tags | ||
|
||
import _ "github.com/gnolang/gno/tm2/pkg/db/cleveldb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//go:build fsdb | ||
|
||
package tags | ||
|
||
import _ "github.com/gnolang/gno/tm2/pkg/db/fsdb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//go:build rocksdb | ||
|
||
package tags | ||
|
||
import _ "github.com/gnolang/gno/tm2/pkg/db/rocksdb" |
Oops, something went wrong.