Skip to content

Bump step-security/harden-runner from 2.8.1 to 2.9.0 #380

Bump step-security/harden-runner from 2.8.1 to 2.9.0

Bump step-security/harden-runner from 2.8.1 to 2.9.0 #380

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@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}