From f1d3ac143bb0c5c3d45b9c88b9b190aea60512c2 Mon Sep 17 00:00:00 2001 From: Federico Poli Date: Thu, 29 Feb 2024 11:24:07 +0100 Subject: [PATCH] Fix disk usage of the coverage workflow --- .github/workflows/coverage.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3c96015cddf..17e1df72ca4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,7 +9,9 @@ env: RUST_BACKTRACE: 1 PRUSTI_ASSERT_TIMEOUT: 60000 # Disable incremental builds to reduce disk usage - CARGO_INCREMENTAL: 1 + CARGO_INCREMENTAL: 0 + # The /mnt disk has 66 GB of free space; more than the working directory + COVERAGE_PATH: /mnt/prusti-coverage jobs: test: @@ -27,19 +29,11 @@ jobs: - name: Set up the environment run: python x.py setup - - name: Report disk usage - run: df -h - - - name: Cache cargo - uses: Swatinem/rust-cache@v2 - with: - shared-key: "shared" - - name: Enable collection of source-based coverage run: | # The following are necessary for profiling (see https://github.com/mozilla/grcov) echo "RUSTFLAGS=-Cinstrument-coverage" >> $GITHUB_ENV - echo "LLVM_PROFILE_FILE=${GITHUB_WORKSPACE}/target/coverage/gcov-%p-%m.profraw" >> $GITHUB_ENV + echo "LLVM_PROFILE_FILE=${COVERAGE_PATH}/gcov-%p-%m.profraw" >> $GITHUB_ENV - name: Report disk usage run: df -h @@ -50,9 +44,6 @@ jobs: - name: Report disk usage run: df -h - - name: Clear coverage generated by prusti-contracts-build - run: rm -rf target/coverage - - name: Report disk usage run: df -h @@ -89,7 +80,7 @@ jobs: - name: Collect coverage run: | curl -sL https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - - ./grcov . --llvm --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info + ./grcov "$COVERAGE_PATH" --llvm --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v1