Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable coverage gathering during cargo build #2575

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ jobs:
shell: bash
run: |
echo "RUSTFLAGS=-C opt-level=3 -D warnings -C instrument-coverage -C linker=clang -C link-arg=-fuse-ld=$(pwd)/mold/bin/mold" >> $GITHUB_ENV
# Disable coverage when building
echo "LLVM_PROFILE_FILE=/dev/null" >> $GITHUB_ENV
- name: Setup grcov
run: |
wget https://github.com/mozilla/grcov/releases/download/v${{ env.GRCOV_VERSION }}/grcov-x86_64-unknown-linux-gnu.tar.bz2
Expand All @@ -116,9 +118,10 @@ jobs:
uses: ./.github/workflow-templates/cargo-build
with:
features: evm-tracing
- name: Clean-up possible coverage generated during builds
- name: Enable coverage gathering
run: |
rm default_*.profraw
# Enable coverage when running tests
echo "LLVM_PROFILE_FILE=$(pwd)/proffiles/default_%m_%p.profraw" >> $GITHUB_ENV
- name: Unit tests
run: |
# curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
Expand All @@ -134,14 +137,6 @@ jobs:
- name: Retrieve coverage
id: coverage
run: |
mkdir -p /tmp/proffiles

find . -type f -name \*.profraw -exec ls -l {} \;

echo "Copying profraw files to /tmp/proffiles"
find . -name \*.profraw -exec mv {} /tmp/proffiles/ \;

mv /tmp/proffiles proffiles
du -sh proffiles

echo "Executing grcov"
Expand Down