storage-bindings 0.5.3

Rust bindings for Storage, the Decentralized Durability Engine
name: Check

on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:

env:
  cache_nonce: 0

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    timeout-minutes: 30

    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Cache prebuilt binaries
        uses: actions/cache@v4
        with:
          path: ~/.cache/storage-bindings
          key: storage-bindings-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ env.cache_nonce }}
          restore-keys: |
            storage-bindings-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-
            storage-bindings-${{ runner.os }}-

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y clang libclang-dev

      - name: Install mise
        uses: jdx/mise-action@v3
        with:
          enable: true
          cache: true

      - name: Run cargo build
        run: cargo build --all-features --release

  lint:
    name: Lint
    runs-on: ubuntu-latest
    timeout-minutes: 30
    needs: build

    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Cache prebuilt binaries
        uses: actions/cache@v4
        with:
          path: ~/.cache/storage-bindings
          key: storage-bindings-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ env.cache_nonce }}
          restore-keys: |
            storage-bindings-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-
            storage-bindings-${{ runner.os }}-

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y clang libclang-dev

      - name: Install mise
        uses: jdx/mise-action@v3
        with:
          enable: true
          cache: true

      - name: Install rustfmt and clippy
        run: rustup component add rustfmt clippy

      - name: Run cargo check
        run: cargo check --all-targets --all-features

      - name: Run cargo fmt
        run: cargo fmt --all -- --check

      - name: Run cargo clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

  test:
    name: Test
    runs-on: ubuntu-latest
    timeout-minutes: 30
    needs: build

    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Cache prebuilt binaries
        uses: actions/cache@v4
        with:
          path: ~/.cache/storage-bindings
          key: storage-bindings-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ env.cache_nonce }}
          restore-keys: |
            storage-bindings-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-
            storage-bindings-${{ runner.os }}-

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y clang libclang-dev

      - name: Install mise
        uses: jdx/mise-action@v3
        with:
          enable: true
          cache: true

      - name: Run cargo test
        run: cargo test --all-features
        env:
          TZ: UTC