Skip to content

Commit

Permalink
ci: add rocksdb lib install step (#430)
Browse files Browse the repository at this point in the history
* ci: add rocksdb lib install step

* ci: add apt update

* ci: add apt update
  • Loading branch information
cosmic-vagabond authored Mar 26, 2024
1 parent b73704b commit a4b190f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ builds:
binary: elysd
hooks:
pre:
# install wasmvm libs
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a
# install rocksdb lib
- apt update -y && apt install -y libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
- cd /tmp && wget https://github.com/facebook/rocksdb/archive/refs/tags/v{{ .Env.ROCKSDB_VERSION }}.tar.gz && tar -xvf v{{ .Env.ROCKSDB_VERSION }}.tar.gz && cd rocksdb-{{ .Env.ROCKSDB_VERSION }} || return
- export CXXFLAGS='-Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=class-memaccess'
- make shared_lib
- make install-shared INSTALL_PATH=/usr
- rm -rf /tmp/rocksdb-{{ .Env.ROCKSDB_VERSION }} /tmp/v{{ .Env.ROCKSDB_VERSION }}.tar.gz
- export LD_LIBRARY_PATH=/usr/local/lib
goos:
- linux
goarch:
Expand All @@ -78,7 +87,7 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.AppName=elysd
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo,rocksdb
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
Expand All @@ -93,7 +102,16 @@ builds:
binary: elysd
hooks:
pre:
# install wasmvm libs
- wget https://github.com/CosmWasm/wasmvm/releases/download/{{ .Env.COSMWASM_VERSION }}/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a
# install rocksdb lib
- apt update -y && apt install -y libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
- cd /tmp && wget https://github.com/facebook/rocksdb/archive/refs/tags/v{{ .Env.ROCKSDB_VERSION }}.tar.gz && tar -xvf v{{ .Env.ROCKSDB_VERSION }}.tar.gz && cd rocksdb-{{ .Env.ROCKSDB_VERSION }} || return
- export CXXFLAGS='-Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=class-memaccess'
- make shared_lib
- make install-shared INSTALL_PATH=/usr
- rm -rf /tmp/rocksdb-{{ .Env.ROCKSDB_VERSION }} /tmp/v{{ .Env.ROCKSDB_VERSION }}.tar.gz
- export LD_LIBRARY_PATH=/usr/local/lib
goos:
- linux
goarch:
Expand All @@ -108,7 +126,7 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.AppName=elysd
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,osusergo,rocksdb
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ stop-docker:

GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:v$(GO_VERSION)
COSMWASM_VERSION := $(shell go list -m github.com/CosmWasm/wasmvm | sed 's/.* //')
ROCKSDB_VERSION := 8.9.1

## release: Build binaries for all platforms and generate checksums
ifdef GITHUB_TOKEN
Expand Down

0 comments on commit a4b190f

Please sign in to comment.