feat(storage): add sled
implementation, make RocksDB optional feature
#1266
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
unit-test: | |
env: | |
SP1_PROVER: mock | |
SP1_SKIP_PROGRAM_BUILD: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-08-18 | |
- uses: taiki-e/install-action@nextest | |
- name: Run non-integration tests | |
run: cargo nextest run --lib --release -- --skip test_light_client_prover_talking | |
integration-test: | |
runs-on: ubuntu-latest | |
env: | |
SP1_PROVER: mock | |
SP1_SKIP_PROGRAM_BUILD: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-08-18 | |
- uses: taiki-e/install-action@nextest | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Expose github actions runtime | |
uses: crazy-max/ghaction-github-runtime@v1 | |
- name: Build the docker-compose stack | |
run: | | |
cat > ci/cache.json <<EOF | |
{ | |
"target": { | |
"validator": { | |
"cache-from": ["type=gha,scope=validator"], | |
"cache-to": ["type=gha,mode=max,scope=validator"], | |
"output": ["type=docker"] | |
}, | |
"bridge-0": { | |
"cache-from": ["type=gha,scope=bridge-0"], | |
"cache-to": ["type=gha,mode=max,scope=bridge-0"], | |
"output": ["type=docker"] | |
}, | |
"bridge-1": { | |
"cache-from": ["type=gha,scope=bridge-1"], | |
"cache-to": ["type=gha,mode=max,scope=bridge-1"], | |
"output": ["type=docker"] | |
}, | |
"light-0": { | |
"cache-from": ["type=gha,scope=light-0"], | |
"cache-to": ["type=gha,mode=max,scope=light-0"], | |
"output": ["type=docker"] | |
} | |
} | |
} | |
EOF | |
cd ci && docker buildx bake --file docker-compose.yml --file cache.json --load | |
- name: Run the docker-compose stack | |
run: docker compose -f ci/docker-compose.yml up --no-build -d | |
- name: Wait for bridge node 0 to start | |
run: | | |
while ! docker compose -f ci/docker-compose.yml logs bridge-0 | grep -q 'Configuration finished. Running a bridge node'; do | |
sleep 1 | |
done | |
- name: Wait for bridge node 1 to start | |
run: | | |
while ! docker compose -f ci/docker-compose.yml logs bridge-1 | grep -q 'Configuration finished. Running a bridge node'; do | |
sleep 1 | |
done | |
- name: Wait for light node 0 to start | |
run: | | |
while ! docker compose -f ci/docker-compose.yml logs light-0 | grep -q 'Configuration finished. Running a light node'; do | |
sleep 1 | |
done | |
- name: Run integration tests | |
run: cargo nextest run -p prism-tests --lib --release | |
unused-deps: | |
runs-on: ubuntu-latest | |
env: | |
SP1_PROVER: mock | |
SP1_SKIP_PROGRAM_BUILD: true | |
name: unused dependencies | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-08-18 | |
- name: Install cargo-udeps | |
uses: taiki-e/cache-cargo-install-action@v2.1.2 | |
with: | |
tool: cargo-udeps | |
- name: Check for unused dependencies | |
run: cargo +nightly-2025-08-18 udeps --all-features --all-targets | |
coverage: | |
runs-on: ubuntu-latest | |
env: | |
SP1_PROVER: mock | |
SP1_SKIP_PROGRAM_BUILD: true | |
COVERAGE_TEST: true | |
name: coverage | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-08-18 | |
components: llvm-tools-preview | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- uses: taiki-e/install-action@nextest | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Expose github actions runtime | |
uses: crazy-max/ghaction-github-runtime@v1 | |
- name: Build the docker-compose stack | |
run: | | |
cat > ci/cache.json <<EOF | |
{ | |
"target": { | |
"validator": { | |
"cache-from": ["type=gha,scope=validator"], | |
"cache-to": ["type=gha,mode=max,scope=validator"], | |
"output": ["type=docker"] | |
}, | |
"bridge-0": { | |
"cache-from": ["type=gha,scope=bridge-0"], | |
"cache-to": ["type=gha,mode=max,scope=bridge-0"], | |
"output": ["type=docker"] | |
}, | |
"bridge-1": { | |
"cache-from": ["type=gha,scope=bridge-1"], | |
"cache-to": ["type=gha,mode=max,scope=bridge-1"], | |
"output": ["type=docker"] | |
}, | |
"light-0": { | |
"cache-from": ["type=gha,scope=light-0"], | |
"cache-to": ["type=gha,mode=max,scope=light-0"], | |
"output": ["type=docker"] | |
} | |
} | |
} | |
EOF | |
cd ci && docker buildx bake --file docker-compose.yml --file cache.json --load | |
- name: Run the docker-compose stack | |
run: docker compose -f ci/docker-compose.yml up --no-build -d | |
- name: Wait for bridge node 0 to start | |
run: | | |
while ! docker compose -f ci/docker-compose.yml logs bridge-0 | grep -q 'Configuration finished. Running a bridge node'; do | |
sleep 1 | |
done | |
- name: Wait for bridge node 1 to start | |
run: | | |
while ! docker compose -f ci/docker-compose.yml logs bridge-1 | grep -q 'Configuration finished. Running a bridge node'; do | |
sleep 1 | |
done | |
- name: Wait for light node 0 to start | |
run: | | |
while ! docker compose -f ci/docker-compose.yml logs light-0 | grep -q 'Configuration finished. Running a light node'; do | |
sleep 1 | |
done | |
- name: Collect unit-test coverage data | |
run: | | |
cargo llvm-cov --no-report nextest --lib --release | |
cargo llvm-cov report --release --codecov --output-path codecov.info | |
- name: Upload coverage data to codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
files: codecov.info | |
wasm-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-08-18 | |
- name: Add wasm target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install wasm-pack | |
uses: jetli/wasm-pack-action@v0.4.0 | |
with: | |
version: "latest" | |
- name: Run wasm-pack tests | |
working-directory: crates/node_types/wasm-lightclient | |
run: wasm-pack test --headless --chrome --release . | |
clippy: | |
runs-on: ubuntu-latest | |
env: | |
SP1_PROVER: mock | |
SP1_SKIP_PROGRAM_BUILD: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fontconfig libfontconfig1-dev | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-08-18 | |
components: clippy | |
- name: Run clippy | |
run: cargo clippy --locked --all --all-targets -- -D warnings |