From 73fe1644203d98740f200fd2078b57a79b17d153 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:19:16 -0600 Subject: [PATCH 01/10] tweak triggers to allow rc tags and also run on pull request --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23afb7492e..5c8e84e2ec 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]+" + - "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" + pull_request: + types: [ opened, synchronize ] jobs: release: From 25edf1b4cd66dbae566df90f3ade107b75b596e0 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:19:31 -0600 Subject: [PATCH 02/10] bump golang to 1.18 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c8e84e2ec..51ae04c504 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ 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 From fa03b890de1684a1f9be8638611f86b9693b3ee9 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:20:32 -0600 Subject: [PATCH 03/10] enable build tags badgerdb and rocksdb, get rid of CGO_ENABLED=0 to try to get ledger built in the binary statically as well --- .goreleaser.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 40844ed4ec..9dd08f4ff7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -14,10 +14,9 @@ builds: binary: umeed mod_timestamp: "{{ .CommitTimestamp }}" flags: - - -tags=netgo ledger + - -tags=badgerdb ledger netgo rocksdb - -trimpath - env: - - CGO_ENABLED=0 + - -static ldflags: - -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }} goos: From 0a50e366b3ef9513f18bf9d4e40f27ca7416c516 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:26:00 -0600 Subject: [PATCH 04/10] move static flag to ldflags --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9dd08f4ff7..7cd17e5dc0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,8 +16,8 @@ builds: flags: - -tags=badgerdb ledger netgo rocksdb - -trimpath - - -static ldflags: + - '-extldflags "-static"' - -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }} goos: - darwin From c8a80680dc08ee2b898b26e92e68bbd32996a5a7 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:34:16 -0600 Subject: [PATCH 05/10] disable arm6 for now incompatible with badger --- .goreleaser.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 7cd17e5dc0..1aeaa1122f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -24,7 +24,6 @@ builds: - linux goarch: - amd64 - - arm - arm64 archives: From 63497578b00d92b4659d402886022ca693df5ead Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:43:02 -0600 Subject: [PATCH 06/10] reenable cgo_enabled=0, remove rocksdb from build tags to ease cross-compile --- .goreleaser.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1aeaa1122f..eef025863c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -14,11 +14,12 @@ builds: binary: umeed mod_timestamp: "{{ .CommitTimestamp }}" flags: - - -tags=badgerdb ledger netgo rocksdb + - -tags=badgerdb ledger netgo - -trimpath ldflags: - - '-extldflags "-static"' - -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }} + env: + - CGO_ENABLED=0 goos: - darwin - linux From 418d991e1fade584534dfe6e6b1791303fef4bbe Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 16:48:49 -0600 Subject: [PATCH 07/10] reduce the diff --- .goreleaser.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index eef025863c..058f4ede7c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,10 +16,10 @@ builds: flags: - -tags=badgerdb ledger netgo - -trimpath - ldflags: - - -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }} env: - CGO_ENABLED=0 + ldflags: + - -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }} goos: - darwin - linux From b7ff2a5ade39079ad4f1772631e55c113f130298 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 17:33:46 -0600 Subject: [PATCH 08/10] add comments; also use Enable:ReleaseBuild label to control whether release build runs on pr --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51ae04c504..6b47cf2b07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,8 @@ on: push: # Sequence of patterns matched against refs/tags tags: - - "v[0-9]+\\.[0-9]+\\.[0-9]+" - - "v[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+" + - "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 ] @@ -24,7 +24,7 @@ jobs: 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 From da42097a16d093661db090a13bd5b82b97c47cc3 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 17:35:55 -0600 Subject: [PATCH 09/10] bump ci to test label --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2c0eb45958..d03dc11cda 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,4 @@ To install the `umeed` binary: ```shell $ make install ``` + From fff1a5afdf2ac15e16b04819308ad7cc42f76469 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Thu, 19 May 2022 17:36:31 -0600 Subject: [PATCH 10/10] Revert "bump ci to test label" This reverts commit da42097a16d093661db090a13bd5b82b97c47cc3. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d03dc11cda..2c0eb45958 100644 --- a/README.md +++ b/README.md @@ -60,4 +60,3 @@ To install the `umeed` binary: ```shell $ make install ``` -