Skip to content

Commit

Permalink
feat: add badger db support & tune release (#927)
Browse files Browse the repository at this point in the history
* tweak triggers to allow rc tags and also run on pull request

* bump golang to 1.18

* enable build tags badgerdb and rocksdb, get rid of CGO_ENABLED=0 to try to get ledger built in the binary statically as well

* move static flag to ldflags

* disable arm6 for now incompatible with badger

* reenable cgo_enabled=0, remove rocksdb from build tags to ease cross-compile

* reduce the diff

* add comments; also use Enable:ReleaseBuild label to control whether release build runs on pr

* bump ci to test label

* Revert "bump ci to test label"

This reverts commit da42097.

(cherry picked from commit 41fc62b)
  • Loading branch information
dreamcodez authored and mergify[bot] committed May 20, 2022
1 parent 245b58d commit 4bd4ba8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+\\.[0-9]+\\.[0-9]+" # Official release version tags e.g. v2.0.5
- "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" # Release candidate tags e.g. v1.0.3-rc4
pull_request:
types: [ opened, synchronize ]

jobs:
release:
Expand All @@ -16,12 +19,12 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: Set Env
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV
- name: Build
uses: goreleaser/goreleaser-action@v2
if: ${{ github.event_name == 'pull_request' }}
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Enable:ReleaseBuild')
with:
version: latest
args: build --rm-dist --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
Expand Down
3 changes: 1 addition & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
binary: umeed
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -tags=netgo ledger
- -tags=badgerdb ledger netgo
- -trimpath
env:
- CGO_ENABLED=0
Expand All @@ -25,7 +25,6 @@ builds:
- linux
goarch:
- amd64
- arm
- arm64

archives:
Expand Down

0 comments on commit 4bd4ba8

Please sign in to comment.