Skip to content

Commit

Permalink
Problem: windows rocksdb build job don't upload checksum (#674)
Browse files Browse the repository at this point in the history
* Problem: windows rocksdb build job don't upload checksum

Closes: #668
Solution:
- keep the rocksdb version only
- build testnet verson
- upload checksums

* update goreleaser
  • Loading branch information
yihuang authored Aug 25, 2022
1 parent 41d451f commit 61e17c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 50 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
draft: true
files: "${{ env.FILES }}"

x86_64-windows:
x86_64-windows:
needs: ["goreleaser"]
runs-on: windows-latest
environment: release
Expand Down Expand Up @@ -151,12 +151,19 @@ jobs:
cd ./build
tar cvfz ../cronos.tar.gz *
cd ..
ls -la ./cronos.tar.gz
mv ./cronos.tar.gz cronos_${GITHUB_REF_NAME:1}-rocksdb_${PLATFORM}.tar.gz
ls -la cronos_${GITHUB_REF_NAME:1}-rocksdb_${PLATFORM}.tar.gz
mv ./cronos.tar.gz cronos_${GITHUB_REF_NAME:1}_${PLATFORM}.tar.gz
NETWORK=testnet ENABLE_ROCKSDB=true COSMOS_BUILD_OPTIONS=rocksdb make build
mv ./build/cronosd ./build/cronosd.exe
cd ./build
tar cvfz ../cronos.tar.gz *
cd ..
mv ./cronos.tar.gz cronos_${GITHUB_REF_NAME:1}-testnet_${PLATFORM}.tar.gz
ls -la cronos_*.tar.gz
sha256sum cronos_*.tar.gz > "checksums-$PLATFORM.txt"
echo "OK"
echo 'FILES<<EOF' >> $GITHUB_ENV
ls -1 *.tar.gz >> $GITHUB_ENV
ls -1 checksums-*.txt >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
cat $GITHUB_ENV
- name: upload
Expand Down
48 changes: 2 additions & 46 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@ builds:
- -tags=ledger,cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=cronos -X github.com/cosmos/cosmos-sdk/version.AppName=cronosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "cronosd-windows"
main: ./cmd/cronosd
binary: bin/cronosd
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
flags:
- -tags=ledger,cgo
- -buildmode=exe
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=cronos -X github.com/cosmos/cosmos-sdk/version.AppName=cronosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "cronosd-darwin-arm64-testnet"
main: ./cmd/cronosd
binary: bin/cronosd
Expand All @@ -49,51 +33,23 @@ builds:
- -tags=testnet,ledger,cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=cronos -X github.com/cosmos/cosmos-sdk/version.AppName=cronosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}-testnet -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "cronosd-windows-testnet"
main: ./cmd/cronosd
binary: bin/cronosd
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
flags:
- -tags=testnet,ledger,cgo
- -buildmode=exe
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=cronos -X github.com/cosmos/cosmos-sdk/version.AppName=cronosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}-testnet -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}

archives:
- id: mainnet
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
builds:
- cronosd-darwin-arm64
- cronosd-windows
- cronosd-darwin-arm64
- id: testnet
name_template: '{{ .ProjectName }}_{{ .Version }}-testnet_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
builds:
- cronosd-darwin-arm64-testnet
- cronosd-windows-testnet

checksum:
name_template: 'checksums-others.txt'
name_template: 'checksums-Darwin-arm64.txt'
changelog:
sort: asc
filters:
Expand Down

0 comments on commit 61e17c1

Please sign in to comment.