Skip to content

Commit

Permalink
fix coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
aykut-bozkurt committed Sep 1, 2024
1 parent 79d5cac commit 3dd446b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
with:
toolchain: 1.79.0
target: x86_64-unknown-linux-gnu
components: rustfmt, clippy, llvm-tools-preview
components: rustfmt, clippy

- name: Extract rustc LLVM version
id: rustc-llvm-version
run: echo "version=$(rustc --version --verbose | grep 'LLVM version' | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.7"

- name: Install grcov
run: |
cargo install grcov
version: ${{ steps.rustc-llvm-version.outputs.version }}

- name: Install PostgreSQL dependencies
run: |
Expand Down Expand Up @@ -58,13 +58,15 @@ jobs:

- name: Generate coverage report
run: |
grcov . \
-s . \
--binary-path ./target/debug/ \
-t lcov \
--ignore-not-existing \
--keep-only 'src/**' \
-o pg_parquet.lcov
llvm-profdata merge *.profraw -output pg_parquet.profdata
llvm-cov export \
--object=./target/debug/libpg_parquet.so \
--ignore-filename-regex=.cargo/registry \
--ignore-filename-regex=.cargo/git \
--ignore-filename-regex=pg_parquet/target \
--ignore-filename-regex=rustc \
--instr-profile=pg_parquet.profdata \
--format=lcov > pg_parquet.lcov
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Cargo.lock
*.profdata
*.gcov
*.lcov
*.xml

0 comments on commit 3dd446b

Please sign in to comment.