2023-04-04 21:18:22 +00:00
|
|
|
name: Continuous Integration (Rocksdb Build)
|
|
|
|
|
2023-08-22 15:24:48 +00:00
|
|
|
env:
|
2024-02-06 22:54:10 +00:00
|
|
|
ROCKSDB_VERSION: v8.10.0
|
2023-08-22 15:24:48 +00:00
|
|
|
|
2023-04-04 21:18:22 +00:00
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout repo from current commit
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-04 21:18:22 +00:00
|
|
|
- name: Set up Go
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/setup-go@v4
|
2023-04-04 21:18:22 +00:00
|
|
|
with:
|
2023-11-08 22:06:03 +00:00
|
|
|
go-version-file: go.mod
|
2023-04-04 21:18:22 +00:00
|
|
|
- name: build rocksdb dependency
|
|
|
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-rocksdb.sh
|
|
|
|
- name: build application
|
|
|
|
run: make build COSMOS_BUILD_OPTIONS=rocksdb
|
2023-08-22 15:24:48 +00:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: install RocksDB dependencies
|
|
|
|
run: sudo apt-get update
|
|
|
|
&& sudo apt-get install -y git make gcc libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
|
|
|
|
- name: install RocksDB as shared library
|
|
|
|
run: git clone https://github.com/facebook/rocksdb.git
|
|
|
|
&& cd rocksdb
|
|
|
|
&& git checkout $ROCKSDB_VERSION
|
|
|
|
&& sudo make -j$(nproc) install-shared
|
|
|
|
&& sudo ldconfig
|
|
|
|
- name: checkout repo from current commit
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-22 15:24:48 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Set up Go
|
2023-11-08 22:06:03 +00:00
|
|
|
uses: actions/setup-go@v4
|
2023-08-22 15:24:48 +00:00
|
|
|
with:
|
2023-11-08 22:06:03 +00:00
|
|
|
go-version-file: go.mod
|
2023-08-22 15:24:48 +00:00
|
|
|
- name: run unit tests
|
|
|
|
run: make test-rocksdb
|