Skip to content

Bump actions/checkout from 4.2.1 to 4.2.2 (#183) #491

Bump actions/checkout from 4.2.1 to 4.2.2 (#183)

Bump actions/checkout from 4.2.1 to 4.2.2 (#183) #491

Workflow file for this run

name: CodeCov
on:
push:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
codecov:
name: Build
runs-on: ubuntu-latest
env:
BUILD_DIR: build_codecov
GCC_VERSION: 12
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: 'True'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y "g++-$GCC_VERSION"
sudo apt-get install -y cmake lcov ninja-build
- name: Configure Build
run: |
mkdir "$BUILD_DIR"
cmake \
-G Ninja \
-S . \
-B "$BUILD_DIR" \
-D PEEJAY_COVERAGE=Yes \
-D CMAKE_C_COMPILER="gcc-$GCC_VERSION" \
-D CMAKE_CXX_COMPILER="g++-$GCC_VERSION"
- name: Build
run: |
cmake --build "$BUILD_DIR"
- name: Collect the Coverage
run: |
set -x
lcov \
--capture \
--output-file coverage.info \
--directory "$BUILD_DIR" \
--gcov-tool "gcov-$GCC_VERSION" \
--include "$(pwd)/*.?pp"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}