mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
967c6857e8
* build & publish rocksdb docker images merge to master * publish docker images on push of release version tags NOTE: New docker image tag pattern. ALL tags now include database suffix ex. <githash>-goleveldb, v0.25.0-alpha.1-rocksdb, master-rocksdb, etc * update dockerfiles for better caching * update all github action workflow versions * improve caching of go packages * cache docker image layers for reuse between runs * update dockerignore to remove non-essential files
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Continuous Integration (Rocksdb Build)
|
|
|
|
env:
|
|
ROCKSDB_VERSION: v8.1.1
|
|
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from current commit
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: build rocksdb dependency
|
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-rocksdb.sh
|
|
- name: build application
|
|
run: make build COSMOS_BUILD_OPTIONS=rocksdb
|
|
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
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: run unit tests
|
|
run: make test-rocksdb
|