KVS new Design #809
Workflow file for this run
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: Check compilation and code | |
| on: [push, pull_request] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| cargo-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: 1.83.0 | |
| components: clippy, rustfmt | |
| - name: Cargo Clippy | |
| run: | | |
| cargo clippy --all-targets --all-features | |
| - name: Cargo Fmt | |
| run: | | |
| cargo fmt --check | |
| - name: Cargo Build | |
| run: | | |
| cargo build | |
| cargo-miri: | |
| runs-on: ubuntu-latest | |
| env: | |
| MIRIFLAGS: "-Zmiri-disable-isolation" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly-2024-12-17 | |
| components: miri, rust-src | |
| - name: Install Clang | |
| run: | | |
| sudo apt update | |
| sudo apt install -y clang | |
| - name: Cargo Miri | |
| run: | | |
| cargo +nightly-2024-12-17 miri test | |
| cpp-bazel: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bazel with shared caching | |
| uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| disk-cache: true | |
| repository-cache: true | |
| bazelisk-cache: true | |
| - name: Bazel Build | |
| run: bazel build //:kvs_cpp | |
| - name: Bazel Unit Test with Coverage | |
| run: | | |
| bazel coverage //:test_kvs_cpp \ | |
| --collect_code_coverage \ | |
| --combined_report=lcov \ | |
| --experimental_generate_llvm_lcov \ | |
| --nocache_test_results \ | |
| --nostamp | |
| - name: Install lcov | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lcov | |
| - name: Extract Coverage for CPP Files | |
| run: | | |
| REPORT=$(find "$(bazel info output_path)" -name _coverage_report.dat | head -n1) | |
| lcov \ | |
| --rc branch_coverage=1 \ | |
| --extract "$REPORT" '*.cpp' -o "${REPORT}.cpp" \ | |
| --output-file kvs_coverage.info | |
| - name: Bazel Benchmark | |
| run: bazel run -c opt //:bm_kvs_cpp |