ci: rocksdb version in makefile (#21654)
This commit is contained in:
parent
e9eaefa379
commit
aa8bf41eb9
12
.github/scripts/get-rocksdb-version.sh
vendored
Executable file
12
.github/scripts/get-rocksdb-version.sh
vendored
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
# Search for rocksdb_version in makefile
|
||||
rocksdb_version=$(grep "rocksdb_version" ./scripts/build/build.mk | cut -d'=' -f2)
|
||||
|
||||
if [[ -z "${rocksdb_version}" ]]; then
|
||||
echo "Error: rocksdb_version not found in ./scripts/build/build.mk" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "ROCKSDB_VERSION=${rocksdb_version}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
2
.github/scripts/install-rocksdb.sh
vendored
2
.github/scripts/install-rocksdb.sh
vendored
@ -12,7 +12,7 @@ sudo apt update && sudo apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev l
|
||||
# Clone RocksDB repository
|
||||
git clone https://github.com/facebook/rocksdb.git /home/runner/rocksdb
|
||||
cd /home/runner/rocksdb || exit 1
|
||||
git checkout "v${ROCKSDB_VERSION}"
|
||||
git checkout "${ROCKSDB_VERSION}"
|
||||
|
||||
# Build shared library
|
||||
sudo make -j "$(nproc --all)" shared_lib
|
||||
|
||||
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -13,9 +13,6 @@ concurrency:
|
||||
group: ci-${{ github.ref }}-build
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
ROCKSDB_VERSION: 8.11.3
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -28,6 +25,8 @@ jobs:
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Get rocksdb version
|
||||
run: ./.github/scripts/get-rocksdb-version.sh
|
||||
- name: Fix permissions for cache
|
||||
run: sudo chown $(whoami) /usr/local/lib /usr/local/include
|
||||
- name: Restore rocksdb libraries cache
|
||||
|
||||
5
.github/workflows/lint.yml
vendored
5
.github/workflows/lint.yml
vendored
@ -9,9 +9,6 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ROCKSDB_VERSION: 8.11.3
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: golangci-lint
|
||||
@ -30,6 +27,8 @@ jobs:
|
||||
Makefile
|
||||
**/Makefile
|
||||
.golangci.yml
|
||||
- name: Get rocksdb version
|
||||
run: ./.github/scripts/get-rocksdb-version.sh
|
||||
- name: Fix permissions for cache
|
||||
run: sudo chown $(whoami) /usr/local/lib /usr/local/include
|
||||
- name: Restore rocksdb libraries cache
|
||||
|
||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -13,8 +13,6 @@ concurrency:
|
||||
group: ci-${{ github.ref }}-tests
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
ROCKSDB_VERSION: 8.11.3
|
||||
|
||||
jobs:
|
||||
split-test-files:
|
||||
@ -790,6 +788,8 @@ jobs:
|
||||
store/**/*.go
|
||||
store/go.mod
|
||||
store/go.sum
|
||||
- name: Get rocksdb version
|
||||
run: ./.github/scripts/get-rocksdb-version.sh
|
||||
- name: Fix permissions for cache
|
||||
run: sudo chown $(whoami) /usr/local/lib /usr/local/include
|
||||
- name: Restore rocksdb libraries cache
|
||||
@ -848,6 +848,8 @@ jobs:
|
||||
store/v2/**/*.go
|
||||
store/v2/go.mod
|
||||
store/v2/go.sum
|
||||
- name: Get rocksdb version
|
||||
run: ./.github/scripts/get-rocksdb-version.sh
|
||||
- name: Fix permissions for cache
|
||||
run: sudo chown $(whoami) /usr/local/lib /usr/local/include
|
||||
- name: Restore rocksdb libraries cache
|
||||
|
||||
@ -12,6 +12,8 @@ HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git
|
||||
DOCKER := $(shell which docker)
|
||||
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)
|
||||
|
||||
rocksdb_version=v8.11.3
|
||||
|
||||
ifeq ($(findstring .,$(VERSION)),)
|
||||
VERSION := 0.0.0
|
||||
endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user