Skip to content

Commit ae4dca8

Browse files
authored
Merge pull request #5909 from tautschnig/codecov-ccache
Use ccache in codecov-coverage-report GitHub action
2 parents 51c59e9 + a0d1047 commit ae4dca8

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,28 @@ jobs:
513513
DEBIAN_FRONTEND: noninteractive
514514
run: |
515515
sudo apt-get update
516-
sudo apt-get install --no-install-recommends -y g++ gcc binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov
516+
sudo apt-get install --no-install-recommends -y g++ gcc binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov ccache
517+
- name: Prepare ccache
518+
uses: actions/cache@v2
519+
with:
520+
path: .ccache
521+
key: ${{ runner.os }}-20.04-Coverage-${{ github.ref }}-${{ github.sha }}-PR
522+
restore-keys: |
523+
${{ runner.os }}-20.04-Coverage-${{ github.ref }}
524+
${{ runner.os }}-20.04-Coverage
525+
- name: ccache environment
526+
run: |
527+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
528+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
517529
- name: Configure CMake CBMC build with coverage instrumentation parameters
518530
run: cmake -S . -Bbuild -Denable_coverage=1 -Dparallel_tests=2 -DCMAKE_CXX_COMPILER=/usr/bin/g++
531+
- name: Zero ccache stats and limit in size
532+
run: ccache -z --max-size=4G
519533
- name: Execute CMake CBMC build
534+
run: cmake --build build -- -j2
535+
- name: Print ccache stats
536+
run: ccache -s
537+
- name: Run CTest
520538
run: cmake --build build --target coverage -- -j2
521539
- name: Collect coverage statistics
522540
run: |

0 commit comments

Comments
 (0)