From 4bd4ba8ec373f0265094464a279ece831e546f66 Mon Sep 17 00:00:00 2001 From: Matthew Elder Date: Thu, 19 May 2022 18:08:54 -0600 Subject: [PATCH] feat: add badger db support & tune release (#927) * 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 da42097a16d093661db090a13bd5b82b97c47cc3. (cherry picked from commit 41fc62bc6fb56abede2bec3ae0df5e48d6ce6669) --- .github/workflows/release.yml | 9 ++++++--- .goreleaser.yml | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23afb7492e..6b47cf2b07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 diff --git a/.goreleaser.yml b/.goreleaser.yml index 40844ed4ec..058f4ede7c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -14,7 +14,7 @@ builds: binary: umeed mod_timestamp: "{{ .CommitTimestamp }}" flags: - - -tags=netgo ledger + - -tags=badgerdb ledger netgo - -trimpath env: - CGO_ENABLED=0 @@ -25,7 +25,6 @@ builds: - linux goarch: - amd64 - - arm - arm64 archives: