rustfs-uring 0.1.0

Cancel-safe async io_uring read backend for RustFS storage.
Documentation
# Copyright 2024 RustFS Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: CI

on:
  push:
    branches: [ main ]
  pull_request:

permissions:
  contents: read

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: fmt + clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Install toolchain
        run: rustup toolchain install stable --profile minimal --component rustfmt,clippy && rustup default stable
      - name: rustfmt
        run: cargo fmt --check
      - name: clippy
        run: cargo clippy --all-targets -- -D warnings

  test:
    name: test (real io_uring on runner)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Install toolchain
        run: rustup toolchain install stable --profile minimal && rustup default stable
      - name: Build tests
        run: cargo build --tests
      - name: Test and assert io_uring actually ran
        run: |
          set -o pipefail
          cargo test -- --nocapture --test-threads=1 2>&1 | tee test.out
          if grep -q "SKIP " test.out; then
            echo "::error::a test skipped — io_uring did not run on this runner (vacuous pass)"
            exit 1
          fi

  docker-two-legs:
    name: docker (degradation + real io_uring)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: run-docker.sh (leg 1 degrades, leg 2 real io_uring)
        run: ./run-docker.sh