Skip to content

chore: detaching fork fix #6

chore: detaching fork fix

chore: detaching fork fix #6

Workflow file for this run

name: RocksDB CI
on: [push, pull_request]
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
components: rustfmt
override: true
- name: Check formatting
run: |
cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
submodules: true
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
components: clippy
override: true
- run: sudo apt update && sudo apt install -y libclang-dev
- name: Run clippy
run: |
cargo clippy --all --tests -- -A clippy::upper-case-acronyms -A clippy::missing_safety_doc -D warnings
audit:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
valgrind:
name: valgrind
runs-on: ubuntu-latest
steps:
- run: sudo apt update && sudo apt install -y valgrind libclang-dev
- name: Checkout sources
uses: actions/checkout@v6
with:
submodules: true
- name: run test
working-directory: librocksdb-sys
run: make test
test:
name: ${{ matrix.build }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [Linux, macOS, windows-2022]
include:
- build: Linux
os: ubuntu-22.04
- build: macOS
os: macos-12
- build: windows-2022
os: windows-2022
steps:
- name: Maximize build space
if: runner.os == 'Linux'
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout sources
uses: actions/checkout@v6
with:
submodules: true
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85.0
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Remove msys64 # Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll
if: runner.os == 'Windows'
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
- name: Install dependencies
if: runner.os == 'Windows'
run: choco install llvm -y
- name: Install libclang-dev
if: runner.os == 'Linux'
run: sudo apt install libclang-dev
- name: Install jemalloc
if: runner.os == 'Linux'
run: sudo apt install libjemalloc-dev
- name: Install liburing
if: runner.os == 'Linux'
run: sudo apt install liburing-dev
- name: Debug librocksdb-sys tests
if: runner.os == 'Linux' || runner.os == 'Windows'
run: clang --version && env
- name: Run librocksdb-sys tests
if: runner.os == 'Linux' || runner.os == 'Windows'
run: |
cargo test --manifest-path=librocksdb-sys/Cargo.toml -vvvvv
- name: Run rocksdb tests
if: runner.os == 'Linux' || runner.os == 'Windows'
run: |
cargo test
- name: Run rocksdb tests (jemalloc)
if: runner.os == 'Linux'
run: |
cargo test --features jemalloc
- name: Run rocksdb tests (io-uring)
if: runner.os == 'Linux'
run: |
cargo test --features io-uring
- name: Run rocksdb tests (portable)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
cargo test --features portable
- name: Run rocksdb tests (march-native)
if: runner.os == 'Linux'
run: |
cargo test --features march-native